Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
191 views

Automatic Traffic Light Control Using

This document describes a project report on an automatic traffic light control system developed by students at Jimma University in Ethiopia. The report provides background on traffic light technology, outlines the objectives and problem statement of the project, reviews relevant literature, and describes the methodology, circuit design, code, and results of the system. The system uses a microcontroller and sensors to automatically control traffic lights based on vehicle detection, aiming to minimize wait times and improve traffic flow.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
191 views

Automatic Traffic Light Control Using

This document describes a project report on an automatic traffic light control system developed by students at Jimma University in Ethiopia. The report provides background on traffic light technology, outlines the objectives and problem statement of the project, reviews relevant literature, and describes the methodology, circuit design, code, and results of the system. The system uses a microcontroller and sensors to automatically control traffic lights based on vehicle detection, aiming to minimize wait times and improve traffic flow.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

Jimma University

Jimma University Institute


of Technology
Department of Electrical and Computer
Engineering
Cbtp phase 4
Project Report on Automatic Traffic Light Control
System

Advisor: Parashnath
By ID.no
1. Munir Nesru 04902/06
2. Tilahun wondifraw 05198/06
3. Weldeyesus Belayneh 05238/06
4. Teblet asaye T07134/06
5. Yitbarek Gossaye 05299/06
6. Tsigedengle Ayalneh 05220/06

January, 2017
January, 2017
Acknowledgment

Firstly we offer millions of thanks to almighty God, Who has


given us strength to complete of this project successfully. At the
very beginning, we would like to express our immense gratitude
and delightful thanks to our supervisor Mr. Parshnath, and
Electrical and computer engineering department for giving us
an opportunity to work on this topic, in which we found interest
compared convention course work. Our respect is also due to
him for his wisdom, guidance, supervision and faithful
discussion with us throughout the work. He not only agrees to
supervise the project wholeheartedly, but from the beginning of
our study here, he supported us with incessant generosity.
Finally big thanks to our parents to our family and friends for
their invaluable encouragement and support all the way.

i
Table of content
Contents page
Acknowledgment ........................................................................................ i
Table of content ......................................................................................... ii
List of figures ............................................................................................ iv
List of Tables ............................................................................................ iv
Abbreviations ............................................................................................ iv
Abstract ...................................................................................................... v
Chapter 1 .................................................................................................... 1
1.1 Introduction ..................................................................................... 1
1.2 Background ...................................................................................... 2
1.2.1 The Origin of the Green, Yellow, and Red Color Scheme for
Traffic Lights ..................................................................................... 2
1.2.2 Microcontrollers ....................................................................... 3
1.2.3 Vehicle detectors ..................................................................... 5
1.3 Objective .......................................................................................... 6
1.3.1 Main Objective ......................................................................... 6
1.3.2 Specific Objective .................................................................... 6
1.4 Statement of problem....................................................................... 6
Chapter 2 .................................................................................................... 7
2.1 Literature review.............................................................................. 7
2.1.1 Microcontroller as the main controlling element, and led’s as
the indication of light......................................................................... 7
Chapter 3 .................................................................................................... 8
3.1 Methodology .................................................................................... 8
3.2 Block Diagram of Automatic traffic light control system .............. 8
3.3 A framework for dynamic and automatic traffic light control expert
............................................................................................................... 9
Chapter 4 .................................................................................................. 11

ii
4.1 Simulation Circuit Diagram .......................................................... 11
4.2. Power Supply Circuit Design ....................................................... 12
4.3. C code ........................................................................................... 12
4.4. Simulation Result.......................................................................... 23
Chapter 5 .................................................................................................. 24
5.1 Conclusion and Recommendation ..................................................... 24
5.1.1 Conclusion .............................................................................. 24
5.1.2 Recommendation .................................................................... 24
References ................................................................................................ 25

iii
List of figures

Figure 1. Intel 8051 microcontroller and its internal


architecture...............................................................................................4
Figure 2. Vehicle Detection System.........................................................6
Fig 3 block diagram of automatic traffic light control system.................8
Figure 4. a framework for dynamic and automatic traffic light control
expert systems…………………………………………………………..9
Figure 5. Simulation circuit diagram of ATLC.......................................11
Figure 6. Power supply circuit diagram of ATLC……………………..12
Figure 7. Flow of traffic in all possible .directions.................................23

List of Tables

Table 1.Simultaneous state of signals for all the traffic ........................ 23

Abbreviations
LED Light emitting Diode
ATLC Automatic traffic light controller
GIRIET Gokaraju Rangaraju Institute OF Engineering & Tec
RFID Radio Frequency Identification Reader
IR Infrared
DVD Digital Versatile Disc
RAM Random Access memory
ROM Read Only Memory
I/O Input Output
RF Radio Frequency

iv
Abstract

Automatic traffic light control System helps to minimize waiting


times of road users. This project is mainly concerned on
improving Traffic Light Controllers that are based on
microcontroller and microprocessor due to some limitations
because it uses the pre-defined hardware, which is functioning
according to the program that does not have the flexibility of
modification on real time basis. Due to the fixed time intervals of
green, orange and red signals the waiting time is more and car
uses more fuel.
To make traffic light controlling more efficient, we exploit the
emergence of new technique called as “Automatic traffic light
controller”. This makes the called as “Automatic traffic light
controller”. The timings of Red, Green, and Yellow lights at each
crossing of road will be automatically decided based on the total
traffic on all adjacent roads. Thus, optimization of traffic light
switching increases road capacity and traffic flow, and can
prevent traffic congestions.

v
Chapter 1

1.1 Introduction

Fast transportation systems and rapid transit systems are nerves of


economic developments for any nation.
Traffic congestion is a severe problem in many modern cities around the
world which results in long waiting times, loss of fuel and money. It is
causing many critical problems and challenges in the major and most
populated cities. Traveling between different places within the city is
becoming more difficult for the travelers in traffic. Due to these congestion
problems, people lose time, miss opportunities, and get frustrated, and also
companies are facing with lower productivity from workers, trade
opportunities which results a delivery gets delayed, and thereby the costs
goes on increasing.
The only disadvantage of making new roads on facilities is that it makes
the surroundings more congested. So for that reason we need to change the
system rather than making new infrastructure twice. Therefore many
countries are working to manage their existing transportation systems to
improve mobility, safety and traffic flows in order to reduce the demand of
vehicle use.
It is therefore utmost necessary to have a fast, economical and efficient
traffic control system for national development. Traffic research has the
goal to optimize traffic flow of people and goods. As the number of road
users constantly increases, and resources provided by current
infrastructures are limited, intelligent control of traffic will become a very
important issue in the future. The project uses simple Electronic
components such as TRAFFIC LIGHT indicator, SWITCHES as IR
sensors, op-amps, and a MICROCONTROLLER for auto change of signal
after a pre-specified time interval. Microcontroller 8051 is the brain of the
project which initiates the traffic signal at a junction. The traffic light
indicators are automatically on and off by making the corresponding port
pin of the micro controller high.

1
1.2 Background

1.2.1 The Origin of the Green, Yellow, and Red Color Scheme for
Traffic Lights

This color scheme derives from a system used by the railroad industry
since the 1830s. At this time, railroad companies developed a lighted
means to let train engineers know when to stop or go, with different
lighted colors representing different actions. They chose red as the color
for stop, it is thought, because red has for centuries been used to indicate
danger. For the other colors, they chose white as the color for go and
green as the color for caution.
In 1920 in Detroit Michigan, a policeman named William L. Potts
invented the four-way, three-color traffic signal using all three of the colors
now used in the railroad system. Thus, Detroit became the first to use the
red, green, and yellow lights to control road traffic. Many inventors
continued to come up with different designs for traffic signals, some
adopting the red, yellow, green color scheme and some not. Most usually
needed a person to push a button or flip a switch to change the light. As
you might expect, this man-power intensive way to change the lights
proved costly.
In the late 1920s, several “automatic” signals were invented. The first ones
used the simple method of changing the lights at specific timed intervals.
However, the drawback of having some vehicles stopped when there were
no cars going in the other direction annoyed people. A less annoying
automatic signal was invented by Henry A. Haugh. This system used two
metal strips that sensed pressure. When a passing car pushed the two strips
together, the light would soon change to allow that car to go. All of these
different types of lighting systems began to cause a problem. Drivers could
drive through different areas and encounter several different types of
systems, causing confusion and frustration. So, in 1935, the
Federal Highway Administration created “The Manual on Uniform Traffic
Control Devices.” This document set uniform standards for all traffic
signals and road signs.

2
1.2.2 Microcontrollers

The microcontroller incorporates all the features that are found in


microprocessor. The microcontroller has built in ROM, RAM, Input Output
ports, Serial Port, timers, interrupts and clock circuit. A microcontroller is an
entire computer manufactured on a single chip. Microcontrollers are usually
dedicated devices embedded within an application. For example,
microcontrollers are used as engine controllers in automobiles and as
exposure and focus controllers in cameras. In order to serve these
applications, they have a high concentration of on-chip facilities such as
serial ports, parallel input output ports, timers, counters, interrupt control,
analog-to-digital converters, random access memory, read only memory, etc.
The I/O, memory, and on-chip peripherals of a microcontroller are selected
depending on the specifics of the target application. Since microcontrollers
are powerful digital processors, the degree of control and programmability
they provide significantly enhances the effectiveness of the application. The
8051 is the first microcontroller of the MCS-51 family introduced by Intel
Corporation at the end of the 1970s. The 8051 family with its many enhanced
members enjoys the largest market share, estimated to be about 40%, among
the various microcontroller architectures. The microcontroller has on chip
peripheral devices. Microcontroller may be called computer on chip since it
has basic features of microprocessor with internal ROM, RAM, Parallel and
serial ports within single chip. Or we can say microprocessor with memory
and ports is called as microcontroller. This is widely used in washing
machines, vcd player, microwave oven, and robotics or in industries.

3
Figure 1 - Intel 8051 microcontroller and its internal architecture

1.2.2.1 Criteria for selecting microcontroller in embedded system

(a) Meeting the computing needs of task at hand efficiently and cost
effectively
 Speed of operation
 Packing
 Power consumption
 Amount of RAM and ROM on chip
 No. of I/O pins and timers on chip
 Cost

(b) Availability of software development tools such as compiler,


assembler, and debugger.

4
1.2.3 Vehicle detectors

There is a wide range of sensor technologies available for vehicle


detectors. IR sensor technologies are among them.

1.2.3.1 Infrared Detectors

There are two types of infrared (IR) detectors, active and passive.
Active infrared sensors operate by transmitting energy from either a
light emitting diode (LED) or a laser diode. An LED is used for a non-
imaging active IR detector, and a laser diode is used for an imaging
active IR detector. In both types of detectors the LED or laser diode
illuminates the target, and the reflected energy is focused onto a detector
consisting of a pixel or an array of pixels. The measured data is then
processed using various signal-processing algorithms to extract the
desired information. Active IR detectors provide count, presence, speed,
and occupancy data in both night and day operation. The laser diode type
can also be used for vehicle classification because it provides vehicle
profile and shape data.
A passive infrared system detects energy emitted by objects in the field
of view and may use signal-processing algorithms to extract the desired
information. It does not emit any energy of its own for the purposes of
detection. Passive infrared systems can detect presence, occupancy, and
count.
Some of the advantages of infrared detectors are that they can be
operated during both day and night, and they can be mounted in both
side and overhead configurations. Disadvantages are that infrared
detectors can be sensitive to inclement weather conditions and ambient
light. The choice of detector materials and construction of the system,
as well as sophisticated signal processing algorithms, can compensate
for the disadvantages.

5
Figure 2 - Vehicle Detection System
1.3 Objective

1.3.1 Main Objective

The objective of this project is to construct Automatic Traffic light control


system using IR sensors.

1.3.2 Specific Objective

 Solve unnecessary waiting time for vehicles.


 Finally, implement the proposed system in MULTISM.

1.4 Statement of problem

Growing numbers of road users and the limited resources provided by


current infrastructures lead to ever increasing traveling times. The
Intelligent Traffic Light Control project aims at diminishing waiting times
of traffic lights in a city.
Traffic in a city is very much affected by traffic light controllers. When
waiting for a traffic light, the driver loses time and the car uses fuel. Hence,
reducing waiting times before traffic lights can save cost expense in billions
annually.

6
Chapter 2

2.1 Literature review

Traffic Management on the road has become a severe problem of today’s


society. An efficient traffic management techniques are needed to reduce
waiting and traveling times, save fuel and money. In order to alleviate the
problem, approaches have been suggested in the literature [2] along with
its merits and demerits.
Traffic Light Controller using an expert system uses a set of given rules
to decide upon the next action. In traffic light control, such an action can
change some of the control parameters.

2.1.1 Microcontroller as the main controlling element, and led’s as


the indication of light

Five students from GIRIET describes microcontroller based traffic light


controller [3], main controlling element as microcontroller and led’s as the
indication of light. They were able interface and program the
microcontroller by adjusting to meet timing for traffic conditions. But due
to its fixed intervals of traffic lights signals and its centralized control of
traffic signals it was unable to solve traffic congestions in advance. In this
project, we are implementing to solve this problem based on traffic density
on the roads.

7
Chapter 3

3.1 Methodology

We covered those methodologies listed below:

Literature was reviewed to explore the problem and possible


solutions.

The proposed model is implemented and simulated on MULTISM


14 environment.

3.2 Block Diagram of Automatic traffic light control system

Fig 3 block diagram of automatic traffic light control system


8
3.3 A framework for dynamic and automatic traffic light control expert
systems

Figure 4. Framework for dynamic and automatic traffic light control expert systems.
A
In this system, the radio frequency identification reader (RFID) reader detects
a RF-ACTIVE code at 1024 MHz from the active tag pasted on the car. The
active tag has a battery, which is inbuilt inside it, so that it can periodically
and actively transmit messages stored in the tag. As soon as the data is
received, the reader will save all information in the PDA. When the PDA
accumulates the required amount of data, it will use its wireless card and
connect to the backend server and store them in to the database in the server.
Now the server uses the data stored in the database to calculate maximum
flow, inter arrival time and average car speed. When all possible congestion
roads and car speed are collected, then these data would be used as the input
parameters of the traffic light control simulation model in the server. After
getting the simulation results, the system is able to automatically give
different alternatives in terms of varieties of traffic situations and then the
red light or green light duration is being set via a traffic light control interface
for improving the traffic congestion problems. All the rules and reasoning
9
are used in the IF-THEN format. The system is using the forward chaining
approach, which is a data driven approach, starting from a basic idea and then
tries to draw conclusions. The simulation model running in this system give
three optimal alternatives; the best, second and third best traffic light
duration. The system uses these alternatives as well as the collected data to
choose the best and the most suitable solution for that particular traffic
congestion situation.

10
Chapter 4

4.1 Simulation Circuit Diagram

Figure 5 - Simulation circuit diagram of ATLC (with component microcontroller


8051, various size of op amps, single light display and switches)

11
4.2. Power Supply Circuit Design

Figure 6- Power supply circuit diagram of ATLC

4.3. C code
#include<stdio.h>
#include<htc.h>
void main()
{
unsigned int m,j;
P1=0x00;
P0=0x00;
P2=0xff;
P3=0xff;
while(1)
{

m=2; // step 1: S to W Green Others Red


P1=0x09;

P0=0x21;

12
j=m*100;

While (j! =0)

if(P30==0)

While (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x09;
P0=0x21;
}

J--;

if (P35==0) // delay will be increased whenever the traffic density of South direction is high
{

j=m*100; while (j! =0)

if (P30==0)

While (P30==0)

{
P1=0x09;
13
P0=0x09;
}
P1=0x09;
P0=0x21;
}
j--;
}
}

m=4; // step 2: N-S, S-N Green Others Red

P1=0x0c;

P0=0x21;

j=m*100;

while(j!=0)

if(P30==0)

while(P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x0c;
P0=0x21;
}

j--; }

if(P34==0||P35==0) // delay will be increased whenever the traffic density of N-S direction is high

14
{

j=m*100; while(j!=0)

{
if(P30==0)
{
while(P30==0)
{
P1=0x09;
P0=0x09;
}
P1=0x0c;
P0=0x21;
}
j--;
}
}
m=1; // step 3: N-S Green, S-N Yellow, Others Red
P1=0x0c;

P0=0x11;
j=m*100;
while(j!=0)

if(P30==0)

while(P30==0)

{
P1=0x09;
P0=0x09;
}

15
P1=0x0c;
P0=0x11;
}
j--; }
if(P34==0||P35==0) // delay will be increased whenever the traffic density of N-S direction is high
{

j=m*100; while(j!=0)

if(P30==0)

while(P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x0c;
P0=0x11;
}
j--;
}
} m=2; // step 4: N to E Green Others
Red

P1=0x0c;

P0=0x09; j=m*100;

while(j!=0)

if(P30==0)

16
{

while(P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x0c;
P0=0x09;
}

j--; }

if(P34==0) // delay will be increased whenever the traffic density of North direction is high

j=m*100;

while(j!=0)

if(P30==0)

{
while(P30==0)
{
P1=0x09;
P0=0x09;
}
P1=0x0c;
P0=0x09;
}
j--;
}
} m=2; // step 5: W to N Green others Red

P1=0x21;

17
P0=0x09;

j=m*100;

while(j!=0)

{ if(P30==0)

while(P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x21;
P0=0x09;
}
j--;
}

if(P23==0) // delay will be increased whenever the traffic density of West direction is high

j=m*100;

while(j!=0)

if(P30==0)

while(P30==0)

{
P1=0x09;
18
P0=0x09;
}
P1=0x21;
P0=0x09; j--; }
}

m=4; // step 6: E-W, W-E Green Others Red

P1=0x21;

P0=0x0c;

j=m*100;

while(j!=0)

if (P30==0)

while (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x21;
P0=0x0c;
}
j--;
}

if(P23==0||P21==0) // delay will be increased whenever the traffic density of E-W direction is high
{

j=m*100;

While (j! =0)

19
{

if (P30==0)

{
while(P30==0)
P1=0x09;
P0=0x09;
}
P1=0x21;
P0=0x0c;
}
j--; }
}
m=1; // step 7: E-W Green, W-E Yellow Others Red
P1=0x11;

P0=0x0c;

j=m*100;

while(j! =0)

if(P30==0)

While (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x21;
P0=0x0c;

20
j--;
}
if (P23==0||P21==0) // delay will be increased whenever the traffic density of E-W direction is high

j=m*100;

while(j!=0)

if (P30==0)

While (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x21;
P0=0x0c;
}
j--; }
}

m=2; // step 8: E to S Green others Red


P1=0x09;

P0=0x0c;

j=m*100;

while(j!=0)
21
{

if (P30==0)

While (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x09;
P0=0x0c;
}

j--; }

if (P21==0) // delay will be increased whenever the traffic density of East direction is high
{

j=m*100; while (j! =0)

{if (P30==0)

While (P30==0)

{
P1=0x09;
P0=0x09;
}
P1=0x09;
P0=0x0c;
} j--;
}
}

22
4.4. Simulation Result

 Results include the successful operation of the intelligent traffic


light controller.

Figure 7 - Flow of traffic in all possible directions

Table 1- simultaneous state of signals for all the traffic

23
Chapter 5

5.1 Conclusion and Recommendation

5.1.1 Conclusion

In this project we have studied the optimization of traffic light controller


in a City using IR sensors and microcontroller. Figure 5 shows simulation
circuit diagram. By using this system configuration we are able to reduce
the possibilities of traffic jams caused by traffic lights. Number of passing
vehicles in the fixed time slot on the road decide the density range of
traffics and on the basis of vehicle count microcontroller decide the traffic
light delays.

5.1.2 Recommendation

In future this system can be extended to record traffic light delays. The
recorded data can be downloaded to the computer through communication
between microcontroller and the computer. The Administrator sitting on
computer can command system (microcontroller) to download recorded
data, update light delays, erase memory, etc. Thus administrator on a
central station computer can access traffic conditions on any approachable
traffic lights and nearby roads to reduce traffic congestions to an extent.

24
References
[1] Zakopur, F. (MARCH 2012). International Journal of Advanced Technology & Engineering
Research (IJATER), VOLUME 2,(ISSUE 2), 32-33. Retrieved from
http://www.ijater.com/Files/IJATER_03_06.pdf

[2](2012, 02 23). Retrieved from Digi-key corporation:


http://www.digikey.com/en/articles/techzone/2012/feb/using-infrared-technology-for-sensing

[3](2010 – 2011). PROJECT REPORT ON MICRO CONTROLLER BASED TRAFFIC LIGHT CONTROLLER.
Retrieved from http://grietinfo.in/projects/MINI/EEE/DOC-A.7-TLC%20report.pdf

25

You might also like