Professional Documents
Culture Documents
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
Certificate
Head of Department
Project Guide
2
(Dr. B P PATIL) (Prof. VIJAY KARRA)
ACKNOWLEDGEMENT
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
5
of light. A micro controller is interfaced to led’s provide for
INTRODUCTION
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.
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
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.
11
12
BLOCK DIAGRAM DESCRIPTION :
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.
19
external driver is needed. However, on Windows, an *.inf file
is required.
IR SENSORS :
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
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
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.
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:
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.
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