Electronic ballast design based on AVR microcontroller-ALLTOP-img
loading

Electronic ballast design based on AVR microcontroller

by:ALLTOP      2020-12-11
Introduction
electronic ballast is a new energy-saving products, not only can drive some lighting lamps and lanterns, can also together and some of the uv lamp, for air purification and water purification has very big effect. At present, all over the world vigorously advocate environmental protection, electronic ballast indirectly to environmental protection provides the motive power. AVR microcontroller is a high cost performance of the single chip microcomputer, using the single chip microcomputer to dimming electronic ballast and time sampling is very appropriate, the first is AVR microcontroller itself more stable, stronger anti-interference ability, followed by its own Harvard structure makes the running speed is faster, data read back time faster, can realize real-time online control.
1 AVR single chip microcomputer is introduced
1. 1 the characteristics of the AVR microcontroller
compared with previous 8-bit microcontroller, AVR microcontroller adopts Harvard structure, which is separate program bus and data bus, and USES the two-stage assembly line, 1 MIPS/MHz speed processing ability. On chip on the integration of a variety of RC oscillator frequency, electric automatic reset, watchdog, startup latency, and other functions module, peripheral circuit is simple, the system is more stable and reliable. Most of the AVR on-chip resources: take E2PROM chips was introduced, PWM, RTC, SPI, UART, TWI, ISP, AD, Analog Comparator, such as WDT module.
  1. AVR MCU PWM function
2 AVR microcontroller timer of powerful, Atmega48, for example, it has two 8-bit timer and a 16-bit timer, all has the hardware PWM function. Each timer has two output unit, the PWM easier.
AVR timer PWM wavelength division 5 types of work
( 1) Normal mode. The simplest form of work, in this mode the counter constantly accumulation. After the meter to the maximum ( MAX=0xFFFF) Due to numerical overflow, the counter simply return to the minimum value of 0 x0000 start again.
  ( 2) CTC mode. 一个。 Used to output 50% duty cycle of square wave signal; b。 Used to produce continuous timing signal accurately.

  ( 3) Fast PWM mode. Used to output high frequency PWM signal, Is twice as tall as double oblique wave frequency) 。

  1. 3 AVR single-chip microcomputer serial port communication function
AVR microcontroller effective support senior C language, a serial port receiving interrupt mode can be used also can be used in a query, AVR serial port is a full-duplex operation ( Independent serial send and receive register) Support, asynchronous or synchronous operation, 5, 6, 7, 8 or 9 bits and one or two stop bits, hardware support parity operations, there are three separate interrupt source, including the UART receive complete interruption, send interrupt, register air break, in judging whether to receive the data, also can use the query, adopt the way of interrupt itself.
2
2 electronic ballasts. 1 the advantages of electronic ballasts
( 1) Energy saving. Electronic ballast its power loss is only about 40% of the inductance ballast, and fluorescent under the high frequency of about 30 KHZ, photosynthetic efficiency will be increased by 20%, the working current is only about 40% of the inductance, and be able to start and work under low temperature and low pressure.
  ( 2) No stroboscopic. Tubes in about 30 KHZ work, light stability, the human eye couldn't feel the stroboscopic helpful for protecting eyesight.
  ( 3) No noise. Is conducive to work and study in a quiet environment.
  ( 4) High power factor. Reducing reactive power loss and improve the effective utilization rate of power supply equipment capacity, reduce the wastage of the line.
  ( 5) With no lights itself has the protective functions, such as protection and over voltage protection, enhanced the reliability of the electronic ballast.
  2. 2, the hardware of the electronic ballast
( 1) Figure 1 for the AVR single chip microcomputer control circuit, the chip with Atmega48, MCU pin PD0 and PD1 as receiving end and sending end of RS485. PD2 output from RS485.

  ( 2) Figure 2 is a RS485 communication circuit, the receiving end and the input respectively connected to an optical coupler, the sending and receiving signal isolation effect, optical coupler mutual isolation between input and output, thus has good electrical insulating ability and anti-interference ability. And by the optical coupler work belong to the input end of the current model of low resistance components, thus has strong common mode rejection capability. Figure 6 lb184 is a transceiver with transient voltage suppression function difference, its ability to resist noise.

  ( 3) Figure 3 is the input of EMI filters and boost PFC circuit, LC1 and CY1, CY2 used to filter out common mode noise, CX1 and CX2 filter differential mode noise. UC2843 is a fixed frequency, pulse width modulator and Q101 booster circuit, power factor correction circuit is used to improve the conduction Angle of the rectifier, the papers at the same time, make the input ac current waveform, and the voltage wave direction.


3 electronic ballast software design 3. 1 AVR microcontroller specific methods and software flow of the dimming ballast
electronic ballast startup, after preheating frequency and firing frequency, finally stable job in ignition frequency. And then the software will RS485 for receiving state, if there is a command that move light hair down, SCM according to the command, change the ballast operation frequency, to achieve the purpose of the dimmer.


4 summary based on the AVR microcontroller to the dimming control of electronic ballasts, implements not only can fully open close, can also be intelligent control on concrete ballast. And some electronic ballast and tube together, use rise very convenient. Through some specific engineering project, the electronic ballast and UV lamp together for dimming, demonstrate the method is effective.
Custom message
Chat Online 编辑模式下无法使用
Leave Your Message inputting...