Infrared remote control technology

Publisher:GoldenSerenityLatest update time:2011-08-15 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Reference address:Infrared remote control technology

Previous article:Technical Analysis of 3G, WLAN, and Bluetooth
Next article:Generation and characteristics of pulsed ultrasonic waves

Latest Analog Electronics Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号