Intelligent street lamp power saver system based on ATmega128

With the rapid development of local economy and transportation, the scale of lighting street lighting facilities is getting larger and larger, and the number is increasing. The energy consumption of lighting is also increasing. The electricity consumption of lighting is close to 15% of the power generation. Electrical efficiency is low and waste is serious. China's current energy shortage, power supply is tight, it is necessary to use a convenient and economical power saver to solve the above problems.

After theoretical analysis and repeated practice and many circuit improvements, an intelligent street lamp power-saving device (hereinafter referred to as street lamp power saver) using ATmegal28 single-chip microcomputer as the control core has been developed. The power saver has an automatic switch light according to time, according to The system voltage and current are automatically regulated, and various functions such as various protections of the power saver are automatically realized. After actual application in the field, the operation is stable and the power saving effect is remarkable.

1 Principle and control method of intelligent power saver 1.1 Power saving principle The brightness of electric light source has a nonlinear relationship with its working voltage. When the rated voltage is gradually reduced to 195V, the brightness of the illuminant changes slowly, and the effect and quality of the lighting will not be There are obvious changes, and the degree of visual satisfaction to the human body is basically the same.

According to the theoretical derivation calculation, including the main circuit, the microcontroller and the sampling circuit and other peripheral circuits.

By - amplify the system structure box. 3 Sampling circuit should make the system make corresponding control action according to the voltage and current fluctuation of the power grid. The voltage and current must be sampled. The sampling circuit is as shown. The voltage transformer and the current transformer are used to separately detect the voltage and current. At the same time, in order to improve the anti-interference ability of the system, the common mode inductance is used to reduce the influence of common mode interference, and the capacitors Cl, C2 are used for filtering, and then rectified by a voltage converter. It is a DC signal, and finally the sampling signal is provided to the MCU through the amplifier isolation, and is calibrated by software.

Tl main loop circuit main circuit part has four tapped transformers, the input AC 220V, the output is 210, 200, 190, 185 and 220V are divided into five gears, respectively controlled by contactors KM3, KM4, KM5, KM6 and KM7 , KM8, KM9, KM10 respectively control the on and off of the three-phase circuit. KMR is the transition resistance control contactor. KM7 is the zero contactor. When starting, the relay KM0 is closed first, KM1 and KM2 are closed. After the full pressure is started for a certain period of time, it enters the power saving state, and the voltage regulator is gradually adjusted according to the set value. .

2.2 The choice of microcontroller to control the circuit. The device has 128K FLASH, 2K EEPROM, erasing times up to 100,000 times, can be used to store power-saving status information; 4 timers/counters can be used to set overflow interrupts; 53 I/O pins With large current driving capability, it can directly drive the liquid crystal display and save the drive power; 2 programmable serial USART interfaces support full-duplex synchronous/asynchronous serial communication; 8-channel 10-bit A/D channel, Realize the conversion of current and voltage from analog to digital.

2.4 Other circuit clock circuit adopts clock chip DS1 307, communicates through the I2C bus of the single chip microcomputer, and in order to prevent the chip from stopping timing due to power failure, an additional lithium battery is required; the digital input circuit passes through the line, the reset line, the chip selection line, etc. The signal line is used to control the liquid crystal display; the keyboard can be directly driven by the single chip microcomputer, and the input setting function of the menu is executed.

3 control circuit software design software program design adopts modular design, with the main program as the core, and many function sub-modules are set at the same time. The sub-module includes: a keyboard detection module, a liquid crystal display module, a clock module, a control module, a protection module, a communication module, etc., respectively implementing respective functions.

The system program flow is as shown. First initialize the MCU system, including initializing the I/O port of the MCU, timers T1 and 12, communication serial port UART, analog-to-digital conversion A/D, etc., and reading the stored data from the EEPROM, setting the control parameters. The time in the clock chip is read into the chip through the I2C bus to show the local time.

The liquid crystal display program is the main module of the program. It is the human-machine interface of the controller. It has two levels of menus and can be set with various functions such as latitude and longitude setting, fixed power saving time setting, clock setting, and communication parameter setting. Wait. Various control functions are written with certain algorithms, and the sequence and state of the relays are changed according to the control needs.

The full-pressure work means that after the street lamp is started, the whole pressure works for 15 minutes, so that the street lamp emits light normally. Then enter the power-saving state, the voltage and current are collected into the AD port through the transformer, converted into digital Dong by AD, and the control mode is controlled according to the AD sampling value. Through the time control mode selection, enter the power saving operation state.

4 Remote monitoring system Because urban street lights have many characteristics such as terminal, outdoor, dispersion and wide area, what communication method is adopted is the key problem to solve the remote monitoring and management of street lamps. Radio stations, power line carriers and telephone lines can usually be used as communication means, but these communication methods need to invest in building a special computer communication network, resulting in one-time investment and high operating costs, and requiring professional technicians to maintain, which is to realize remote monitoring of street lamp systems. The main difficulty.

The above problems can be well solved by using public communication and computer network GPRS-Intemet.

4.1 Composition of the monitoring system The composition of the monitoring system is as shown.

Circle 4 monitoring system remote monitoring terminal power saver through the GPRS equipment terminal to transmit the real-time operating parameters (including voltage, current, switch, etc.) of the street light line operation to the Internet, and then connect to the monitoring center computer through the Internet to implement remote monitoring and control. And information management.

4.2 The monitoring system's multiplier system uses TCP/IP protocol for data transmission, and uses a certain data error detection mechanism at the user level. Based on this, a remote monitoring terminal and monitoring center computer communication protocol are designed to realize remote monitoring terminal and monitoring. Communication between central computers ensures real-time, economical and reliable data transmission.

The format of the two messages is shown in Table 1.

The address in the data message sent by the monitoring center computer is the power saver address number. The functions include setting the running parameters, adjusting the data report, 1 wanted message format, b starting address type, data length, data checksum, end 1 1 1 1 text and proofreading Time, etc., using 16-bit CRC check, the generator polynomial is G (especially) = '6 + heart ++1. The data message returned by the MCU includes the real-time operating parameters of the street lamp line (voltage, branch current and total current, switch) Children) and fault information. The fault information mainly includes reset information, A/D conversion fault, CRC check error, power failure information, time error, and terminal device abnormality.

4.3 Design of monitoring software The remote monitoring system should strive for advanced and practical in the selection of software environment, so that the system can be updated in the software environment to meet the requirements of users for human-machine dialogue and convenient operation. VB is selected as the programming language, and the monitoring center software is a Chinese graphical menu interface. The interface design and operation mode adopt the Windows standard style.

The Sockets control performs network communication programming. The basic mode of Winsock is: to establish a server connection instance of the network connection instance, just set the local service port number, and then the server calls the method Listen to enter the blocking state, waiting for the connection request from the client. The corresponding client not only sets the Winsock property RemoteHost to the name of the server (IP address or network code), but also sets the port number (RemotePort) that the server listens to, and then calls the method Win-sock. Coect makes a request to the server. When the server receives a client request, the event ConnectionRequest will be triggered. If the server is willing to provide the service, you can call the Accept method to accept the connection. Once the connection is established, both ends can use SendData or GetData to send or receive data.

The development of intelligent street lighting power saver software requires a large amount of data. Faced with such large and complex data, it must be scientifically managed and organized, which requires a powerful data software. The current popular Microsoft Access database software is not only powerful but also intuitive and easy to use.

For some simple applications you don't even need to write any code to implement it. In addition, the Adodc interface in Visual Basic provides direct access to Access, which is very convenient to use.

The system adopts the popular GPRS communication method and combines the design of monitoring software to realize functions such as user management, map switching, real-time monitoring, and wireless data transmission. To sum up, the system monitoring center software has the following superior performance and functions: system security, reliability 篼; friendly man-machine interface, simple operation; real-time data transmission and reception; using client / server structure, distribution Strong processing power; the system is highly scalable, easy to maintain and expand.

5 Conclusions The intelligent streetlight power saver with ATmega128 single chip as the core is designed. The various functions of the power saver are described. The hardware structure and software programming are analyzed in detail. The power saver design principle is simple and the hardware structure is reasonable. It has multiple time control modes, and can automatically regulate the lamp within the voltage fluctuation range and automatically perform various protection functions. At the same time, it has remote communication with the monitoring center to realize remote control, telemetry and remote signaling functions, which is convenient for maintenance and Management improves work efficiency. The on-site operation shows that the power-saving efficiency of the power-saving lighting control system is about 30%, and the power-saving efficiency is low, which has great market promotion value.

Bath Towel

[Strong Water Absorption]Microfiber Bath Towel is soft and dense, strong water absorption, easily wipe off body moisture after bathing.
[Soft and skin-friendly]Adopt advanced micro-spinning technology, soft and delicate, skin-friendly and comfortable, wipe the face and hands, protect every inch of skin.
[Easy to wash, easy to dry, no odor]The bath towel is easy to clean and quick-drying. Prevents coral fleece bath towels from drying out and smelling even in wet and rainy seasons.
[Environmental protection and not easy to fade]Reactive printing and dyeing technology, say "no" to fluorescent agents, not easy to fade, safer and more environmentally friendly.

[Wide Use]Whether it is a bathroom, swimming pool, or beach, you need a towel that can quickly dry your body.

Soft Bath TowelCustom Microfiber Bath TowelMicrofiber Bath Towel

Bath Towel,Bath Sheets,Bathroom Towels,Quick Dry Bath Towels

SUZHOU BETTER CLEAN CO LTD , https://www.betterclean.net