Design of infrared remote control system for lamp head based on single chip microcomputer

Publisher:konglingdeyuanLatest update time:2012-11-15 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Principle of infrared remote control system

The structure of infrared remote control circuit is 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 adopts 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 an infrared transmitter. The receiving part generally includes infrared reception, voltage amplification, limiter amplification, bistable trigger and relays. 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.

Figure 1 Timing time input

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.

Figure 2 Timing circuit

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.

Figure 3 Brightness control circuit

The infrared receiver and preamplifier use the μPC1373 dedicated integrated circuit. When the SB1 key of the infrared transmitter circuit is pressed, the infrared transmitter 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 uses an integrated six-phase inverter CD4069, in which the part input from the 1st pin and output from the 4th pin is a short pulse recognition circuit, and the short pulse reduces the brightness. The part input from the 13th pin and output from the 6th pin is a long pulse recognition circuit, and the long pulse increases the brightness. The electronic analog switch uses a 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. It uses the gate voltage to control the drain current, that is, to control the channel resistance. This feature can be used to treat the field effect tube as a voltage-controlled variable resistor.

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.

Figure 4 Infrared transmitting and receiving circuit

2.5 Infrared receiving part

The circuit of this part is shown in Figure 4 (b). BA3502 is an integrated infrared receiver. 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, which turns on VT3 and the relay J is attracted to turn on the power control switch. When the control signal is received 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.

Figure 5 Key processing program flow chart

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 makes people's life more convenient and realizes the special requirements of lamp head control in some cases. 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.

Reference address:Design of infrared remote control system for lamp head based on single chip microcomputer

Previous article:Hardware circuit diagram of automatic shearing machine control system based on single chip microcomputer
Next article:Design of Intelligent Community Monitoring System Based on Single Chip Microcomputer

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号