Composition of infrared remote control system
The infrared remote control system is mainly composed of a remote control transmitter, an integrated receiving head, a single-chip microcomputer, and an interface circuit, as shown in Figure 1. The remote control is used to generate remote control code pulses, drive the infrared transmitting tube to output infrared remote control signals, and the remote control receiving head completes the amplification, detection, shaping, and demodulation of the remote control signal to produce remote control code pulses. The remote control code pulse is a set of serial binary codes. For general infrared remote control systems, this serial code is input to the microcontroller, and its internal CPU completes the decoding of the remote control command and executes the corresponding remote control function. Using the remote control as the input of the control system requires solving the following key problems: how to receive infrared remote control signals; how to identify infrared remote control signals and the design of decoding software and control program.
Reception of infrared remote control signals
The receiving circuit uses the integrated infrared receiving head SM0038 (1).
Figure 1 Block diagram of infrared remote control system
SM0038 has only 3 external pins: VS, GND and 1 pulse signal output pin OUT. The pinout is shown in Figure 2. It is very convenient to interface with the microcontroller, as shown in Figure 3. VCC is connected to the power supply +5V and filtered by a capacitor to avoid power supply interference; GND is connected to the system ground (0V); the pulse signal output is connected to the CPU interrupt input pin (such as INT1, pin 13 of 8051). With this connection method, software decoding can work in both query mode and interrupt mode.
Figure 2 Infrared receiver SM0038 Figure 3 SM0038 and microcontroller interface circuit
Infrared remote control coding rules
The principles of various infrared remote control systems currently in use are similar, and the only difference is that the signal coding formats of each system are different. The coding format of the remote control dedicated integrated circuit is public and can be consulted. The following uses the remote control composed of TC9012 to explain its coding system rules. When any button on the remote control is pressed, TC9012 generates a series of pulse codes as shown in Figure 4. The remote control coding pulse formed by TC9012 modulates the 40kHz carrier by pulse amplitude to form a remote control signal, which is transmitted by the infrared transmitting tube through the driving circuit. The coding system rules are as follows:
(1) The remote control coding information of a key action includes a guide pulse and a 32-bit serial binary code. The first 16 bits of the code are the user code and do not change with different keys. It is an identification mark set to indicate a specific user to distinguish the remote control signals transmitted by different models and different users to prevent misoperation. The last 16 bits of the code change with different keys and are the key identification code. The first 8 bits are the positive code of the key code, and the last 8 bits are the negative code of the key code.
(2) The remote control signal is not represented by a high level or a low level to indicate "1" or "0", but by a pulse width. For a binary signal "0", a pulse takes 1.2 ms; for a binary signal "1", a pulse takes 2.4 ms, and the low level in each pulse is 0.6 ms.
Figure 4 Data structure of a frame code
Design of key recognition program
To design a remote control system using a remote controller, you must first understand how different key coding pulses correspond to different keys on the remote controller. The author uses software to analyze the pulse stream and uses the interface circuit shown in Figure 3 to receive the signal. If there is no infrared remote control signal, the output port OUT of the receiver remains at a high level; when an infrared remote control signal is received, the receiving head demodulates the signal and converts it into a pulse sequence and adds it to the interrupt input pin of the CPU. Use software to test the logic level of the pin, and start the T timer at the same time, measure the time value of the pin when it is logic "0" and logic "1", store it, and then analyze it. The rules are as follows (the CPU crystal oscillator of the simulation machine is 6MHz):
① The guide pulse is a low level with a time value of 1137H~1157H and a high level with a time value of 084FH~086FH;
② The low level time value of the data pulse is approximately 0127H~0177H;
③ There are two cases for the high level time value: 00BBH~00FFH (narrow: represents "0") and 0301H~0333H (wide: represents "1");
④ At the same time, through analysis, the key code value of each key can be understood for use in writing application programs.
Application of infrared decoding technology
The composition of the infrared remote control system and the infrared receiving circuit are shown in Figure 1 and Figure 3. Here we mainly introduce the design of the system software. The system software mainly consists of the main program, various control processing programs, remote control receiving and decoding interrupt program, display control and other modules.
Previous article:Technical Analysis of 3G, WLAN, and Bluetooth
Next article:Generation and characteristics of pulsed ultrasonic waves
- Popular Resources
- Popular amplifiers
- High signal-to-noise ratio MEMS microphone drives artificial intelligence interaction
- Advantages of using a differential-to-single-ended RF amplifier in a transmit signal chain design
- ON Semiconductor CEO Appears at Munich Electronica Show and Launches Treo Platform
- ON Semiconductor Launches Industry-Leading Analog and Mixed-Signal Platform
- Analog Devices ADAQ7767-1 μModule DAQ Solution for Rapid Development of Precision Data Acquisition Systems Now Available at Mouser
- Domestic high-precision, high-speed ADC chips are on the rise
- Microcontrollers that combine Hi-Fi, intelligence and USB multi-channel features – ushering in a new era of digital audio
- Using capacitive PGA, Naxin Micro launches high-precision multi-channel 24/16-bit Δ-Σ ADC
- Fully Differential Amplifier Provides High Voltage, Low Noise Signals for Precision Data Acquisition Signal Chain
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Power supply output power problem
- STM32MP157A-DK1 Evaluation (4) UART and SPI Device Access
- WLAN radio frequency and channels
- What kind of IoT card is reliable?
- [RVB2601 Creative Application Development] Initially implement the perpetual calendar function of NTP clock synchronization
- Practical Tips | How to learn hardware design well? Experts teach you from theory to practice
- Overcoming the Design Challenges of Low Quiescent Current in Small Battery-Powered Devices
- Implementation of high-precision division in fixed-point DSP
- Online Logic Analyzer Data
- FRAM FAQ