Sunday 29 December 2019

Arduino - Double Traffic Lights

This project is helping us to form the traffic lights at a junction where various traffic lights have to be used. For experiment, we have simulated operation of two traffic lights. A video clip demonstrating and explaining the function of traffic lights is taken from the YouTube channel - N. A Masters.

This project basically has two red lights, two yellow lights and two green lights, named red1 and red2, yellow 1 and yellow 2, and green1 and green2. When the project starts the yellow1 and yellow2 turn on for 3 seconds. Then the red1and green2 turn on for three seconds where it is expected that the cars near red1 need to wait, while the cars near the green2 two can go. And then the yellows turn on again for three seconds. Finally, the red2 and green1 turn on for three seconds where the cars near green1 can go, but the cars near red2 need to wait.


The circuit diagram for the project is given below.

The Arduino program for getting the above behavior is given below.