
In recent years, with the continuous development of modern urban industrialization, the urban air environment has shown a trend of continuous deterioration, and the development of urban construction has steadily accelerated. The urban living environment is gradually becoming worse. In order to further promote the development of urban construction and provide people with a healthy and livable living environment, it is necessary to protect and monitor the air environment. The use of solar power generation helps to protect the urban ecological environment and can also effectively solve the current problems of severe energy supply-demand imbalance and environmental pollution. Traditional air environment monitoring methods have disadvantages such as low efficiency, high cost, complex wiring, and poor scalability. However, ZigBee wireless transmission technology has the characteristics of low cost, low power consumption, flexible networking, and strong scalability. Therefore, this design combines widely distributed street lights and air environment monitoring systems in cities, uses solar energy to power the street lights and the entire system, and uses ZigBee wireless transmission technology to build a data transmission network for real-time transmission of air environment data, developing a solar energy street light system for urban environment monitoring.
1. Overall system plan
The system is divided into two modules. The solar street light system uses STC89C52RC microcontroller as the main control chip. STC89C52RC is a low-power, high-performance CMOS 8-bit microcontroller produced by STC company, with 8K byte system programmable Flash memory. The CC2530 chip from Texas Instruments is used as the main control chip in the air environment monitoring system. The chip is built on the 2.4GHz IEEE 802.15.4 standard protocol and contains an RF transceiver, 8KB static random access memory, 256KB flash memory block, and 18 interrupt source interrupt controllers. It has 21 universal I/O pins, 5 channel DMA, 32KHz sleep timer, and other rich peripheral interfaces.
This system consists of six parts: terminal nodes (sensor nodes), coordinators, upper computers, solar panels, batteries, and street lights. The solar panel absorbs sunlight and directly or indirectly converts solar radiation energy into electrical energy through photoelectric or photochemical effects to power the street lamps and the entire system. The terminal node is equipped with DHT11 temperature and humidity sensors to collect the temperature and humidity of the air environment, and GP2Y1014AUpm2.5 sensors to collect the concentration of PM2.5 in the air environment, The terminal node is responsible for collecting environmental data collected by sensors and sending the data to the coordinator through the ZigBee wireless transmission network. The coordinator is responsible for establishing the ZigBee wireless transmission network, receiving environmental data sent by the terminal node, and sending the data to the upper computer through serial port transmission. Finally, the upper computer displays the air environment data collected by the terminal node in real time.
2. System hardware module design
The system hardware is mainly divided into 5 modules: power module, charge and discharge control module, photosensitive detection module, DHT11 temperature and humidity sensor, and PM2.5 sensor.
2.1 Power module
The power module consists of a solar panel, a voltage boosting and stabilizing circuit, and a battery. The principle of solar panel power generation is that when the solar panel components are exposed to sunlight, they will generate a DC voltage. The voltage generated by the solar panel components serves as the electrical input for the entire system, but the voltage generated is easily affected by sunlight, leading to voltage instability. By using a boost and voltage stabilization circuit, the output voltage can stably supply power to the system and charge the battery. When there is no input voltage to the solar cell components, the battery supplies power to the street lights and air environment monitoring system.
2.2 Charging and discharging control module
In order to protect the battery and extend its service life, it is necessary to control overcharging and discharging of the battery. The overcharge control circuit detects the battery level to determine whether the solar cell module is in an overcharged state when charging the battery. If the battery is in an overcharged state, the charging circuit is disconnected in a timely manner. The over discharge control circuit detects the battery level to determine whether the battery is in an over discharged state when supplying power to the street lights. If the battery is in an over discharged state, the electrical circuit is disconnected in a timely manner.
2.3 Light detection module
The light detection module uses photoresistors, also known as photoresistors or light conduits, which are commonly made of materials such as cadmium sulfide, aluminum sulfide, lead sulfide, and bismuth sulfide. When these materials are illuminated by certain specific wavelengths of light, their resistance values will immediately decrease. By utilizing the characteristic of the resistance value of the photoresistor changing with the intensity of light, the light intensity signal in the surrounding environment is detected. The light intensity signal is converted into a voltage signal, and the light intensity detection is completed by setting the voltage ratio with the comparator to compare the output level change.
2.4 Sensor Hardware Design
2.4.1 DHT11 temperature and humidity sensor
DHT11 temperature and humidity sensor is a composite temperature and humidity sensor with digital signal output. It adopts unique digital module acquisition technology and temperature and humidity sensing technology, with fast response speed, low price, and outstanding anti-interference ability. The DHT11 sensor uses a serial interface single bus data transmission method, and can only transmit 40 bits of data at a time.
2.4.2 PM2.5 sensors
The optical dust sensor (GP2Y1014AU) is an air purifier system used to detect small particles in the air. The sensor consists of a phototransistor and an infrared light-emitting diode. The device can detect the reflected light from dust in the air, and its current consumption is very low. It can also be equipped with a 7VDC sensor. The optical dust sensor outputs an analog voltage, which is proportional to the measured dust concentration and has a sensitivity of 0.5V/0.1mg/m ^ 3.
3.System software design
The system software is mainly divided into three modules: solar street light module, terminal node module, and coordinator module.
3.1 Solar street light module
After the system is powered on, the initialization operation is first carried out, and then the photosensitive detection module detects the lighting information. If the lighting is sufficient, the street lights are turned off and then the battery level is detected. If the battery level is insufficient, the battery is charged. The charging control module protects the battery from overcharging. If the lighting is insufficient, the street lights are turned on when the battery level is sufficient, When the battery is low, the discharge control module protects the battery from over discharge and turns off the street lights.
3.2 Terminal Node Module
After the terminal node is powered on, it first performs system initialization. Afterwards, the terminal node starts scanning and searching for the presence of a coordinator within the communication distance, as well as the ZigBee network built by the coordinator. If there is a ZigBee network built by the coordinator within the communication distance, the terminal node applies to join the ZigBee network and obtains the network short address assigned by the coordinator. If the connection is unsuccessful, it continues to apply to join the network, After the terminal node successfully connects to the network, it reads sensor data and transmits it to the coordinator through the ZigBee network. Afterwards, the terminal node periodically transmits the data to the coordinator.
3.3 Coordinator module
After powering on, the coordinator first performs system initialization. Afterwards, the coordinator starts scanning and selecting suitable channels, setting network identifiers, extension addresses, short addresses, and other network parameters to establish the network and start it. After successfully creating a new ZigBee network, the coordinator allows other terminal nodes to join the ZigBee network and establish a binding with it. When other terminal nodes apply to join the network, they establish a binding with it and assign a network address. After the terminal node joins the network, the coordinator receives data sent by the terminal node through the ZigBee network and sends the received data to the upper computer through serial transmission.
4.System testing
After the system design is completed, assembly and debugging are carried out. After the system is powered on, the solar street light module determines whether the street lights need to be turned on by detecting the light intensity. The coordinator of the air environment monitoring module is responsible for establishing the network and waiting for the terminal node to enter the network. After the terminal node enters the network, it periodically sends environmental data, and uses the serial assistant software on the upper computer to view the environmental data. The system test results show that solar street lights can automatically turn on the street lights when the light intensity is weak, and automatically turn off the street lights when the light intensity is strong. The sensor collects environmental data accurately, and the display data on the upper computer is basically consistent with the environmental data of the terminal node, which has high credibility.
5. Conclusion
This project designs a solar street light system for urban environmental monitoring, and provides a detailed introduction to the design and development process from both hardware and software aspects. The system test results show that the system has advantages such as stable and reliable operation, high measurement accuracy, low power consumption, and simple maintenance. In addition, it has achieved the monitoring of urban air environment using clean solar energy, meeting the design expectations. It has high practical value and good development prospects, and also provides reference examples for the application of ZigBee technology in other related fields.