0% found this document useful (0 votes)
74 views

Traffic Light Control System

This project describes an Arduino-based traffic light control system. It uses Arduino Uno, LEDs to represent traffic lights for 3 roads, and a 7-segment display for countdown timing. The system cycles through activating the green light for each road for 9 seconds, followed by the yellow light for both roads for 4 seconds, and then moves to the next road, repeating in a loop.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
74 views

Traffic Light Control System

This project describes an Arduino-based traffic light control system. It uses Arduino Uno, LEDs to represent traffic lights for 3 roads, and a 7-segment display for countdown timing. The system cycles through activating the green light for each road for 9 seconds, followed by the yellow light for both roads for 4 seconds, and then moves to the next road, repeating in a loop.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Traffic Light Control System

Circuit Design and its function :

This is a project based on a real life traffic control system. It is not the real one but this project
gives us an idea about traffic light controlling systems.

For this project I use,


- Arduino Uno R3
- LEDs (3 green, 3 yellow, 3 red)
- 7-segment display
- Resistors (x30)
- Ground.

At the beginning the green LED of road-1 will be active and in other two roads the red LED will
be active. This condition will stay until the 7-segment display counts 9 to 0.

After this countdown, yellow LEDs on road-1 and road-2 will be activated. This condition will be
active until the 7-segment display counts from 4 to 0. At the same time the red led in road-3 will
stay active.

After that the green LED of road-2 will be active and this condition will continue until the 7-
segment display counts from 9 to 0.

After this countdown, yellow LEDs on road-2 and road-3 will be activated. This condition will be
active until the 7-segment display counts from 4 to 0. At the same time the red led in road-3 will
stay active.

After that the green LED of road-3 will be active and this condition will continue until the 7-
segment display counts from 9 to 0.

After this countdown, yellow LEDs on road-3 and road-1 will be activated. This condition will be
active until the 7-segment display counts from 4 to 0. At the same time the red led in road-2 will
stay active.

Then the green LED of road-1 will be active again.


This whole thing will continue as a loop.

Codding :

First, select the pins for 7-segment display and for LEDs

Then in void setup I declare that all pins are for OUTPUT.
Inside void loop,

Here is the code when road-1 is active and road-2 and road-3 are not active. This will continue
until the 7-segment display count 9 to 0.

Code when yellow LED is active on road-1 and road-2. This will continue until the 7-segment
display count 4 to 0.
Then the green LED of road-2 will be active and the other two road red LEDs will be active.

Yellow LEDs are active on road-2 and road-3. This will continue until the 7-segment display
count 4 to 0.
Then the green LED of road-3 will be active. In road-1 and road-2 red LEDs will be active.

Then yellow LEDs are active on road-3 and road-1. This will continue until the 7-segment
display count 4 to 0.
Then the green LED of road-1 will be active again and the whole code will be run sequentially
as a loop.

You might also like