loading

We are a leading manufacturer of solar power utilization and lighting systems

Electronic ballast design based on AVR microcontroller

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.

GET IN TOUCH WITH Us
recommended articles
Knowledge News & events Project
Leading the future of green energy storage, ALLTOP will appear at the 137th Canton Fair

Exhibition name: 2025 THE 137TH CHINA IMPORT AND EXPORT FAIRExhibition date: April 15-19, 2025Booth No. : 14.3 f33-34g10-11/14.2 D13-14-15Address: China Import and Export Fair Hall (Canton Fair Hall)
Somali municipal project: ALLTOP solar street lights light a green future
Project name: A municipal project (solar street lamp) in Somalia was successfully implemented
Date: January 04, 2025
Project location: Somalia
Quantity and specific configuration: 500 sets of 0278-400W solar street lights
ALLTOP presents innovative products at the 2024 Solar PV and Energy Storage World Expo
2024 Solar PV & Energy Storage World Expo The 16th Guangzhou Intt Solar Photovoltaic & Energy Storage Exhibition Booth No.Booth B551, Hall 10.2, Area B TIME/August 8th-10th, 2024 ADD: Area B, China Import & Export Fair Complex, Guangzhou
Pv + Agriculture: ALLTOP lights up Pakistani farms with green light, photovoltaic agricultural irrigation project is successful
While actively responding to the "Belt and Road" Initiative, ALLTOP should dig deep into overseas markets and carry out accurate market positioning and strategic planning. Comply with the current economic trend in the international situation, while ensuring that its products and services can meet the actual needs of countries along the "Belt and Road", and make ALLTOP unique products can achieve the purpose of truly serving the "Belt and Road", so as to achieve a soft landing and grounding; A pr
Shaping the Future of Energy ALLTOP at the Expo Georgia Exhibition Center
Live up to the old expectations! On April 26,The 28th International Exhibition for Buildi had its grand opening. ALLTOP team appeared in 118A, Hall 11.36, brought many new photovoltaic products, outdoor street lights, photovoltaic energy storage and other one-stop systematic solutions, attracted more than 300 industry leading enterprises to participate in the exhibition, many visitors have stopped to visit, exchange, tens of thousands of visitors, customers together, a glimpse of the annual indu
no data
Our aim is to provide the best products and the most considerate service for customers.
About Us
Customer service
detect