Trafficlightcontrol
Trafficlightcontrol
on
Presented by:
Omkar Sanjay Chaudhari
Problem:
The traffic lights should provide instructions to the users
(drivers and pedestrians) by displaying lights of standard
colours, using Arduino.
Proposed Solution:
We can use Arduino UNO to solve the problem as mentioned
above. An algorithm can be developed using this
microcontroller along with LEDs of Red, Yellow and Green
colour to demonstrate.
Arduino UNO:
The Arduino Uno is an open-source microcontroller
board based on the Microchip ATmega328P
microcontroller and developed by Arduino.cc. The board
is equipped with sets of digital and analog input/output
pins that may be interfaced to various expansion boards
(shields) and other circuits. The board has 14 digital I/O
pins (six capable of PWM output), 6 analog I/O pins, and
is programmable with the Arduino IDE (Integrated
Development Environment), via a type B USB cable. It
accepts voltages between 7 and 20 volts.
Arrangement of Traffic lights:
1. In the solution worked out here the traffic lights are
arranged in 4 different directions i.e. North, South,
East and West respectively.
2. Each traffic light consists of three different LEDs
i.e. Red, Yellow and Green respectively. In total
there are 12 LEDs that are used.
3. The LEDs connected here are in common cathode
configuration i.e. all the cathodes of LEDs are
connected together and then are connected to
ground.
4. The 12 LEDs are connected to the digital I/O pins of
the Arduino UNO Board.
5. The digital pins are declared as the output pins.
6. Here, the algorithm is simulated using ISIS Proteus
Professional.
Algorithm
1. In this, first the West gets its Green light turned. Hence,
in all the other Lanes, their corresponding Red lights are
turned on.
2. After a time delay of predefined time say 5 seconds, the
Green light in the North must be turned on and the Green
light in the West must be turned off.
3. As a warning indicator, the yellow light in the North is
also turned as an indication that the green light about to
be turned on.
4. The yellow lights in North are turned for a small duration
say 2 seconds after which the red light in the West is
turned on and green light in North is also turned on.
5. The green light in North is also turned on for a
predefined time and the process moves forward to East
and finally South.
6. The system then loops back to Lane 1 where the process
mentioned above will be repeated all over again.
Simulation:
Arduino IDE Program Code: