Professional Documents
Culture Documents
Poject Report of ES LAB
Poject Report of ES LAB
Language C++
INTRODUCTION
The interesting thing about our project is 4 way traffic signal system. In the ever fast-growing
world of business and technology today. There has become an increasing column of vehicles
on every road in different place of the world_ Traffic control light has become a very effective
tool for sequential control of the teaming number of vehicles on the road to avert what would
have been a recurrent saga of ghastly accidents at the junctions. There have been many ways
of achieving this: uppermost among these being the employment of electronic monitoring
circuits that which is controlled by presto clock.
In developed countries: the employment of traffic personnel’s •who would be jumped up and
down at the centers of the junction just for the motorists to acknowledge their rigorous signs
has long come of age. In developing countries where 24 hours traffic flow is Involved: many
societies are adopting the usage of the traffic light control_ The advantage offered by this
method of traffic control cannot be over emphasized. For one: it offers a more advanced
technology that IS less prone to miscalculation and its regrettable occurrence. They stand out
better at night: then offer illumination to the Immediate surroundings which become important
for security purpose and m general add to there entire aesthetic beauty of night life.
The technology behind the design may vary from place to place: but the fact remains that in all
cases an electronic (logic) circuit is made to control a power circuit. The electronic logic circuit
is normally composed of the basic digital components of electronic design •which includes
oscillators.
`
AIM OF THE PROJECT
Going by the rapid advancement in technology all over the world: the need for better ways of
solvmg a problem keep cornmg up every day. Necessity is the mother of Invention_ It has
become Imperative for societies: companies: industries: business ventures: clubs etc to offer
24 hour service: hence thereby has to be a way of controllmg the teaming column of vehicles
which convey both individuals and goods to different destmatlons of that type. The most
elegant way of directing the motorists IS by the use of tramc light control. This type of control
serves a dual
purpose. In the day type it directs the vehicles: whereas it turns out to additionally illuminating
the environment in the night: so that at very far distance: its effect is noticeably felt: conveying
Its message to an oncommg vehicle very far from the pomt_
The project is therefore aimed at building a prototype four-way traffic light control circuitry.
Circuit Diagram
Circuit Daigram
void main(void)
{
{
red1=1; //Initially we start with IVth signal put red light as 1 for remaining
three directions
red2=1;
red3=1;
green4=1; //put the value of green light of traffic signal four as 1
yellow4=0;
red4=0;
{
for(i=0;i<=60000;i++); // the loop will executed for 60000 times to generate delay.
for(i=0;i<=60000;i++); // repeat the loop because we can not go beyond 65536
by defining unsigned int
}
green4=0; //now put green4 as 0
yellow4=1; // yellow4 willbe now 1
{
for(i=0;i<=40000;i++); //put value of red4 as 1
for(i=0;i<=40000;i++); // Delay of 40000 is created
}
yellow4=0; // now put value of yellow 4 as 0
red4=1; // now put value of red4 as 1
red3=0; // put value of red3 as 0
green3=1;
{
for(i=0;i<=60000;i++); // Delay of 60000 is created
for(i=0;i<=60000;i++); // Delay of 60000 is created
}
green3=0; // put green3 OFF
yellow3=1; //Yellow 3 ON
{
for(i=0;i<=40000;i++); // Delay of 40000 is created
for(i=0;i<=40000;i++);
}
yellow3=0; // put yellow 3 OFF
red3=1;
red1=0; // put red 3 On
green1=1; // put green1 ON
{
for(i=0;i<=60000;i++); // Delay of 60000 is created
for(i=0;i<=60000;i++);
}
green1=0; //put green 1 OFF
yellow1=1; // put yellow 1 ON
{
for(i=0;i<=40000;i++);
for(i=0;i<=40000;i++); //Delay of 40000 is created
}
yellow1=0; // PUT Yellow1 OFF, red 1 ON, Red 2 OFF, Green 2
ON
red1=1;
red2=0;
green2=1;
{
for(i=0;i<=60000;i++); //Delay of 60000 is created
for(i=0;i<=60000;i++);
}
green2=0; //put green 2 OFF Yellow 2 ON
yellow2=1;
{
for(i=0;i<=40000;i++); // Delay of 40000 is created
for(i=0;i<=40000;i++);
}
yellow2=0; // put yellow2 OFF red2 ON
red2=1;
}
}
Ardeno Code
Source Code:
int Lane1[] = {13,12,11}; // Lane 1 Red, Yellow and Green
int Lane2[] = {10,9,8};// Lane 2 Red, Yellow and Green
int Lane3[] = {7,6,5};// Lane 3 Red, Yellow and Green
int Lane4[] = {4,3,2};// Lane 4 Red, Yellow and Green
void setup()
{
for (int i = 0; i < 3; i++)
{
pinMode(Lane1[i], OUTPUT);
pinMode(Lane2[i], OUTPUT);
pinMode(Lane3[i], OUTPUT);
pinMode(Lane4[i], OUTPUT);
}
for (int i = 0; i < 3; i++)
{
digitalWrite(Lane1[i], LOW);
digitalWrite(Lane2[i], LOW);
digitalWrite(Lane3[i], LOW);
digitalWrite(Lane4[i], LOW);
}
void loop()
{
digitalWrite(Lane1[2], HIGH);
digitalWrite(Lane3[0], HIGH);
digitalWrite(Lane4[0], HIGH);
digitalWrite(Lane2[0], HIGH);
delay(7000);
digitalWrite(Lane1[2], LOW);
digitalWrite(Lane3[0], LOW);
digitalWrite(Lane1[1], HIGH);
digitalWrite(Lane3[1], HIGH);
delay(3000);
digitalWrite(Lane1[1], LOW);
digitalWrite(Lane3[1], LOW);
digitalWrite(Lane1[0], HIGH);
digitalWrite(Lane3[2], HIGH);
delay(7000);
digitalWrite(Lane3[2], LOW);
digitalWrite(Lane4[0], LOW);
digitalWrite(Lane3[1], HIGH);
digitalWrite(Lane4[1], HIGH);
delay(3000);
digitalWrite(Lane3[1], LOW);
digitalWrite(Lane4[1], LOW);
digitalWrite(Lane3[0], HIGH);
digitalWrite(Lane4[2], HIGH);
delay(7000);
digitalWrite(Lane4[2], LOW);
digitalWrite(Lane2[0], LOW);
digitalWrite(Lane4[1], HIGH);
digitalWrite(Lane2[1], HIGH);
delay(3000);
digitalWrite(Lane4[1], LOW);
digitalWrite(Lane2[1], LOW);
digitalWrite(Lane4[0], HIGH);
digitalWrite(Lane2[2], HIGH);
delay(7000);
digitalWrite(Lane1[0], LOW);
digitalWrite(Lane2[2], LOW);
digitalWrite(Lane1[1], HIGH);
digitalWrite(Lane2[1], HIGH);
delay(3000);
digitalWrite(Lane2[1], LOW);
digitalWrite(Lane1[1], LOW);
}
The End