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.
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
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- 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
- IC layout Seeking talents Seeking talents Seeking talents Seeking talents Coordinates: Shanghai, Shandong, Nanjing
- Optical module SFF-8472 problem solving
- Develop smart devices based on ESP32 to access the smart home ecosystem HomeAssistant
- ST Value Series NUCLEO-G071RB Development Board Introduction
- Domestic MCU
- STM32F767 ADC self-calibration problem
- EEWORLD University ---- Digi-Key: Accelerated Application of Graph Algorithms in Deep Learning
- FPGA Timing Constraints Practice: Sorting Out the Clock Tree
- A constant and adjustable output power electronic cigarette power supply solution based on TPS61022
- Sales of new energy vehicles have skyrocketed, how should we deal with used batteries?