Introduction: This solution uses infrared remote control to better realize the dimming control of household LED lighting. The advantages of ATmega8 and infrared remote control can be further utilized: ATmega8's three timers can be configured as three-way PWM output, that is, it can control three strings of LED lights, and can provide support for multi-color LED lighting and decorative lighting; ATmega8's powerful processing capability can also provide strong support for personalized lighting solutions; in addition to sending control signals, the infrared transceiver system can also transmit the lighting control solution to ATmega8.
1 LED lighting control system principle
The system schematic is shown in Figure 1. When the infrared receiver receives the infrared remote control signal, the AVR microcontroller is awakened from sleep mode through an external interrupt; the AVR microcontroller starts to parse the infrared signal, and if it matches the system address, it will change the input of the LED constant current source driver according to the parsed command, thereby changing the state of the LED light.
2 System Hardware Design
2.1 Controller
The controller uses AVR single-chip microcomputer ATmega8. ATmega8 is an AVR single-chip microcomputer launched by Atmel in 2002, which adopts small pin package. ATmega8 integrates 8 KB programmable F1ash, 512 bytes EEPROM and 1KB internal SRAM; 3 PWM channels, which can realize any PWM pulse width modulation output less than 16 bits, with adjustable phase and frequency; 1 programmable serial USART interface, supporting synchronous, asynchronous and multi-machine communication automatic address recognition; 5 power saving modes. In this system, the main function of the controller ATmega8 is to analyze infrared signals and control the LED driver.
2.2 Infrared Receiver Module
The main components of the infrared receiving module are IRM-2368V, which is often used in the remote control of household appliances such as home DVD, TV, air conditioner, etc. IRM-2368V has the following characteristics: the operating voltage is 2.4~6 V; high sensitivity and strong anti-interference ability; it can directly extract the remote control signal from the carrier, the output matches TTL and CMOS levels, and can be directly interfaced with the microcontroller; the remote control distance can reach 12m. Figure 2 is the schematic diagram of the infrared receiving module. PD2 is multiplexed as the external interrupt INTO of ATmega8, and the power supply part uses the system's 5 V power supply.
2.3 LED driver module
The LED driver module uses the HV9910 integrated chip. It has the following features: high energy efficiency of more than 90%; wide voltage input of 8 to 450 V; adjustable output current from a few mA to 1A; can drive up to 100 LED lights; PWM current regulation. Figure 3 is the LED constant current source driver schematic, the drive circuit is a typical buck-boost converter design. The input power supply voltage Vin = 12V in the driver drives 3 to 6 350mA high-brightness LED lights.
When HV9910 is working, the internal oscillation frequency fosc is determined by the resistor on the pin Rosc. In this design, Rosc is 470 kΩ, and the gate switching frequency of MOSFET tube Q1 is set to 50kHz. Rosc and fosc satisfy the following relationship (the unit of Rosc is kΩ):
The voltage drop of each LED lamp is about 3 V when it is working. When there are 3 LED lamps connected in series at the output end, the driver output voltage Vled = 91 V. It can be obtained that the control signal duty cycle D of Q1 tube when the LED is working at full current is:
The on-time of Q1 Ton=D/fosc=8.6μs, the output current Iled=350 mA, and the harmonic current is suppressed within 30%, then the value of inductor L1 can be obtained by the following formula:
In this solution, L1 actually uses 1 mH.
The feedback voltage on R1 is compared with the internal comparison voltage of HV9910 250 mV. If the feedback voltage is greater than 250 mV, Q1 is turned off. R1 can be obtained from the harmonic current relationship:
3 System Software Design
The system software flow is shown in Figure 4. After the system is powered on, it first reads the system status configuration and sets the working status of the LED light; then it enters the sleep mode, and the timer still works in the PWD state. The output port of IRM-2368V is connected to the PD2 port of ATmega8. In the sleep state, this port is configured as interrupt INT0; after the interrupt wakes up, the interrupt is turned off and the port is configured as an input port.
4 System Testing
In the case of a load (LED lamp), the experimental results of the set PWM duty cycle and load current are listed in Table 1. It can be seen that the output current is basically linearly proportional to the PWM signal duty cycle.
Conclusion
This solution uses infrared remote control to better realize the dimming control of household LED lighting. The advantages of ATmega8 and infrared remote control can be further utilized: ATmega8's three timers can be configured as three-way PWM outputs, that is, it can control three strings of LED lights, and can provide support for multi-color LED lighting and decorative lighting; ATmega8's powerful processing capabilities can also provide strong support for personalized lighting solutions; in addition to sending control signals, the infrared transceiver system can also transmit the lighting control solution to ATmega8, and the system will be able to freely change personalized lighting solutions.
Previous article:Motor Actuator Control System Based on AVR Single Chip Microcomputer
Next article:Design of elevator call board system based on AVR microcontroller
- Popular Resources
- Popular amplifiers
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- Please recommend a boost boot chip
- EEWORLD University - Learn about industrial ARM using Sitara AM6x training series
- Interpolation filter design
- Embedded system reliability design technology and case analysis
- Broadband millimeter-wave digital-analog hybrid beamforming
- [ATmega4809 Curiosity Nano Review] Development Environment Setup
- 【LSM6DSOX's MLC machine learning understanding】--Training data set correction tool
- test
- [GD32L233C-START Review] 2. Transplantation of rtthread + finsh components
- FPGA basics and how it works