The city's roads are staggered, filled with vehicles and bustling with pedestrians. So what can we rely on to achieve this order? It relies on the automatic command system of traffic lights. Traffic lights are an important command system for urban traffic. As an effective means to control traffic flow and improve road capacity, traffic lights have a significant effect on reducing traffic accidents. This article designs an intelligent traffic light system with STC89C52 microcontroller as the core and wireless control through Zigbee module remote control. Traffic police can use wireless remote control to change the length of traffic lights to adapt to different traffic conditions and crowd numbers. At the same time, the digital tube displays The remaining time of the traffic light fully embodies the control idea of the Internet of Things and has certain application value and market prospects.
1. System solution design
The article designs a wireless control system for traffic lights at an intersection using the STC89C52 microcontroller as the core. The Zigbee module is used to remotely control the length of the traffic light, and two digital tubes are used to display the control status. The system mainly includes three parts: handheld device module, traffic light control module and digital display module. In actual traffic scenes, the distance between the center of the intersection and the traffic lights is generally no more than 300 meters, and the communication distance of the Zigbee module can be reliably transmitted within 800 meters. The Zigbee network is constructed into a Mesh network structure, and nodes can also forward data, further enhancing the reliability of the system. A traffic policeman in the center of an intersection can connect directly to the traffic light module via a handheld device.
Figure 1 Wireless terminal layout diagram
2. System hardware design
2.1. Wireless handheld device hardware design
The handheld device hardware mainly includes microcontroller, liquid crystal display, wireless communication, clock control module, etc., as shown in Figure 2. After the traffic police input the signal light and time to be controlled through the key circuit, the code is packaged by the microcontroller and sent to the traffic light control module through the Zigbee module. Among them, CN3065 is used for system time adjustment and time prompts, and the Zigbee module uses cc2430.
Figure 2 Wireless handheld device hardware topology diagram
2.2. Hardware design of traffic light control module
The main function of the traffic light control module is to identify data packets and issue control instructions to convert the signal lights. Serial communication is used to connect with a microcomputer to transmit on-site data to the city monitoring center, which facilitates remote control by the city monitoring center under special circumstances. In intersection traffic lights, the traffic light displays in the same lane are completely consistent. Therefore, the digital tube display circuit uses two one-bit common anode seven-segment digital tubes, two in a group, and a group of digital tubes can display numbers between 0 and 99. Each pin of the P1 port of the STC89C52 is connected to a 300 ohm resistor, and then connected to a seven-segment digital tube.
Figure 3 Traffic light control module hardware topology diagram
3. System software design
The software design of the system includes two parts: the software design of the handheld device and the software design of the traffic light control module. The article develops software programs for handheld devices and signal light control modules based on the IAR Embedded Workbench development platform.
3.1. Handheld device software design
The main function of the handheld device is to allow the traffic police to input the ID and status of the traffic light to be controlled and send the control signal. The wireless communication module CC2430 comes with the Z-STACK protocol stack that complies with the Zigbee specification. The Zigbee module of the handheld device is the coordinator, and its main function is to start the Zigbee network and update the network nodes, so it can only be controlled when the handheld device is activated. In order to prevent malfunction and rejection caused by packet loss, the data packet adopts MODBUS protocol, and the verification method is CRC-16. After the Zigbee network is established, the latest list of controllable signal lights will be displayed on the LCD screen. After the traffic police inputs the command, the control information is sent.
Figure 4 Handheld software communication flow chart
3.2. Traffic light control module software design
The main function of the traffic light control module is to join the Zigbee network established by the handheld device and receive the control commands sent by the handheld device. When applying to join the network, send your ID number and date to the handheld terminal to facilitate unified school time. If it is not added to the Zigbee network, the original traffic light control logic will be executed.
Figure 5 Control module flow chart
4 Conclusion
Based on the actual needs of traffic police to control traffic lights, this article combines the control ideas of the Internet of Things to design a wireless handheld traffic light control system for traffic police. This system can transmit the traffic police's control information to the control module through the Zigbee network, ultimately realizing the need for wireless control of traffic lights by traffic police on duty. The entire system is designed with low power consumption and low cost. It works stably and reliably, and the wireless network is flexible and reliable, making it suitable for large-scale promotion.
Previous article:Design of 51 microcontroller IO port analog serial communication
Next article:Application of MCS51 microcontroller in data acquisition and monitoring system
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Innovation is not limited to Meizhi, Welling will appear at the 2024 China Home Appliance Technology Conference
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Download from the Internet--ARM Getting Started Notes
- Learn ARM development(22)
- Learn ARM development(21)
- Learn ARM development(20)
- Learn ARM development(19)
- Learn ARM development(14)
- Learn ARM development(15)
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- [Repost] Nine things to note when testing PCB boards
- Automotive RFCMOS 77GHz Radar Module Design
- Help: Puyuan DS5102CA waveform measurement problem
- What is the difference between cmw500 signaling and non-signaling?
- MSP430 MCU Development Record (2)
- I would like to ask if the experts know the component library resources of 3554am in ad... I downloaded many component libraries but couldn't find it
- Questions about the use of TL431
- The development history of Chinese radio
- Cost-effective ADC evaluation board, EVAL-AD7606C-18
- Qorvo simplifies Wi-Fi 6E with first FEM to support 5.1 to 7.1 GHz frequency bands in a single module ...