Circuit simulation software is one of the important contemporary software. Without circuit simulation software, the simulation operating environment cannot be set up. For circuit simulation software, although there are many types on the market, the well-known circuit simulation software is proteus. For this circuit simulation software, the editor has brought many introductions. This article introduces the circuit simulation software for the design of traffic light control circuit based on proteus, let’s get to know it together.

Urban roads are intricate and intertwined. Traffic lights are an important command system for urban traffic. As an effective means to control traffic flow and improve road capacity, traffic signal lights have obvious effects on reducing traffic accidents. However, the traffic flow changes at any time, and the traditional traffic light mode uses timing control, which can easily cause traffic jams. Therefore, the design and simulation of a traffic light control system based on Proteus and single-chip microcomputer is of great practical significance for reducing traffic accidents, alleviating traffic congestion, and improving the unblocking rate.

1. System design plan

The east-west and north-south trunk roads cross at a crossroad. Each trunk road has a set of traffic lights, and each state direction has a set of red and green lights, that is, a set of traffic lights has 3 sets of red, turn left, go straight, and turn right. A green light and a yellow light indicate the safe passage of vehicles and pedestrians. The red light is on and it is forbidden to pass, and the green light is on to allow passage. The yellow light flashes to remind people to notice that the state of the traffic light is about to switch.

1.1, the design of the system hardware circuit

The use of single-chip microcomputer to design an application system should consider that under the premise of meeting the design requirements, the hardware circuit should be as simple as possible, and the program design should be used to the greatest extent to complete the various functions of the system. Therefore, this paper uses the STC89C52 single-chip microcomputer as the control core to design the control of traffic lights. System. In this system, STC89C52 and peripheral circuit modules exchange information and perform corresponding control. The block diagram of the system is shown in Figure 1.

  

Detailed discussion of circuit simulation software (19), the design of traffic light control circuit based on proteus circuit simulation software

Figure 1 Block diagram of traffic light system

The system is composed of clock circuit, reset circuit, control system circuit, LED traffic light Display circuit, seven-segment digital tube Display time circuit, automatic and manual button control circuit, etc. The main controller adopts STC89C52 single-chip microcomputer. P1 port is set with red and green light points The function of bright and yellow light flashing, P0, P2 port to display the time, P3 port to set the system working mode. The red, green and yellow lights of traffic lights are realized by light-emitting diodes, and the display of time is realized by seven-segment digital tubes.

1.2, the design of the system software circuit

1) LED traffic light display module

The P1 port of 89C52 single-chip microcomputer controls the LED traffic light, and controls the corresponding LED traffic light state in different states.

2) Digital tube display module

89C52 single-chip microcomputer P0 port performs time countdown segment selection, P2.0~P2.3 ​​port selects digital tube time display position, and uses T2 interrupt timing to refresh the seven-segment digital tube every 2ms.

3) Keyboard control module

89C52 single-chip microcomputer P3.0~P3.3 port and P3.6 port external keyboard control the automatic and manual state of the traffic light and the different states of manual control for real-time scanning, and enter the corresponding operating state.

2. System working mode

2.1, automatic control mode

The system starts in automatic control mode. At first, the north-south direction is turned on, that is, the green light is straight, and the rest are red lights, and the digital tube starts counting down from 15s. When the countdown reaches 8s, the yellow light starts to flash (flashing once after 1s), flashing After 3s, that is, when the countdown reaches 5s, the north-south direction turns left and right to the green light, and the red light goes straight; when the countdown reaches 0s, the intersection enters the no-go waiting state, that is, all the green lights are off and the red lights are on, and the digital tube turns from The countdown starts at 3s, and the yellow light starts to flash for 3s; when the countdown is again 0s, and the yellow light flashes, the north-south direction digital tube starts counting down from 18s, and the east-west direction is turned on, which is the green light, and the rest are red lights, and the digital tube The countdown starts from 15s. When the countdown reaches 8s, the yellow light starts to flash (flashing once in 1s). After flashing for 3s, that is, when the countdown reaches 5s, the east-west direction turns to the left and right to the green light, and the red light is straight; when the countdown reaches 0s When the intersection enters the no-walk waiting state, that is, all the green lights are off and the red lights are on, and the digital tube counts down from 3s, and the yellow light starts to flash for 3s; when the countdown is again 0s, the yellow light flashes, the east-west direction digital tube starts from The countdown starts at 18s, and at the same time the north-south direction is on, the green light is turned on, and the rest are red lights, and the digital tube counts down from 15s, looping in this way.

2.2, manual control mode

1) When the system is working in automatic mode, if the manual control button that is currently conducting is pressed, the system will directly enter the conducting state, and the LEDs in the north-south and east-west directions will display 99; if it is pressed, it is not currently being When the manual control button is in the on state, the system will count down the current on state with a yellow light flashing for 3s. When the countdown is over, the system will enter the on state of the pressed key, at the same time in the north-south and east-west directions All the digital tubes display 99; at this time, when the other manual control keys are pressed, the system will enter the on state of the pressed key.

2) When the system is working in manual mode, if the automatic control button is pressed, the system will count down the current state with a yellow light flashing for 3 seconds. When the countdown is over, the system will enter the initial automatic control mode.

3) When the system is working, if the system is connected in the north-south direction, the crosswalk in the north-south direction is connected, and people can cross the crosswalk in the east-west direction through the crosswalk. Similarly, if the system is connected in the east-west direction, At this time, the crosswalk in the east-west direction is open, and people can cross the crosswalk in the north of Vietnam through the crosswalk.

3. Proteus simulation design

The system hardware design and software design are combined and simulated through the Proteus software. The program code is edited and compiled by Keil to generate a HEX file, and then the program is loaded by clicking on the microcontroller to realize the combined simulation of the hardware and the program. The system simulation result is shown in Figure 2.

  

Figure 2 Simulation results based on Proteus and Keil

The traffic light control system designed in this paper uses the microcontroller STC89S52 as the main controller, uses Proteus software to draw the hardware circuit, uses Keil to program, and then performs integrated simulation to achieve the predetermined function. This system is in each road, namely, north-south and east-west directions. There are three traffic lights for control, namely, left turn traffic lights, straight traffic lights, right traffic lights, and three traffic lights in each direction run at the same time. In addition, the system is also equipped with automatic and manual modes. Choose, under normal circumstances, the system runs in an automatic state. If the traffic police is running during peak hours, the traffic police will clear the system. At this time, the traffic police can switch the system to manual mode to clear the traffic. It is especially suitable for hot weather. And bad weather conditions such as rainy and cloudy. This system has strong practicability, relatively simple operation, strong expansion function, low cost, low power consumption, and has a very broad application prospect.

The above is the “circuit simulation software” related content brought by this editor. Through this article, I hope everyone has a certain understanding of the content introduced in this article. If you like this article, you might as well continue to pay attention to our website, the editor will bring more exciting content later. Finally, thank you all for reading, have a nice day!

The Links:   7MBR100U4B120 PAF600F280-12