A lamp head infrared remote control system using single chip microcomputer

Publisher:legend9Latest update time:2012-02-11 Source: 现代电子技术 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Infrared is an invisible light, named because it is outside the visible light (red light) in the entire electromagnetic spectrum. It is between visible light and microwaves, and has the properties of visible light, such as rectilinear propagation, reflection, refraction, etc., and also has some characteristics of microwaves, such as strong penetrating power and the ability to pass through some opaque substances.

By taking advantage of the infrared ray's straight-line propagation characteristic, utilizing the infrared sensor's high sensitivity, fast response speed, and narrow spectral range, and also utilizing the microcontroller's compact structure, high reliability, strong data processing capability, fast speed, low power consumption, and low cost, we can produce an infrared remote control device with high sensitivity and excellent anti-interference performance.

This design combines a single-chip microcomputer with infrared technology and electronic technology. The designed universal household lamp remote control device has the characteristics of simple structure, easy operation and relatively complete functions.

1 Principle of infrared remote control system

The structural forms of infrared remote control circuits are generally divided into three types, namely: single-channel remote control switch circuit, single-channel step-by-step remote control circuit and multi-channel remote control circuit. This design uses a single-channel remote control switch circuit. This infrared remote control system is generally composed of two major parts: transmitting and receiving. The transmitting part generally includes a pulse generator, a pulse power amplifier and infrared transmission. The receiving part generally includes infrared reception, voltage amplification, limiter amplification, bistable trigger and relay. Some also use special remote control integrated circuits to simplify the structure. This remote control system is mainly composed of switch control buttons, timing data input buttons, brightness control buttons, timing control circuits, display circuits, infrared transmitting circuits, infrared receiving circuits, brightness control and execution circuits, etc.

2 Hardware Circuit

2.1 Switch Control

This part mainly realizes remote control to turn on or off the light, which is a button. When the button is pressed, the infrared transmitting part emits an infrared pulse, which is received by the infrared receiving part and causes the relay to change its original state, turning the light from on to off or from off to on.

2.2 Timing part

This part mainly includes: input and processing of timing data, timing circuit and time display circuit.

The input of timing data adopts the working mode of non-coded keys, where "0~9" are number keys, "H" is the hour key, and "Y" is the confirmation key. The circuit diagram of this part is shown in Figure 1.

The timer uses a subtraction counter. The initial input data is given by the lower 4 bits of the P0 port of 89C51. After decoding and inversion by P2.7 and P2.0, it is latched on the set end of the corresponding counter CD4069 and displayed by the decoding display device CL002. At the same time, the subtraction count starts. When the RP is adjusted to about 2.4 M, NE555 will generate a 60 s pulse. The unit of control data is min, and the left side is the low bit. When it is reduced to all 0, the counting stops and a low level is output to the infrared transmitting part. The transmitting part emits infrared pulses, which are received by the infrared receiving part to flip the switch part, thereby changing the original state of the bulb to achieve timing control. The timing circuit is shown in Figure 2. The display part is CL002, which is a CMOS-LED combination device integrating storage, decoding and display. Its function is equivalent to a CD4543 or CD4511 plus a common cathode digital tube. The use of this combination device can simplify the circuit structure.

2.3 Brightness Control Circuit

The circuit of this part is shown in Figure 3. It consists of infrared receiving and preamplification, pulse recognition, electronic analog switch, electronic analog potentiometer and other parts.

The infrared receiving and preamplification adopts μPC1373 special integrated circuit. When the SB1 key of the infrared transmitting circuit is pressed, the infrared transmitting circuit will emit a long pulse or a short pulse according to the length of the key press time. The pulse is received by BA5204 and outputs a high level at the 4th pin of BA5204. After inversion, it is sent to the 7th pin of μPC1373 for pulse recognition processing. The pulse recognition circuit adopts the integrated six-phase inverter CD4069, in which the part input from the 1st pin and output from the 4th pin is the short pulse recognition circuit, and the short pulse makes the brightness smaller. The part input from the 13th pin and output from the 6th pin is the long pulse recognition circuit, and the long pulse makes the brightness larger. The electronic analog switch adopts the four-way analog conversion switch CD4066. The electronic analog potentiometer uses an N-channel field effect tube VMOS tube, which is a voltage-controlled device that uses the gate voltage to control the drain current, that is, to control the channel resistance. This characteristic can be used to treat the field effect tube as a voltage-controlled variable resistor. [page]

2.4 Infrared Transmitter Circuit

The circuit diagram of this part is shown in Figure 4 (a). The infrared remote control transmitter uses the BA5104 special coding integrated circuit, where pins 1 and 2 are the user code selection terminals to prevent remote control by others. Pin 3 is connected to pin 6 of the output terminal 74LS27 of the timing circuit, and pins 4 and 5 are connected to the brightness and switch control buttons respectively. When any one of pins 3 to 5 has a low level, the LED immediately emits modulated infrared light, and the emission frequency is controlled by the crystal oscillator between pins 12 and 13.

2.5 Infrared receiving part

The circuit of this part is shown in Figure 4 (b). BA3502 is an integrated infrared receiver. The BA5204 in the receiver is a device used in conjunction with the transmitter BA5104. Its operating voltage is 5 V. The linear regulator LR6 with high input voltage and low output current without a transformer converts 220 V AC into 10 V DC, and then converts it into 5 V power supply through 7805. When any key of SB1 or SB2 of BA5104 is pressed or the third foot receives a low level, the corresponding port of BA5204 outputs a high level. When released, the port returns to a low level. The time to maintain the high level is the same as the time of pressing the key. SK-II in the figure is a voice-controlled integrated circuit. The signals output by the third and fifth feet of BA5204 are input to SK-II by C2. After amplification, frequency selection, shaping, and delay by the internal circuit, they are sent to the trigger and flipped. The 9th foot outputs a low level. The low level turns on VT3 and the relay J is attracted to turn on the power control switch. After receiving the control signal for the second time, the 9th foot of SK-II outputs a high level, VT3 is cut off, the relay is released, and the power is disconnected.

3 Software Design

The software design mainly involves designing the key processing program. The key processing program uses the interrupt mode, and the interrupt uses the external interrupt 0. When a key is pressed, it will cause an interrupt to the microcontroller, and the microcontroller will execute the key processing program to determine the type of key pressed and make corresponding processing. The key processing program flow chart is shown in Figure 5.

4 Conclusion

The infrared remote control lamp head system based on single chip microcomputer realizes the switch, timing and brightness adjustment control of the lamp head, which is more convenient for people's life and makes the special requirements for lamp head control in some cases come true. The remote control system works stably and reliably, with the maximum effective control distance of 8-10 m and the longest timing time of 16 h.

References

[1] Ma Jiachen, et al. MCS-5 MCU Principle and Interface Technology [M]. 2nd Edition. Harbin: Harbin Institute of Technology Press, 1998.
[2] Xiao Jinghe. Application of Digital Integrated Circuit [M]. Beijing: People's Posts and Telecommunications Press, 2002.
[3] Xiao Jinghe. Practical Remote Control Circuit [M]. Beijing: People's Posts and Telecommunications Press, 1998.
[4] Chen Youqing. Lighting Control Integrated Circuit and Lighting Controller Manufacturing [M]. Beijing: People's Posts and Telecommunications Press, 2001.
[5] Liang Yangui. Decoder, Encoder, Data Selector, Electronic Switch, Power Supply Volume [M]. Beijing: Science and Technology Literature Publishing, 2002.

Reference address:A lamp head infrared remote control system using single chip microcomputer

Previous article:Power frequency phase angle source based on single chip microcomputer
Next article:Using the external interrupt of single chip microcomputer to realize communication with microcomputer

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号