Design and Application Analysis of Street Lamp Remote Control System Based on Single Chip Microcomputer

The basic structure of a remote street lamp control system based on single chip microcomputer is described, and the hardware and software design of the system is analyzed.

With the continuous development of China's economy, the remote streetlight control system has been well developed. The system can switch the street lights in real time, and can adjust the brightness of the street lights according to the actual situation, so as to more effectively utilize and save energy. Therefore, we need to fully understand the hardware and software design of the control system. Only in this way can the fault be solved in time.

1 System Overview The core of the remote streetlight control system is the single-chip microcomputer control, which consists of two parts: the master and the slave, and realizes the communication between multiple MCUs in the master-slave mode. The communication between the master and the slave is realized by the power line carrier technology, thereby effectively reducing the communication line.

The host computer is composed of a single chip microcomputer, a remote communication module and a power line carrier communication module, and is responsible for receiving the control commands issued by the remote monitoring center and the fault information of the street lamp; the slave machine is composed of a single chip microcomputer, a power line carrier communication module, a switch control circuit, a voltage and a current detecting circuit, It turns the light on and off according to the command of the host, adjusts the brightness and performs the fault self-test. The line structure of the control system is as shown.

2 hardware design 2.1 host hardware design host STC12C5A60S2 microcontroller as the control core. The single-chip microcomputer is a dual serial port single-chip microcomputer, which can ensure the communication between the single-chip computer and the communication module and the slave machine without mutual interference, and ensure the reliability of communication; the on-chip 1KB EEPROM storage space can save the host address, the number of slaves and remote monitoring Important information such as the communication address of the central terminal, and has a power-down save function; the watchdog reset function ensures the correct operation of the program and prevents the program from entering an infinite loop.

The communication module uses Siemens MC52I module, which has the advantages of small size, light weight, low power consumption and reliable communication, and supports AT command set control. The MCU sends the corresponding AT command to control the MC52I communication module to read and send control commands and status information.

In order to realize power line carrier communication between single-chip microcomputers, the system selects KQ-330f+ power carrier data transceiver module. The module is a small-volume, high-performance zero-crossing carrier data transceiver module designed for use on 220V AC lines and capable of reliably transmitting data in strong interference, strong attenuation and long-distance communication environments. Carrier module. The KQ-330f+ power carrier data transceiver module can be directly connected to the serial port of the MCU.

The operating voltage of the MCU is 5V, and the working voltage of the MC52I communication module is 4.2V. In order to ensure the reliability of the connection, the MAX232 level conversion chip is selected, and the baud rate of the communication is set to 9600bps. 2.2 The hardware design of the slave is from The machine uses the STC12C5A60S2 single chip as the control core. In order to realize the power carrier communication between the slave and the host, the KQ-330f+ power carrier data transceiver module is installed on the slave side and connected to the single chip microcomputer.

The street light switch control can be realized by controlling the on and off of the bidirectional thyristor BTA16-600B by the single chip microcomputer. In order to effectively isolate the AC high voltage and DC low voltage control signals on the two-way thyristor, it is necessary to add an optically coupled triac driver MOC3023 between the MCU and the BTA16-600B. The brightness adjustment of the street lamp depends on the PWM wave in the PWM output pin of the single chip microcomputer. The output frequency is constant and the duty cycle is variable. The fixed frequency of the PWM wave is 1 kHz. When the street light is the brightest, the duty ratio is 100%. When the street light is the darkest, the duty ratio is 70%. The slave can adjust the duty cycle according to the command of the host.

The detection of voltage and current is completed by the AD conversion function of the single chip microcomputer. Since the collected voltage and current are both AC, and the sampling voltage finally sent to the AD port cannot exceed 5V, the sampling result of the AC voltage is a DC voltage signal of less than 5V obtained by voltage division of the rectifier bridge and the resistor, and This signal is sent to the AD port of the single-chip microcomputer; the sampling method of the AC current is to first convert the large AC current signal into a small AC current signal through the current transformer TA0913-2M, and then convert it into an AC voltage signal through the sampling resistor, and finally pass through the rectifier bridge. Send to the AD port of the microcontroller. After converting the value obtained by the single-chip AD conversion, the actual value of the sampled AC voltage and current can be obtained.

3 software design In the system, the host is responsible for controlling the information exchange with the remote monitoring center, and is also responsible for controlling and querying the slave machine, which is the core part of the control system. The following describes the software program design of the host.

Host program flow chart host software program design is divided into the following four steps: 1 complete the initialization of the microcontroller. It includes the initialization settings of the serial port, timer and watchdog, and reads important information such as the local address and the number of slaves in the EEPROM. 2 Send an AT command and initialize the communication with the MC52I communication module. Mainly configure the communication mode of the MC52I and connect the remote monitoring center terminal. 3 After the program enters the state of waiting for the remote control command, once the control command sent by the remote monitoring center is received, the host will broadcast the command to the slave in a broadcast manner.

After a proper delay, the host will query the execution result of the slave control command one by one in a one-to-one communication mode. If a fault message is received, the number of the faulty slave is recorded. After the query ends, the host sends the execution of the control command to the remote monitoring center. 4 When the street light is on, at regular intervals, the host will automatically query the status of the slave and collect fault information. If there is fault information, the host will send the summarized fault information to the remote monitoring center; if there is no fault information, the host will continue to wait for the remote terminal's command or the next automatic query.

The program flow of the host is as shown.

4 Conclusion In summary, through a deep understanding of the system hardware and software design process, the remote street light control system has been widely used in small industrial parks. The system has stable performance and convenient maintenance. Reasonable switch control and brightness adjustment effectively save energy. At the same time, the automatic reporting of fault information also brings convenience to street lamp maintenance personnel.

Custom Metal Keychains

We are professional customized 2D keychain, 3D keychain, blank keychain, hollow keychain, iron keychain, brass keychain, alloy keychain, aluminum keychain, PVC keychain, arcylic keychain, metal charm, mobile charm etc. All for souvenir ,decoration , gift and so on . The most popular material is zinc alloy , but we could also make it by iron, brass, stainless steel ,stainless iron,Aluminum,PVC. The plating color is usually is gold , pearl gold , nickel ,pearl nickel , black ,rose gold ,bronze ,copper ,antique silver and so on . For the custom metal Keychain, also we could make sticker on it, printing your logo on the sticker , engraved logo on the product , Enamel Keychain is means painting color .For trolly Coin Keychain, laser engraving the logo could be acceptable.

Custom Keychain,Keychain Custom Logo,Logo Keychains,Keychain Metal

Shenzhen MingFengXing Art & Craft Products CO., LTD. , https://www.customizedbadge.com

Posted on