You are on page 1of 34

A Project Report

on
DENSITY BASED TRAFFIC LIGHT
CONTROL SYSTEM

Submitted BY
1. PRABHAKAR SINGH
(T80223101)
2. ROSHAN KUMAR
(T80223117)
3. SHAILENDER SINGH
(T80223124)
Under the Guidance Of

Prof. VIJAY KARRA


For the partial fulfillment of
DEPARTMENT OF ELECTRONICS &
TELECOMMUNICATION

ARMY INSTITUTE OF TECHNOLOGY

DIGHI HILLS, PUNE-411015


2013 -2014
Under
University of Pune

Certificate

This is to certify that

1. PRABHAKAR SINGH (T80223101)

2. ROSHAN KUMAR (T80223117)

3. SHAILENDER SINGH (T80223124)

have successfully submitted the report on “DENSITY


BASED TRAFFIC LIGHT CONTROL SYSTEM ” during the
academic year 2013-2014 in the partial fulfillment of Third
year in Electronics & Telecommunication under University of
Pune.

Head of Department
Project Guide

2
(Dr. B P PATIL) (Prof. VIJAY KARRA)

ACKNOWLEDGEMENT

Before getting into the thick of the things, we would like


to express our deep gratitude to the people who helped us
during the course of this project. We are grateful to our
project guide Prof. VIJAY KARRA for his guidance
throughout this project research and work.

We also wish to thank all the faculty members of


Electronics & Telecommunication and our respectable Head
of Department Prof. B P PATIL for their constant help and
efficient teaching procedures.

Names of students:

3
PRABHAKAR SINGH

SHAILENDER SINGH

ROSHAN KUMAR

INDEX
Topics
Page

 Abstract 5

 Introduction 6

 Aim 7

 Methodology 8

 Literature review 10

 Block diagram 11

 Hardware components 12

 Arduino 14

 IR Sensors 19

 7 segment display 22

4
 LED's 27

 Future scope 29

 Conclusion 31

 Bibliography 32

ABSTRACT

Vehicular traffic at intersecting streets is typically


controlled by traffic control lights. The function of traffic
lights requires sophisticated control and coordination to
ensure that traffic moves as smoothly and safely as possible.

In recent days electro-mechanical controllers are replaced


by electronic circuits. The accuracy & fault tolerant drive
towards electronic circuits.

This project is developed to meet the requirements of

solid state traffic light controller by adopting microcontroller

as the main controlling element, and led’s as the indication

5
of light. A micro controller is interfaced to led’s provide for

centralized control of the traffic signals. Microcontroller is

programmed in such a way to adjust their timing and

phasing to meet changing traffic conditions. The circuit

besides being reliable and compact is also cost effective.

INTRODUCTION

Traffic congestion is a severe problem in many modern cities


around the world. Traffic congestion has been causing many
critical problems and challenges in the major and most
populated cities. To travel to different places within the city
is becoming more difficult for the travelers in traffic. Due to
these congestion problems, people lose time, MANY TIMES
THEIR LIVES TOO miss opportunities, and get frustrated.
Traffic congestion directly impacts the companies. Due to
traffic congestions there is a loss in productivity from
workers, trade opportunities are lost, delivery gets delayed,
and thereby the costs goes on increasing.
The heart of our project is the microcontroller which will
provide the controlling of the traffic depending upon the
density in each junction. In this project we use IR
communication to analyze traffic density. The IR rays are
continuously transmitted and received by the IR transmitter
and IR receiver respectively.

6
Whenever discontinuity occurs in this process, the
microcontroller senses the result, compares it with all the
four junctions and shows the green signal for longer time
period (where the traffic density is heavy) while the red
signal is shown to the other three roads.

AIM OF THE PROJECT :

The main aim of the project is to reduce and in


fact eliminate the traffic density problems
especially in metropolitan cities during busy
hours.
The present day signaling process is a timed
process i.e. the signaling of the junctions is for
same amount of time in all the four junctions
irrespective of traffic density. With this, the
junction having more traffic is given green
signal for the same time which is being given

7
to the junction having less traffic or no traffic.
Thus the density in one junction keeps on
increasing while the other junction is clear with
no vehicles.

METHODOLOGY :
In our project, we have used IR sensors on each side of road.
we have placed 3 IR sensors on each side of the road (each
sensor is place 5m approximately from each other).Now
depending on the output of sensors microcontroller senses
the heavy density and makes the green light (signaling
heavy density) glow for more amount of time and red light
on other three roads thus reducing heavy traffic density
problem at the junction. In our project we have shown this
traffic light control system for 2 ways and there is a
pedestrian crossing in between.
Sensors are going to detect the density of vehicles on the
road as follows :

8
let s1,s2,s3 are for one side of road and s4,s5,s6 are for
second side of road, then if
s1=s2=s3=1
and
s4=s5=1 & s6=0
then it means that traffic is high one side and traffic is
medium on other side of the road. now accordingly arduino
board is going to give green light for more period of time to
the road which is having lag density(15 seconds) as
compared to the road having medium density (10
seconds).Similarly there are large number of conditions for
controlling the traffic light according to the sensor output.
We have assumed:
way1 way2 green1 & red2 yellow1 & yellow2 red1 &
green2
low low 5 2
5
low med 5 2
10
low high 5 2
15

med low 10 2
5
med med 10 2
10
med high 10 2
15

9
high low 15 2
5
high med 15 2
10
high high 15 2
15

When no vehicle is detected (during the late night hours),


then yellow light will blink on both ways.
Similarly there can be many more conditions for which the
coding is done .

LITERATURE REVIEW :

10
The past traffic controlling system is a human based system
wherein the traffic at the junctions is monitored and
controlled by traffic police which always results in abnormal
traffic conditions due to many reasons and sometimes may
be because of the inefficiency of the traffic police in
controlling the traffic.

However with the development in technology the past traffic


controlling system is replaced now with a timed signaling
system wherein the traffic police is replaced with the
automatic signaling system. The only disadvantage with this
is it gives signaling for constant fixed amount of time in all
junctions irrespective of traffic in that particular junction and
with this the heavy traffic on one road goes on increasing
and even though there is no traffic on the other side the
green light is shown for the same amount of time as that on
the heavy road.

We overcome this problem through our project where the


signaling depends on the density on the road i.e. the road
having heavy traffic is given green light for more amount of
time when compared to remaining roads, thus reducing the
traffic.

BLOCK DIAGRAM OF THE PROJECT :

11
12
BLOCK DIAGRAM DESCRIPTION :

The main objective of this project is to control the traffic


depending upon the density. As there is much time wastage
with the traffic lights which involves the time, we are
designing the new system which controls the traffic
depending upon the density.
Here we place IR sensors at both ends of the roads.
Whenever the vehicles pass in-between them the continuity
will be lost. Hence the microcontroller senses the density is
high.
Then the microcontroller will be making the light (green) to
be glow much time at the junction where the traffic is high.
The same procedure will be followed in all the four junctions.
The signaling from the four junctions will be taken into
consideration and depending upon the density
microcontroller will make the decision.
Similarly the count is displayed on 7 segment display
which in turn is derived by the arduino duomalinove.

Hardware Components :
13
•Arduino Broad
•IR Sensor
•LEDs
•7 Segment Display
•PCB Board
•Resistors

Software Tools :
•Arduino IDE

ARDUINO DUEMILONOV :
The Arduino Duemilanove ("2009") is a microcontroller board
based on the ATmega168 or ATmega328 . It has 14 digital

14
input/output pins (of which 6 can be used as PWM outputs),
6 analog inputs, a 16 MHz crystal oscillator, a USB
connection, a power jack, an ICSP header, and a reset
button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get
started.
"Duemilanove" means 2009 in Italian and is named after the
year of its release. The Duemilanove is the latest in a series
of USB Arduino boards.

Specifications:
Microcontroller
ATmega168
Operating Voltage
5V
Input Voltage (recommended)
7-12V
Input Voltage (limits)
6-20V

15
Digital I/O Pins 14 (of which 6 provide
PWM output)
Analog Input Pins
6
DC Current per I/O Pin
40 mA
DC Current for 3.3V Pin
50 mA
Flash Memory 16 KB (ATmega168) or 32 KB (ATmega328) of
which 2 KB used by bootloader
SRAM 1 KB (ATmega168)
or 2 KB (ATmega328)
EEPROM 512 bytes (ATmega168) or 1 KB
(ATmega328)
Clock Speed
16 MHz

ATMEGA328:
The ATmega328 is a single chip micro-controller created by
Atmel and belongs to the megaAVR series.
The high-performance Atmel 8-bit AVR RISC-based
microcontroller combines 32 KB ISP flash memory with read-
while-write capabilities, 1 KB EEPROM, 2 KB SRAM, 23
general purpose I/O lines, 32 general purpose working
registers, three flexible timer/counters with compare modes,
internal and external interrupts, serial programmable USART,
a byte-oriented 2-wire serial interface, SPI serial port, 6-
channel 10-bit A/D converter (8-channels in TQFP and

16
QFN/MLF packages), programmable watchdog timer with
internal oscillator, and five software selectable power saving
modes. The device operates between 1.8-5.5 volts. By
executing powerful instructions in a single clock cycle, the
device achieves throughputs approaching 1 MIPS per MHz,
balancing power consumption and processing speed.

POWER SUPPLY:
The Arduino can be powered via the USB connection or with
an external power supply. The power source is selected
automatically.
External (non-USB) power can come either from an AC-to-DC
adapter (wall-wart) or battery. The adapter can be connected
by plugging a 2.1mm center-positive plug into the board's
power jack. Leads from a battery can be inserted in the Gnd
and Vin pin headers of the POWER connector.
The board can operate on an external supply of 6 to 20 volts.
If supplied with less than 7V, however, the 5V pin may
supply less than five volts and the board may be unstable. If
using more than 12V, the voltage regulator may overheat
and damage the board. The recommended range is 7 to 12
volts.
The power pins are as follows:
• VIN.
The input voltage to the Arduino board when it's using an
external power source (as opposed to 5 volts from the USB
connection or other regulated power source). You can supply
voltage through this pin, or, if supplying voltage via the
power jack, access it through this pin.
• 5V.

17
The regulated power supply used to power the
microcontroller and other components on the board. This can
come either from VIN via an on-board regulator, or be
supplied by USB or another regulated 5V supply.
•3.3V
A 3.3 volt supply generated by the on-board regulator.
Maximum current draw is 50 mA.
•GND.
Ground pins

MEMORY :
The Atmega328 has 32 KB of flash memory for storing code
(of which 0,5 KB is used for the bootloader); It has also 2 KB
of SRAM and 1 KB of EEPROM (which can be read and written
with the EEPROM library) input and output.
Each of the 14 digital pins on the duomalinove can be used
as an input or output, using pinMode(), digitalWrite(), and
digitalRead() functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal
pull-up resistor (disconnected by default) of 20-50 kOhms.
In addition, some pins have specialized functions:
• Serial: 0 (RX) and 1 (TX).
Used to receive (RX) and transmit (TX) TTL serial data.
TThese pins are connected to the corresponding pins of the
ATmega8U2 USB-to-TTL Serial chip .
• External Interrupts: 2 and 3.
These pins can be configured to trigger an interrupt on a low
value, a rising or falling edge, or a change in value.
• PWM: 3, 5, 6, 9, 10, and 11.

18
Provide 8-bit PWM output with the analogWrite() function.

• SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK).


These pins support SPI communication, which, although
provided by the underlying hardware, is not currently
included in the Arduino language.
• LED: 13.There is a built-in LED connected to digital pin 13.
When the pin is HIGH value, the LED is on, when the pin is
LOW, it's off. The duomalinove has 6 analog inputs, each of
which provide 10 bits of resolution (i.e. 1024 different
values). By default they measure from ground to 5 volts,
though is it possible to change the upper end of their range
using the AREF pin and the analog Reference() function.
Additionally, some pins have specialized functionality:
• I2C: 4 (SDA) and 5 (SCL).
Support I2C (TWI) communication using the Wire library.
There are a couple of other pins on the board:
• AREF.
Reference voltage for the analog inputs. Used with analog
Reference().
•Reset.
Bring this line LOW to reset the microcontroller. Typically
used to add a reset button to shields which block the one on
the board. The Arduino duomalinove has a number of
facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides
UART TTL (5V) serial communication, which is available on
digital pins 0 (RX) and 1 (TX). An ATmega8U2 on the board
channels this serial communication over USB and appears as
a virtual com port to software on the computer. The '8U2
firmware uses the standard USB COM drivers, and no

19
external driver is needed. However, on Windows, an *.inf file
is required.

The Arduino software includes a serial monitor which allows


simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data
is being transmitted via the USB-to-serial chip and USB
connection to the computer (but not for serial
communication on pins 0 and 1).
A Software Serial library allows for serial communication on
any of the duomalinove's digital pins. The ATmega328 also
support I2C (TWI) and SPI communication.

IR SENSORS :

An infrared sensor is an electronic instrument that is used to


sense certain characteristics of its surroundings by either
emitting and/or detecting infrared radiation. It is also
capable of measuring heat of an object and detecting
motion. Infrared waves are not visible to the human eye.

In the electromagnetic spectrum, infrared radiation is the


region having wavelengths longer than visible light
wavelengths, but shorter than microwaves. The infrared
region is approximately demarcated from 0.75 to 1000µm.
The wavelength region from 0.75 to 3µm is termed as near
infrared, the region from 3 to 6µm is termed mid-infrared,
and the region higher than 6µm is termed as far infrared.

20
Infrared technology is found in many of our everyday
products. For example, TV has an IR detector for interpreting
the signal from the remote control. Key benefits of infrared
sensors include low power requirements, simple circuitry,
and their portable feature.

21
Working Principle :
A typical system for detecting infrared radiation using
infrared sensors includes the infrared source such as
blackbody radiators, tungsten lamps, and silicon carbide. In
case of active IR sensors, the sources are infrared lasers and
LEDs of specific IR wavelengths. Next is the transmission
medium used for infrared transmission, which includes
vacuum, the atmosphere, and optical fibers.
Thirdly, optical components such as optical lenses made
from quartz, CaF2, Ge and Si, polyethylene Fresnel lenses,
and Al or Au mirrors, are used to converge or focus infrared
radiation. Likewise, to limit spectral response, band-pass
filters are ideal.
Finally, the infrared detector completes the system for
detecting infrared radiation. The output from the detector is
usually very small, and hence pre-amplifiers coupled with
circuitry are added to further process the received signals.

Applications of IR sensor :
The following are the key application areas of infrared
sensors:

22
 Tracking and art history

 Climatology, meteorology, and astronomy

 Thermography, communications, and alcohol testing

 Heating, hyper spectral imaging, and night vision

 Biological systems and plant health

 Gas detectors/gas leak detection

 Water and steel analysis, flame detection

 Anesthesiology testing and spectroscopy

 Petroleum exploration and underground solution

 Rail safety.

7 Segment display:
A seven-segment display (SSD), or seven-segment indicator,
is a form of electronic display device for displaying decimal
numerals that is an alternative to the more complex dot
matrix displays.
Seven-segment displays are widely used in digital clocks,
electronic meters, and other electronic devices for displaying
numerical information.In a simple LED package, typically all
of the cathodes (negative terminals) or all of the anodes
(positive terminals) of the segment LEDs are connected and
brought out to a common pin; this is referred to as a
"common cathode" or "common anode" device. Hence a 7
segment plus decimal point package will only require nine
pins (though commercial products typically contain more
pins, and/or spaces where pins would go, in order to match
standard IC sockets. Integrated displays also exist, with
single or multiple digits.

23
In common cathode type display all the cathodes of the
segments are tied together and connected to ground. The
supply will be given to the required segment from the
decoder or driver.
In common anode type display the anodes of all the
segments are tied together and connected to supply and the
required segments will be connected to ground from the
decoder or driver.

24
How to derive 7 segment display using
arduino:

Hardware required:
 Arduino duomalinove

 A to B USB cable

 10 Jumper wires

 Bread board

 1 single 7 segment

Software required:
 Arduino IDE software

Insert the single digit 7 segment into the breadboard (be


sure to allow room for your jumper wires). Select any digital
pin on your Arduino duomalinove (we choose digital pin 2 on
the board), and assign it to PIN1 (Letter E) on the segment.
Continue until all pins on the 7 segment, are connected to
their respected pins. Since we started with pin 2 on the
Arduino duo, we felt it would be easy to continue with pins 3
through 9 respectively.

25
Remember pins 3 & 8 are ground. The rest are control
signals (5v since we have a common cathode segment).
Connect the Arduino duomalinove to the computer, using the
A to B USB cable and open the Arduino IDE software.
Go to Tools > Serial Port and make sure you have selected
the proper serial port.
Go to Tools > Board and make sure you have selected the
Arduino.

26
After this the coding is done according to the number to be
displayed.

27
LIGHT EMITTING DIODE :
LED Description :
It is a semiconductor diode having radioactive
recombination. It requires a definite amount of energy to
generate an electron-hole pair. The same energy is released
when an electron recombines with a hole. This released
energy may result in the emission of photon and such a
recombination. Here the amount of energy released when
the electro reverts from the conduction band to the valence
band appears in the form of radiation. Alternatively the
released energy may result in a series of phonons causing
lattice vibration.
Finally the released energy may be transferred to another
electron. There combination radiation may lie in the infra-red
and visible light spectrum. In forward it is peaked around the
band gap energy and the phenomenon is called injection
luminescence. In a junction biased, in the avalanche
breakdown region, there results a spectrum of photons

28
carrying much higher energies, almost white light gets
emitted from micro-plasma breakdown region in silicon
junction. Diodes having radioactive recombination are
termed as Light Emitting Diode, abbreviated as LED.

Light Emitting Diode

Circuit Symbol of LED

CONSTRUCTION:
LEDs are usually built on an n-type substrate, with an
electrode attached to the p-type layer deposited on its

29
surface. P-type substrates, while less common, occur as well.
Many commercial LEDs, especially GaN/InGaN, also use
sapphire substrate. Most materials used for LED production
have very high refractive indices. Light extraction in LEDs is
an important aspect of LED production.
Typical LED uses a forward voltage of about 2V and current
of 5 - 10mA.GaAs LED produces infra-red light while red,
green and orange lights are produced by gallium arsenide
phosphide (GaAsP) and gallium phosphide (GaP).

FUTURE SCOPE:

In this paper we have studied the optimization of traffic light


controller in a City using IR sensors and ARDUINO BOARD. By
using this system configuration we tries to reduce the
possibilities of traffic jams, caused by traffic lights, to an
extent and we have successfully gets the results. No. of
passing vehicle 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 for next
recording interval .
In future this system can be used to inform people about
different places traffic condition. data transfer between the
microcontroller and computer can also be done through
telephone network , data call activated SIM This technique
allows the operator to gather the recorded data from a far
end to his home computer without going there. Traffic lights
can be increased to N number and traffic light control can be
done for whole city by sitting on a single place.

30
This project can be enhanced in such away as to control
automatically the signals depending on the traffic density on
the roads using sensors like IR detector/receiver module
extended with automatic turn off when no vehicles are
running on any side of the road which helps in power
consumption saving.

This proximity detector using an infrared detector can


be used in various equipment like automatic door openers
and burglar alarms. The circuit primarily consists of an
infrared transmitter and an infrared receiver. The transmitter
section consists of a 555 timer IC functioning in a stable
mode. The output from a stable is fed to an infrared LED via
resistor R4, which limits its operating current. This circuit
provides a frequency output of 38 kHz at 50 per cent duty
cycle, which is required for the infrared detector/receiver
module.

The receiver section comprises an infrared receiver module,


a 555 monostable multivibrator, and an LED indicator. Upon
reception of infrared signals, 555 timer (mono) turns on and
remains on as long as infrared signals are received. When
the signals are interrupted, the mono goes off after a few
seconds (period=1.1 R7xC6) depending upon the value of
R7-C6 combination. Thus if R7=470 kilo-ohms and
C6=4.7μF, the mono period will be around 2.5 seconds.

Both the transmitter and the receiver parts can be


mounted on a single breadboard or PCB. The infrared
receiver must be placed behind the infrared LED to avoid
false indication due to infrared leakage. An object moving

31
nearby actually reflects the infrared rays emitted by the
infrared LED. The infrared receiver has sensitivity angle
(lobe) of 0-60 degrees, hence when the reflected IR ray is
sensed, the mono in the receiver part is triggered. The
output from the mono may be used in any desired fashion.
For example, it can be used to turn on a light when a person
comes nearby by energizing a relay. The light would
automatically turn off after some time as the person moves
away and the mono pulse period is over. The sensitivity of
the detector depends on current-limiting resistor R4 in series
with the infrared LED. Range is approximately 40 cm. For 20-
ohm value of R4 the object at 25 cm can be sensed, while for
30-ohm value of R4 the sensing range reduces by 22.5 cm.

CONCLUSION :
The project “ DENSITY BASED TRAFFIC LIGHT
CONTROL SYSTEM” has been successfully designed
and tested. Integrating features of all the hardware
components used have developed it. Presence of every
m o d u l e h a s b een re a s o n ed o u t a n d p l a ce d
c a ref u l l y t h u s c o n t r i b u ti n g to th e b est w o r k i n g o f
t h e u n i t . S e c o n d l y , u s i n g h i g h l y a d v a n c ed IC s a n d

32
w i t h t h e h e l p o f growing technology the project has been
successfully implemented.

BIBLIOGRAPHY :

1. www.google.co.in

2. en.wikipedia.org

33
3. www.arduino.cc

4. www.instructables.com

34

You might also like