Application design of LED lighting control system based on AVR

Publisher:SereneWhisperLatest update time:2020-02-20 Source: eefocusKeywords:AVR  LED Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

1.jpg

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.

led

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.

2.jpg

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Ω):

led

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:

led

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:

led

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:

led

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.

led

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.

Keywords:AVR  LED Reference address:Application design of LED lighting control system based on AVR

Previous article:Motor Actuator Control System Based on AVR Single Chip Microcomputer
Next article:Design of elevator call board system based on AVR microcontroller

Latest Microcontroller 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号