Application Design of LED Lighting Control System Based on AVR

Introduction: LED lighting has entered the home user. Compared with traditional lighting equipment (such as incandescent lamps and fluorescent lamps), it has the advantages of high monochromatic purity, various colors, high efficiency and adjustable light intensity. Aiming at the problem that the traditional illumination brightness is not easy to adjust and the switch position is fixed, this paper designs an LED remote control illumination system based on AVR single-chip microcomputer, and proposes the method of driving and brightness adjustment of LED illumination lamp.

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 MCU wakes up from the sleep mode through an external interrupt; the AVR MCU starts to parse the infrared signal, and if it matches the system address, it will change the LED constant current source drive according to the parsed command. Input to change the state of the LED light.

led

2 system hardware design

2.1 Controller

The controller uses the AVR microcontroller ATmega8. ATmega8 is an AVR microcontroller introduced by Atmel in 2002 in a small pin package. ATmega8 integrates 8 KB programmable F1ash, 512-byte EEPROM and 1KB internal SRAM; 3 PWM channels for any PWM pulse width modulated output less than 16 bits, phase and frequency adjustable; 1 programmable serial USART interface supports 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 the infrared signal and control the LED driver.

2.2 Infrared receiving module

The main components of the infrared receiving module adopt IRM-2368V, which is commonly used in remote control of home DVD, TV, air conditioner and other home appliances. IRM-2368V has the following characteristics: working voltage is 2.4 ~ 6 V; high sensitivity, strong anti-interference ability; can directly extract the remote control signal from the carrier, output matching TTL, CMOS level, can be directly interface with the microcontroller; The remote control distance can reach 12m. Figure 2 is a schematic diagram of the infrared receiving module. Among them, PD2 is multiplexed into ATmega8's external interrupt INTO, 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 characteristics: high energy efficiency over 90%; wide voltage input of 8 ~ 450 V; output current adjustable from a few mA to 1A; can drive up to 100 LED lights; PWM regulates current. Figure 3 is a schematic diagram of the LED constant current source driving, which is a typical buck-boost converter design. The input power supply voltage Vin=12V in the driver drives 3 to 6 3 50mA high-brightness LED lights.

LED drive circuit

When the HV9910 is operating, the internal oscillation frequency fosc is determined by the resistance on the pin Rosc. In this design, Rosc takes 470 kΩ and sets the gate switching frequency of MOSFET Q1 to 50 kHz. R osc and fosc satisfy the following relationship (Rosc units are kΩ):

led

Each LED lamp operates with a voltage drop of approximately 3 V. When three LED lamps are connected in series at the output, the driver output voltage is Vled = 91 V. The duty cycle D of the control signal of the Q1 tube can be obtained when the LED is full current:

led

Q1's on-time Ton=D/fosc=8.6μs, output current Iled=350 mA, harmonic current suppression within 30%, then the value of inductor L1 can be obtained from:

led

In this scheme, L1 actually uses 1 mH.

The feedback voltage on R1 is compared with the internal comparison voltage of 250 mV of HV9910. 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, first read the status configuration of the system, set the working state of the LED; then enter the sleep mode, the timer still works in the PWD state. The output port of the IRM-2368V is connected to the PD2 port of the ATmega8. In the sleep state, the port is configured as an interrupt INT0. After the interrupt wakes up, the interrupt is turned off and the port is configured as an input port.

    4 system test

    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 duty cycle of the PWM signal.

    led

    Conclusion

    This program uses infrared remote control to achieve better home LED lighting dimming control. The advantages of ATmega8 and infrared remote control remote control can be further developed: ATmega8's three timers can be configured as three PWM outputs, which can be controlled. 3 string LED lights, can support multi-color LED lighting and decorative lighting; ATmega8's powerful processing capability can also provide powerful support for personalized lighting solutions; in addition to transmitting control signals, infrared transceiver system can also control lighting The solution is transmitted to ATmega8 and the system will be free to replace the individual lighting solution.


      0 times
      Window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "2", "bdMiniList": false, "bdPic": "", "bdStyle": " 0", "bdSize": "24" }, "share": {}, "image": { "viewList": ["qzone", "tsina", "tqq", "renren", "weixin"], "viewText": "Share to:", "viewSize": "16" }, "selectShare": { "bdContainerClass": null, "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren" , "weixin"] } }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share. Baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];

      Schneider Electric provide energy and automation digital solutions for efficiency and sustainability. we combine world-leading energy technologies, real-time automation, software and services into integrated solutions for homes, buildings, data centers, infrastructure and industries. We make process and energy safe and reliable, efficient and sustainable, open and connected.

      Schneider Inverter

      Inverter For Motor,3 Phase Converter For Motor,3 Phase Inverter For Motor,Inverter Dc To Ac

      Wuxi Trenty Machinery & Equipment Co., Ltd. , https://www.elec-inverter.com

      Posted on