Automatic Traffic Signal Controller
Automatic Traffic Signal Controller
ON
BACHELOR OF TECHNOLOGY IN
Submitted By
KUTTANADU,ALAPPUZHA6885045
1
COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY
COCHIN UNIVERSITY COLLEGE OF ENGINEERING KUTTANADU
RAKESH KUMAR(ECE,S6 )
Reg. No:-00600697
During the year2009 in the partial fulfillments of the requirements for the award of the degree
of Bachelor of Technology in ELECTRONICS & COMMUNICATION of
Cochin University College of Engineering, Kuttanadu during the academic year 2009
2
Acknowledgement:-
Dreams never turn to reality unless a lot of effort and hard work
is put in to it. And no effort bears fruit in the absence of support
and guidance. It takes a lot of effort to work your way through
this goal and having someone to guide you and help you is
always a blessing. I would like to take this opportunity to thank
a few who were closely involved in the completion of this
project. Ingenuity and popular guidance are inevitable for
successful completion of a project. I am indebted to all sources
that helped me in working out this project at each steps of its
progress.
First and foremost Mr. Oomen Samuel principal, for
granting permission to proceed with the project and providing
the necessary facilities/ I sincerely thanks Mrs. Deepa R. the
Head of department, Department of Electronics &
Communications, for the valuable help provided to me.In
particular I extremely grateful to Project coordinator Mrs. Rijimol
mathew and Project guide Mrs. Lekshmy Gopal lecture,
Department of Electronics & Communication for their valuable
suggestion and proper guidance to complete my project. Above
all I thank the lord almighty for giving me all the confidence and
ability to achieve this dream!
3
…DEDICATED TO OUR PARENTS AND TEACHERS
4
Automatic
traffic
signal
controller
5
6
ABSTRACT
AUTOMATED TRAFFIC SIGNAL CONTROLLER
7
CONTENTS:
1. INTRODUCTION
History
Technology
2. THE PROJECT
3. THE WORKING
5. Advantages
8
INTRODUCTION:-
9
History:
On 10 December 1868, the first traffic lights were
installed outside the British Houses of Parliament in London, by the
railway engineer J. P. Knight. They resembled railway signals of the
time, with semaphore arms and red and green gas lamps for night use.
The gas lantern was turned with a lever at its base so that the
appropriate light faced traffic. Unfortunately, it exploded on 2 January
1869, injuring the policeman who was operating it.
10
Ampelmännchen pedestrian traffic signals have come to be seen as a
nostalgic sign for the former German Democratic Republic.
The color of the traffic lights representing stop and go are likely
derived from those used to identify port (red) and starboard (green) in
maritime rules governing right of way, where the vessel on the left
must stop for the one crossing on the right.
11
TECHNOLOGY:
Optics and lighting:-
12
been implemented using LED-based lamps; in addition many existing
deployments of incandescent traffic lights are being replaced. In 2006,
Edmonton, Alberta, Canada completed a total refit to LED-based
lamps in the city's over 12,000 intersections and all pedestrian
crosswalks. Many of the more exotic traffic signals discussed on this
page would not be possible to construct without using LED
technology. However, color-changing LEDs are in their infancy and
may surpass the multi-color array technology.
13
THE
PROJECT
14
CIRCUIT DIAGRAM:
15
PCB LAYOUT:-
16
COMPONENTS REQUIRED:-
17
Components Specification Quantity
18
3. The working of the system:
The corresponding circuit automatically controls the
traffic signal during the day as well as nights.
In this system there are one 555 timer and one 74160
synchronous 4 bit counter, which is controlling whole device.
Along with there are some electronic equipments like 7404,
7408, 7411 gate, capacitor, resistor, LED (yellow, green, red)
etc.
The time period for which green, yellow, and red traffic signals
remain ‘on’
(And then repeat) for the straight moving traffic is divided into
eight units of 8 seconds (or multiples thereof) each.
19
20
flow of traffic in all possible directions:
TABLE I
21
Table I shows the simultaneous states of the signals for all the
traffic. Each row represents the status of a signal for 8 seconds.
As can be observed from the table, the ratio of green, yellow,
and red signals is 16:8:40 (=2:1:5) for the straight moving
traffic. For the turning traffic the ratio of green and red signals is
8:56 (=1:7), while for pedestrians crossing the road the ratio of
green and red signals is 16:48 (=2:6) In Table II (as well as
Table I) X, Y, and Z are used as binary variables to depict the
eight states of 8 seconds each. Letters A through H indicate the
left and right halves of the roads in four directions as shown in
Fig. 1. Two letters with a dash in between indicate the direction
of permissible movement from a road. Straight direction is
indicated by St, while left and right turns are indicated by Lt and
Rt, respectively. The Boolean functions for all the signal
conditions are shown in Table II. The left- and the right-turn
signals for the traffic have the same state, i.e. both are red or
green for the same duration, so their Boolean functions are
identical and they should be connected to the same control
output. The circuit diagram for realizing these Boolean
functions is shown in circuit diagram. Timer 555 (IC1) is wired
as an astable multivibrator to generate clock signal for the 4-bit
counter 74160 (IC2).
The time duration of IC1 can be adjusted by varying the value
of resistor R1, resistor R2, or capacitor C2 of the clock circuit.
The ‘on’ time duration T is given by the following relationship:
T = 0.693C2(R1+R2)
IC2 is wired as a 3-bit binary
counter by connecting its Q3 output to reset pin 1 via inverter
N1. Binary outputs Q2, Q1, and Q0 form variables X, Y, and Z,
respectively. These outputs, along with their complimentary
outputs X’, Y’, and Z’, Respectively, are used as inputs to the
rest of the logic circuit to realize various outputs satisfying
Table I. You can simulate various traffic lights
Using green, yellow, and red LEDs and feed the outputs of the
circuit to respective LEDs via current-limiting resistors of 470
ohms each to check the working of the circuit. Here, for turning
traffic and pedestrians crossing the road, only green signal is
22
made available. It means that for the remaining period these
signals have to be treated as ‘red’ in practice, the outputs of
Fig. 2 should be connected to operate high – power bulbs.
Further, if a particular signal condition (such as turning signal)
is not applicable to a given road, the output of that signal
condition should be connected to green signal of the next state
(refer Table I).
23
The traffic signals can also be controlled manually, if it desired.
Any signal state can be established by entering the binary
value corresponding to that particular state into the parallel
input pins of the 3-bit counter. Similarly, the signal can be reset
at any time by providing logic 0 at the reset pin (pin 1) of the
counter using an external switch. A software program to verify
the functioning of the circuit using a PC is given below. (Source
code and executable file will be provided in the next month’s
EFY-CD.).
24
Generic array logic (GAL
Devices)
25
These GAL products can be segmented into two broad
categories:
Base products
Extension products
Base Products - Aimed at providing superior design
alternatives to bipolar PLDs, these five architectures
replace over 98% of all bipolar PAL devices. The
GAL16V8 and GAL20V8 replace forty-two different PAL
devices. The GAL22V10, GAL20RA10, and GAL20XV10
round out the base products. These GAL devices meet
and, in most cases, beat bipolar PAL performance
specifications while consuming significantly lower power
and offering higher quality and reliability via Lattice’s
electrically reprogrammable E2CMOS technology. High-
speed erase times (<100ms) allow the devices to be
reprogrammed quickly and efficiently.
26
A Product for any System Design Need
27
Output Logic Macro cell
There are three OLMC configuration modes possible in
GAL16V8 and GAL20V8 devices: registered, complex,
and simple. You cannot mix modes; all OLMCs are either
simple, complex, or registered (in registered mode, the
output can be combinational or registered).
The outputs of the AND array are fed into an OLMC,
where each output can be individually set to active high
or active low, with either combinational (asynchronous) or
registered (synchronous) configurations. A common
output enable is connected to all registered outputs, or a
product term can be used to provide individual output
enable control for combinational outputs in the registered
mode or combinational outputs in the complex mode.
There is no output enable control in the simple mode.
The OLMC provides the designer with maximum output
flexibility in matching signal requirements, thus providing
more functionality than possible with standard PAL
devices.
28
29
4. Integrated Circuits (Chips)
Integrated Circuits are usually called ICs or chips. They are
complex circuits which have been etched onto tiny chips of
semiconductor (silicon). The chip is packaged in a plastic
holder with pins spaced on a 0.1" (2.54mm) grid which will fit
the holes on strip board and breadboards. Very fine wires
inside the package link the chip to the pins.
Pin numbers
The pins are numbered anti-clockwise
around the IC (chip) starting near the
notch or dot. The diagram shows the
numbering for 8-pin and 14-pin ICs, but the principle is the
same for all sizes.
30
by a machine which is able to work very quickly. Please don't
attempt to do this yourself because you are likely to destroy the
IC and it will be difficult to remove without damage by de-
soldering.
31
THE 555 TIMER – NE 555
DESCRIPTION:-
The 8-pin 555 timer must be one of the most useful chips ever
made. This is a highly stable device for generating accurate
time delay or oscillation .With just a few external components it
can be used to many circuits, not all of them that involve timing!
A single 555 timer can provide time delay ranging from
microseconds to hours whereas counter time can have
maximum timing range of days. The 555 can be used with a
supply voltage (Vs) in the range 4.5 to 15V (18 V absolute) and
can drive load up to 200 mA. Because of wide range of supply
voltage, the 555 timer is versatile and easy to use in various
applications.
32
Inputs of 555 Timer:-
Trigger input: - When <1/3 Vs (‘active low’) this makes the
output high (+Vs). It monitors the discharging of the timing
capacitor in an astable circuit. It has a high input
impedance>2M.
Threshold input: -When > 2/3 Vs (‘active high’) this makes the
output low (0V)*.It monitors the charging of the timing capacitor
in astable and monostable circuits. It has a high input
impedance>10M.
*Providing the trigger input is <1/3 Vs (the trigger inputs
overrides the threshold input).
Reset input: -When less than about 0.7 V (‘active low’) this
makes the output low (0V), overriding other inputs. When not
required it should be connected o + Vs. It has an input
impedance of about 10 K.
33
Output of 555:-
The 555 output (pin 3) can sink and source up to 200mA.
This is more than most chips and it is sufficient to supply many
output transducers directly, including LEDs (with a resistor in
series), low current lamps, piezo transducers, loudspeakers
(with a capacitor in series), relay coils (with diode protection)
and some motors (with diode protection). The output voltage
does not quite reach 0V and + Vs, especially if a large current
is flowing.
34
Functional block diagram of 555 IC
35
SAMPLE GRAPH:
36
APPLICATIONS:-
Precision timing
Pulse generation
Sequential timing
Time delay generation
Pulse width modulation
37
Function table
38
TEMPERATURE ORDER DWG #
RANGE CODE
DESCRIPTION
8-Pin Plastic 0 to +70 °C NE555D SOT96-1
Small Outline
(SO) Package
8-Pin Plastic 0 to +70 °C NE555N SOT97-1
Dual In-Line
Package (DIP)
8-Pin Plastic –40 °C to +85 °C SA555D SOT96-1
Small Outline
(SO) Package
8-Pin Plastic –40 °C to +85 °C SA555N SOT97-1
Dual In-Line
Package (DIP)
8-Pin Plastic –55 °C to +125 °C SE555CN SOT97-1
Dual In-Line
Package (DIP)
39
SYMBOL PARAMETER RATING UNIT
NOTE:
1. The junction temperature must be kept below 125 °C for
the D package and below 150°C for the N package. At
ambient temperatures above 25 °C, where this limit would
be derated by the following factor
2. D package 160 °C/W
40
7408 IC:-
Quad 2-input AND gates:
General description:--
This device contains four independent gates each of which
performs the logic AND function.
41
42
7432 IC:
Quad 2-input or gate
:
43
Absolute maximum ratings:-
44
7411 IC:-
45
FUNCTION TABLE:
Y = ABC
inputs output
A B C Y
L L L L
L L H L
L H L L
L H H L
H L L L
H L H L
H H L L
H H H H
Absolute maximum ratings:-
Supply voltage 7V
Input voltage 5.5 V
Operating free air temperature range 0°C to 70°C
Storage temperature range -65°C to +150°C
46
47
7404 IC:-
General description:--
This device contains four independent gates each of which
performs the logic NOT function.
CONNECTION DIAGRAM:-
FUNCTION TABLE:
Y=A’
48
Absolute maximum ratings:-
Supply voltage 7V
Input voltage 7V
Operating free air temperature range 0°C to 70°C
Storage temperature range -65°C to +150°C
49
74160 IC:
50
74160 synchronous decade counter (standard reset)
74161 synchronous 4-bit counter (standard reset)
74162 synchronous decade counter (synchronous reset)
74163 synchronous 4-bit counter (synchronous reset)
The count advances as the clock input becomes high (on the
rising-edge). The decade counters count from 0 to 9 (0000 to
1001 in binary). The 4-bit counters count from 0 to 15 (0000 to
1111 in binary).
51
Connecting synchronous counters in a chain
the diagram below shows how to link synchronous counters
such as 74160-3, notice how all the clock (CK) inputs are
linked. Carry out (CO) is used to feed the carry in (CI) of the
next counter. Carry in (CI) of the first 74160-3 counter should
be high.
52
Capacitors
Function:-
Capacitors store electric charge. They are used with resistors in
timing circuits because it takes time for a capacitor to fill with
charge. They are used to smooth varying DC supplies by acting
as a reservoir of charge. They are also used in filter circuits
because capacitors easily pass AC (changing) signals but they
block DC (constant) signals.
Capacitance
There are many types of capacitor but they can be split into two
groups, polarised and unpolarised. Each group has its own
circuit symbol.
53
Polarised capacitors (large values, 1µF +)
Electrolytic Capacitors
54
Modern tantalum bead capacitors are printed with their
capacitance, voltage and polarity in full. However older ones
use a colour-code system which has two stripes (for the two
digits) and a spot of colour for the number of zeros to give the
value in µF. The standard colour code is used, but for the spot,
grey is used to mean × 0.01 and white means × 0.1 so that
values of less than 10µF can be shown. A third colour stripe
near the leads shows the voltage (yellow 6.3V, black 10V,
green 16V, blue 20V, grey 25V, white 30V, pink 35V). The
positive (+) lead is to the right when the spot is facing you:
'when the spot is in sight, the positive is to the
right'.
55
Many small value capacitors have their value printed
but without a multiplier, so you need to use
experience to work out what the multiplier should be!
56
Capacitor Colour Code Colour Code
A colour code was used on polyester Colour Number
capacitors for many years. It is now obsolete, Black 0
but of course there are many still around. The
Brown 1
colours should be read like the resistor code,
the top three colour bands giving the value in Red 2
pF. Ignore the 4th band (tolerance) and 5th Orange 3
band (voltage rating). Yellow 4
For example: Green 5
Blue 6
brown, black, orange means
10000pF = 10nF = 0.01µF. Violet 7
Grey 8
Note that there are no gaps
between the colour bands, so 2 White 9
identical bands actually appear as a
wide band.
For example:
Polystyrene Capacitors
57
Why is this? Imagine that you decided to make capacitors
every 10µF giving 10, 20, 30, 40, 50 and so on. That seems
fine, but what happens when you reach 1000? It would be
pointless to make 1000, 1010, 1020, 1030 and so on because
for these values 10 is a very small difference, too small to be
noticeable in most circuits and capacitors cannot be made with
that accuracy.
58
Variable capacitors
59
Resistors
Example: Circuit symbol:
Function
60
• The fourth band is used to shows the tolerance (precision)
of the resistor, this may be ignored for almost all circuits
but further details are given below.
Brown
Red
Orange
Yellow
Green
Resistance 1k
Ω Blue
Violet
10
%
Tolerance ± Grey
White
Gold
Silver
61
5 Band Resistor Color Codes
Black
Brown
Red
Orange
Yellow
Green
Blue
Resistance 1k
Ω
Violet
Tolerance ± 10
%
Grey
White
Gold
Silver
62
6 Band Resistor Color Codes
Black
Brown
Red
Orange
Yellow
Green
Resistance 1k
Ω
Blue
Tolerance ± 10
% Violet
Temperature 15
Grey
coefficient PPM/°C
White
Gold
Silver
63
64
This resistor has red (2), violet (7), yellow (4 zeros) and gold
bands.
So its value is 270000 = 270 k .
On circuit diagrams the is usually omitted and the value is
written 270K.
For example:
red, violet, gold bands represent 27 × 0.1 = 2.7
green, blue, silver bands represent 56 × 0.01 = 0.56
65
A special colour code is used for the fourth band tolerance:
silver ±10%, gold ±5%, red ±2%, brown ±1%.
If no fourth band is shown the tolerance is ±20%.
Resistor shorthand
Resistor values are often written on circuit diagrams using a
code system which avoids using a decimal point because it is
easy to miss the small dot. Instead the letters R, K and M are
used in place of the decimal point. To read the code: replace
the letter with a decimal point, then multiply the value by 1000 if
the letter was K, or 1000000 if the letter was M. The letter R
means multiply by 1.
For example:
560R means 560
2K7 means 2.7 k = 2700
39K means 39 k
1M0 means 1.0 M = 1000 k
66
in most circuits. In fact it would be difficult to make resistors
sufficiently accurate.
The E12 series (12 values for each multiple of ten, for resistors
with 10% tolerance)
10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, ... then it
continues 100, 120, 150 etc.
Notice how this is the E6 series with an extra value in the gaps.
The E12 series is the one most frequently used for resistors. It
allows you to choose a value within 10% of the precise value
you need. This is sufficiently accurate for almost all projects
and it is sensible because most resistors are only accurate to
±10% (called their 'tolerance'). For example a resistor marked
390 could vary by ±10% × 390 = ±39 , so it could be any
value between 351 and 429 .
67
Variable Resistors
Construction:-
68
Power Ratings of
Resistors:-
Electrical energy is
converted to heat when
current flows through a
resistor. Usually the effect is
negligible, but if the
resistance is low (or the
voltage across the resistor
high) a large current may
pass making the resistor
become noticeably warm. High power resistors
The resistor must be able to (5W top, 25W bottom)
withstand the heating effect
and resistors have power Photographs © Rapid Electronics
ratings to show this.
69
Examples:
70
Light Emitting Diodes (LEDs)
Function
Testing an LED
71
resistor is suitable for most LEDs if your supply voltage is 12V
or less. Remember to connect the LED the correct way
round!
Colours of LEDs
Tri-colour LEDs
72
allowing each one to be lit separately, or both together to give
the third colour.
Bi-colour LEDs
73
Calculating an LED resistor value
An LED must have a resistor connected
in series to limit the current through the
LED, otherwise it will burn out almost
instantly.
R = (VS - VL) / I
VS = supply voltage
VL = LED voltage (usually 2V, but 4V for blue and white LEDs)
I = LED current (e.g. 20mA), this must be less than the
maximum permitted
For example
If the supply voltage VS = 9V, and you have a red LED (VL =
2V), requiring a current I = 20mA = 0.020A,
R = (9V - 2V) / 0.02A = 350 , so choose 390 (the nearest
standard value which is greater).
So R = (VS - VL) / I
74
For more information on the calculations please see the Ohm's
Law page.
Example calculations:
A red, a yellow and a green LED in series need a supply
voltage of at least 3 × 2V + 2V = 8V, so a 9V battery would be
ideal.
VL = 2V + 2V + 2V = 6V (the three LED voltages added up).
If the supply voltage VS is 9V and the current I must be 15mA =
0.015A,
Resistor R = (VS - VL) / I = (9 - 6) / 0.015 = 3 / 0.015 = 200 ,
so choose R = 220 (the nearest standard value which is
greater).
75
Avoid connecting LEDs in parallel!
The table below shows typical technical data for some 5mm
diameter round LEDs with diffused packages (plastic bodies).
Only three columns are important and these are shown in bold.
Please see below for explanations of the quantities.
76
Lumino
IF VF VR Viewi
Colo VF us Wavelen
Type max ma ma ng
ur typ. intensit gth
. x. x. angle
y
Standa 30m 2.1 5mcd @
Red 1.7V 5V 60° 660nm
rd A V 10mA
Standa Brigh 30m 2.5 80mcd
2.0V 5V 60° 625nm
rd t red A V @ 10mA
Standa Yello 30m 2.5 32mcd
2.1V 5V 60° 590nm
rd w A V @ 10mA
Standa Gree 25m 2.5 32mcd
2.2V 5V 60° 565nm
rd n A V @ 10mA
High
30m 5.5 60mcd
intensit Blue 4.5V 5V 50° 430nm
A V @ 20mA
y
Super 30m 1.85 2.5 500mcd
Red 5V 60° 660nm
bright A V V @ 20mA
Low 30m 2.0 5mcd @
Red 1.7V 5V 60° 625nm
current A V 2mA
IF max. Maximum forward current, forward just means
with the LED connected correctly.
VF typ. Typical forward voltage, VL in the LED resistor
calculation.
This is about 2V, except for blue and white
LEDs for which it is about 4V.
VF max. Maximum forward voltage.
VR max. Maximum reverse voltage
You can ignore this for LEDs connected the
correct way round.
Luminous Brightness of the LED at the given current,
intensity mcd = millicandela.
Viewing angle Standard LEDs have a viewing angle of 60°,
others emit a narrower beam of about 30°.
Wavelength The peak wavelength of the light emitted, this
77
determines the colour of the LED.
nm = nanometre.
Flashing LEDs
Flashing LEDs look like ordinary LEDs but they contain an
integrated circuit (IC) as well as the LED itself. The IC flashes
the LED at a low frequency, typically 3Hz (3 flashes per
second). They are designed to be connected directly to a
supply, usually 9 - 12V, and no series resistor is required. Their
flash frequency is fixed so their use is limited and you may
prefer to build your own circuit to flash an ordinary LED, for
example our Flashing LED project which uses a 555 astable
circuit.
LED Displays
78
Pin connections diagram
79
ADVANTAGES:
80
REFRENCES
1.www.electronics.com
2.www.electronicsforu.com
3.www.google.com
4.www.kpsec.freeuk.com
5. www.wikipedia.org
6.software:-a) pROTEL
b)ORCAD
81