Design of intelligent zebra crossing traffic light control system

Publisher:chunxingLatest update time:2024-02-28 Source: elecfans Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

1 Introduction

With the development of the economy, the number of cars has increased, and the pressure on urban roads has increased. On densely populated roads, people and vehicles often compete for lanes, resulting in frequent traffic accidents. Many cities use zebra crossing traffic lights to balance the relationship between pedestrians and vehicles, but they ignore the real-time traffic conditions at different times and cannot meet the changing traffic needs. The intelligent zebra crossing traffic lights designed in this article can be adjusted in time according to the number of pedestrians and vehicle flow. Traffic light control results can better deal with corresponding problems.

2. Overall system design

The traffic light indicates the direction of pedestrians in red and green colors and time, and the direction of vehicle indication shows red, green, and yellow colors and time. The red light time in the direction indicated by pedestrians is equal to the sum of the green and yellow light times in the direction indicated by vehicles. The time indicated by traffic lights in the direction indicated by pedestrians The green light time is equal to the red light time in the direction indicated by the vehicle. The two-way pass approximates the traffic flow and the number of pedestrians waiting to cross the road, and adjusts the two-way traffic time in real time. During the vehicle peak period, when the pedestrian accumulation reaches a higher preset value, the crossing timing can be turned on, and the traffic time is controlled to be shorter; the opposite is true during the off-peak vehicle period, in which The number of pedestrians is captured by a counter or a pressure sensor, and this solution uses a pressure sensor. According to the task requirements, the designed system mainly consists of the following modules: ① control and expansion module; ② detection and conversion module; ③ reset and crystal oscillator module; ④ display module. Its structural block diagram is shown in Figure 1.

Design of intelligent zebra crossing traffic light control system

Figure 1 Overall block diagram of the system

In this system, the control and expansion modules are used to complete the control tasks of the system; the detection and conversion modules are used to measure the traffic flow on the road and the number of people waiting to pass on the sidewalk through pressure sensors, and convert them into digital quantities for single The chip is processed; the function of the reset and crystal oscillator module is to combine the internal circuit of the microcontroller to generate the clock frequency required by the microcontroller and to reset the circuit under different needs; the function of the display module is to display the set pass or waiting time.

3. Hardware design

3.1. Control and expansion modules

(1) The control part of the control module adopts MCS-51 series single-chip microcomputer 8051, which is low in price, simple in structure, easy to develop, has strong bit processing functions, and has a full-duplex asynchronous serial communication port. Among them, the setting of each second is delayed by a combination of counter hardware and software. After the main pulse frequency of the microcontroller is divided by 12, 1s will exceed the maximum timing time of the counter. A software counter with an initial value of 20 is set in the main program to make T0 time 50ms. In this way, whenever T0 reaches 50ms, the CPU responds to the overflow interrupt request and enters the interrupt service subroutine. In the interrupt service subroutine, the CPU first decrements the software counter by 1, and then determines whether it is 0. If it is 0, it means that 1s has arrived, and it can return to the output time display program. The 8051 clock frequency can be selected between 1.2 and 12MHz. Without affecting the total power of the system, choosing a lower clock frequency can reduce the system's requirements for the working speed of other components, thereby reducing costs and improving system reliability. . The single-chip machine clock frequency of this system is 6MHz.

(2) The expansion module MCS-51 series microcontroller has a total of four 8-bit parallel I/O ports, but these I/O ports cannot be fully provided to users. For the 8051 microcontroller with built-in ROM/EPROM, these 4 I/O ports are only allowed to be used as user I/O when external expansion is not used. However, when most 8051 requires external expansion, the MCS-51 microcontroller can be provided. The I/O ports used by users are only P1 and P3. Therefore, expansion of I/O ports is inevitable in most MCS-51 microcontroller application system designs.

3.2. Detection and conversion module

The system uses a pressure sensor to measure the flow of pedestrians and vehicles at a certain time, converts it into a corresponding current signal, amplifies and filters it, and inputs it into the A/D conversion device, and then forms a digital signal and inputs it into the microcontroller. The microcontroller presets the corresponding value and compares it with the input value, and adjusts the two-way signal light time to control the traffic time. Among them, assuming that the average weight of pedestrians is 40 to 100kg and the average mass of vehicles is 200kg to 10t, the PTH501 pressure sensor can be used as the detection instrument. Its range is 0~1~150 (MPa), the accuracy is ±0.2%FS, and the response The time is 5ms.

The principle block diagram of the detection and conversion module is shown in Figure 2.

Design of intelligent zebra crossing traffic light control system

Figure 2 Principle block diagram of detection and conversion module

3.3. Reset and crystal oscillator module

(1)Reset module

Reset is the initialization operation of the microcontroller. Its main function is to initialize the PC to 0000H so that the CPU starts executing the program from the 0000H unit. In addition to the normal initialization of the system, when the system is in a deadlock state due to program running errors or operation errors, in order to get out of the predicament, it is also necessary to press the reset button to restart. This design uses an automatic reset method. To ensure a successful reset, as long as the reset port remains high for a sufficient period of time (that is, more than two cycles), the system can automatically power on and reset.

(2) Crystal oscillator module

There is a high-gain inverting amplifier inside the 8051 to form an oscillator. Pins XTAL1 and XTAL2 are the output and input terminals of this amplifier respectively. This amplifier forms a self-excited oscillator together with the quartz crystal and ceramic resonator outside the clock circuit in Figure 3. The wiring is shown in Figure 3. When an external crystal is connected, C1 and C2 are usually selected to be 30pF; when an external ceramic resonator is connected, the typical values ​​of C1 and C2 are about 47pF. Its oscillation frequency is 1.2~12MHz. It uses a 12MHz crystal oscillator and is connected to XTAL1 and XTAL2 of the 8051 microcontroller to provide a timing reference for the CPU.

Design of intelligent zebra crossing traffic light control system

Figure 3 Clock circuit

3.4. Display module

LED (Light-Emitting Diode) is the abbreviation of light-emitting diode. LED digital tube has simple structure, high luminous efficiency, low production cost, stable and efficient working performance, long life, bright color, easy to observe, economical and cost-effective, and can reduce the number of interfaces , and LED also has the advantages of energy saving, safety and environmental protection. It adopts 8-segment common cathode digital tube and dynamic driver display.

4. Software part

Software design is the core of the system control part. When the system is started and initialized, the flow information of pedestrians and roads is collected through pressure sensors set at different locations and processed separately. The output is then converted to analog-to-digital format and preset with the microcontroller. The control contents are compared and a control plan is formed, which is finally displayed to give prompts to people traveling in both directions. The main program flow of the system is shown in Figure 4.

Design of intelligent zebra crossing traffic light control system

Figure 4 Main program flow chart

5. Summary

This system is based on the single-chip 8051 chip as the core control component. Through the two-way pressure sensor, it can adjust the lighting time of the two-way red and green lights according to the real-time traffic conditions, achieving better control effects, strong applicability, simple operation, It has the advantages of strong scalability, high reliability, short design cycle, and easy maintenance.


Reference address:Design of intelligent zebra crossing traffic light control system

Previous article:Sorting out the various cycles in a microcontroller
Next article:A brief introduction to USB2.0 SD/MMC flash memory card reader single chip

Recommended ReadingLatest update time:2024-11-16 11:49

Audio peak collection terminal design based on C8051F020 microcontroller and RTL8019AS
Broadcast signals go through program production and broadcasting, signal transmission, emission and other links, and are finally listened to at the audience's end. The system working status of each link will have an impact on the final broadcast quality. In order to comprehensively monitor the signal quality of multip
[Microcontroller]
Audio peak collection terminal design based on C8051F020 microcontroller and RTL8019AS
8051 MCU - Serial port simulation
The traditional 8051 series MCU is generally equipped with one serial port, and the STC89C52RC enhanced MCU is no exception. There is only one serial port available for use, which causes a problem. If the current MCU system requires two or more serial ports for simultaneous communication, it is very embarrassing for
[Microcontroller]
8051 MCU - Serial port simulation
Design of Virtual Instrument Test System Based on C8051F120 Single Chip Microcomputer
1 Introduction Virtual instruments are computer-based instruments. The close integration of computers and instruments, and the construction of virtual instruments to replace complex and bulky analog instruments is the current trend of instrument development. Compared with traditional instruments, virtual instruments h
[Test Measurement]
Design of Virtual Instrument Test System Based on C8051F120 Single Chip Microcomputer
Design of embedded display system based on microcontroller C8051F120 and FPGA device
Relying on its affinity with users and natural human-computer interaction interface, embedded devices have developed rapidly and penetrated into every corner of life. The design method introduced in this article uses the high-performance 8-bit microcontroller C8051F120 as the core processor, SRAM as the system's video
[Microcontroller]
Design of embedded display system based on microcontroller C8051F120 and FPGA device
Precise signal simulation circuit design based on C8051F410 microcontroller
When testing a certain type of transmitting device. Three sets of accurate DC voltage signals referenced to 11.50 volts are required. In order to cooperate with the test process, these three sets of signals need to take 18 different DC voltage values ​​​​at different periods of time, with amplitudes distributed in the
[Microcontroller]
Precise signal simulation circuit design based on C8051F410 microcontroller
C language programming of 8051 microcontroller
      8051 C programming is similar to traditional C programming. Of course, some data types are different. As we know, 8051 supports powerful bit addressing capabilities, so 8051 C programming adds some new data types to avoid wasting the capabilities of 8051. The following are the newly added data types.        bi
[Microcontroller]
C language programming of 8051 microcontroller
What does the 8051 microcontroller consist of? How many pins does the 8051 microcontroller have?
Introduction to 8051 microcontroller The 8051 microcontroller is an 8-bit microcontroller widely used in embedded systems. It was launched by Intel in 1980. It was one of the most advanced 8-bit microcontrollers in the industry at that time and a classic in the field of microcontrollers. The 8051 microcontroller has
[Microcontroller]
CF card file storage based on C8051F020
With the rapid development of computer application technology, mobile storage devices have been widely used. Among them, CF (Compact Flash) card was born in 1994. It is the earliest flash memory card and has the highest penetration rate among many products. Due to the characteristics of low price, small size, large st
[Microcontroller]
CF card file storage based on C8051F020
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号