Density Based Traffic Light
Density Based Traffic Light
Abstract
Nowadays congestion in traffic is a serious issue. The traffic congestion can also be caused by
long red light de-lays, etc. The delay of respective light is hard coded in the traffic light and it is
not dependent on traffic density. In our project, we studied the optimization of density based
traffic light controller using microcontroller. The system tries to reduce possibilities of traffic
jams, caused by traffic lights, to an extent. The type micro-controller used in the system is
AT89C51 which is MCS-51 family based. Microcontroller control the IR and store vehicles
density in its memory. The traffic light is situated at a certain distance from the IR system. Thus
based on vehicle zone density level, microcontroller defines different ranges for traffic light
delays and updates those accordingly.
For appropriate analysis, the recorded data can be down-loaded to the computer through
communication between microcontroller and the computer. Administrator sitting on computer
can command system (microcontroller) to down-load 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. In
future this system can be used to inform people about different places traffic condition.
I
Final Semester Project 2016
Chapter One
Introduction
The first traffic signal was invented by J P Knight, a railway signaling engineer. It was installed
outside the Houses of Parliament in 1868 and looked like any railway signal of the time, with
waving semaphore arms and red-green lamps, operated by gas, for night use.
The first electric traffic light system installed,August 5,1914 in American.the device used red and
green lights with a buzzer that warned when the color was about to change,and allowed police
and fire stations to control the signals in case of an emergency.
Three-color signals, operated manually from a tower in the middle of the street, were installed in
New York in 1918.
The first lights of this type to appear in Britain were in London, on the junction between St
James's Street and Piccadilly, in 1925. They were operated manually by policemen using
switches working on a time interval.
It has been suggested by some commentators that the level of congestion that society tolerates is
a rational choice between the costs of improving the Countermeasures of traffic light congestion
as follows. Road infrastructure, Urban planning and design-City planning and urban design
practices can have a huge impact on levels of future traffic congestion, Supply and demand -
Congestion can be reduced by either increasing road capacity (supply), or by reducing traffic
(demand), Traffic management (Intelligent transportation system) which guides traffic-Traffic
reporting, via radio, GPS and mobile apps, to advise road users and Other associated solution.
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. However, some
limitations to the usage of intelligent traffic control exist. Avoiding traffic jams for example is
thought to be beneficial to both environment and economy, but improved traffic-flow may also
lead to an increase in demand. There are several models for traffic simulation.
In our project we focus on optimization of traffic light controller in a city using IR sensor and
developed visual monitoring using microcontroller AT89C51.
1
Final Semester Project 2016
Traffic light optimization is a complex problem. Even for single junctions there might be no
obvious optimal solution. With multiple junctions, the problem becomes even more complex, as
the state of one light influences the flow of traffic towards many other lights. Another
complication is the fact that flow of traffic constantly changes, depending on the time of day, the
day of the week, and the time of year. Roadwork and accidents further influence complexity and
performance.
In this paper, we propose two approaches, the first approach - to take data/input from object/
subject/vehicle and in the second approach - to process the input data by Computer and
Microcontroller and finally display it on the traffic light signal to control the closed Loop System.
The problem with the traffic system is that for every minute the vehicles at the four way road will
be heavy and the traffic lights shall be changed to each side for some fixed time. Even though
there are no vehicles at particular side, the traffic signals will glow for given fixed time. Due to
that there is time waste process. Because of this other side vehicles have to wait for the time to
complete the process. So to reduce the wastage of time and fuel, we can implement the system
that controls the traffic based on the follows of vehicles at each side at the junction and give the
path to the particular side which has heavy follows of vehicles and keep remaining stop position.
So; that for this to know the density of the vehicles at side of the junction, we shall use IR
technology. According to traffic light research data the wastage of fuel and time are expressed in
percentage in the following graph.
2
Final Semester Project 2016
The general object of the project is to design and stimulate dynamic traffic light control
system.
As per our process diagram, initially the signals are stared by giving the power supply. The first
step is to make sure that the signals are all in ON condition. During this all the traffic signals will
blink in yellow light. This indicates that they are in working condition.
The next step is to check for the density of traffic in these roads. By density what we are trying to
mean in that the number of vehicles available in a particular at a certain period of time. The
density is calculated over here by means of using an IR circuit. Depending on the number of
vehicles that cut the light traveling from the receiver to transmitter of the IR circuit, the density of
the vehicles is registered in the microcontroller.
This is followed by the next step in which the microcontroller decides as to which road should be
given the highest priority. This based on the density of traffic on each road and also it depends on
the speed at which an IR circuit registers the density.
The next step is to assign time delays for each road. The time delays have already been set for
certain specific amount of density in the microcontroller. As soon as the microcontroller receives
the density from the IR circuit it will immediately detect the density of each road and accordingly
allot the time delays for which each signal will show the green light. The higher the traffic
density, the longer will be the time delay allotted.
3
Final Semester Project 2016
In the final step, the microcontroller makes sure that the lowest density road is also opened and
that the delay of the green light for that particular signal also comes to an end. Once all the roads
are opened in a sequence. Then the microcontroller again goes back to the second step where it
checks for the density of each traffic in each road. The whole process is repeated like a cycle. The
main point that is to be noted regarding this process is that, whenever a particular road has no
traffic. Correspondingly, the yellows light in the traffic signal will glow.
Parameters consider
4
Final Semester Project 2016
5
Final Semester Project 2016
Chapter Two
6
Final Semester Project 2016
control system entails four subunits. The subunits include the power supply unit, the sensing
unit, the control unit and LED, LCD display unit.
Density, speed, and flow are the three critical parameters for road traffic analysis. High-
performance road traffic management and control require real-time estimation of space mean
speed and density as input for large spatial and temporal coverage of the roadway network. In
Adaptive Traffic Control System which receive information from vehicle such as position and
speed and then it utilize to optimize the traffic signal. The system specifies the use of onboard
sensors in vehicle and standard wireless communication protocol Specified for vehicular
applications. They implement various traffic Signal control Algorithms [5].
Intelligent traffic system for VANET suggest that creation for smart city framework for VANET
consisting of Intelligent Traffic Lights which transmit warning messages and traffic statistic. In
That System Various Routing Protocol Has Been Discus And Compare. They suggest that
AODB is best suited for Intelligent Traffic Light [6]. Author suggest in reference [7] the data
forecasting model for transmitting data from one to other. This article studied about the dynamic
traffic control system and based on radio propagation model for predicting path loss &link. The
author suggests in reference [9].
Intelligence road Traffic signaling System. In that system OBUs used. OBUs used destination
information for calculating load traffic on road for reducing the conjunction on road. The general
belief is that it is more difficult to estimate and predict traffic density than traffic flow .In
Intelligent Traffic Light and Density Control using IR Sensors and Microcontroller [8] the author
propose that the delay of Signal not depend on traffic density. The Author optimize the traffic
using microcontroller this system reduce traffic jams problem cause by traffic light to extent. The
system contains IR Transmitter and IR Receiver. IR count the vehicles on the road
Microcontroller generates the result.
Priority Based Traffic Lights Controller Using Wireless Sensor Network the author implements
Adaptive Traffic control System based on (WSN) wireless sensor Network. In that System Time
manipulation Used for controlling Traffic Light. This System Control Traffic over Multiple
intersections [10].
7
Final Semester Project 2016
Chapter Three
The operation of power supply circuits built using filters, rectifiers and then voltage regulators.
Starting with an ac voltage, then filtering to a dc voltage is obtain by rectifying the ac voltage.
Then filtering to dc level and finally, Regulating to obtain a desired dc voltage. The regulation is
8
Final Semester Project 2016
usually obtained from an IC voltage regulator unit, which takes a dc voltage and provides a
somewhat lower dc voltage, which remains the same even if the dc varies, or the input load
connected to the dc voltage changes.
Transformer
A transformer is an electrical device which is used to convert electrical power from one electrical
circuit to another without change in frequency. Transformers convert AC electricity from one
voltage to another with little loss of power. Transformer work only with AC and this is one of
the reasons why mains electricity is Ac.
Step-up transformers increase in output voltage. Step-down transformers decrease in output
voltage. Most power supplies use a step-down transformer to reduce the dangerously high mains
voltage to safer low voltage. The input coil is called the primary and the output coil is called the
secondary. There is no electrical connection between the two coils; instead they are linked by an
alternating magnetic field created in the soft-iron core of transformer. The two lines in the
9
Final Semester Project 2016
middle of the circuit symbol represent the core. Transformers waste very little power so the
power output is (almost) equal to the power input. Note that as voltage is stepped down, current
is stepped up.
The ratio of the number of turns on each coil, called the turn’s ratio, determines the ratio of the
voltages. A step-down transformer has a large number of turns on its primary (input) coil which
is connected to the high voltage mains supply, and a small number of turns on its secondary
(output) coil to give a low output voltage.
Terns ratio=Vp/Vs=Np/Ns
Power out =power in
Vs*Is=VP*IP
Where Vp =primary (input) voltage
Vs= secondary (output) voltage
Np =number of turns on primary coil
Ns =number of turns on secondary coil
Ip =primary (input) current
Is =secondary (output) current
Rectifier
A circuit which is used to convert ac to dc is known as rectifier. The process of conversion ac to
dc is called rectification.
Types of rectifiers
1. Half wave rectifier
2. Full wave rectifier
Center tap full wave rectifier
10
Final Semester Project 2016
Bridge Rectifier
A bridge rectifier makes four diodes in a bridge arrangement to achieve full wave rectification.
This is a widely used configuration, both with individual diodes wired as shown and with single
component bridges where the diode bridge is wired internally.
11
Final Semester Project 2016
Operation
During positive half cycle of secondary, the diodes D2 and D3 are in forward biased while D1
and D4 are in reverse biased as shown fig.(). The current flow direction is shown in the fig.3.5
with dotted arrows.
During the negative half cycle of secondary voltage, the diodes D1 and D4 are forward biased
while D2 and D3 are in reverse biased as shown figure 3.6 the current flow direction is shown
figure3.6 with dotted arrows.
Filter
A filter is a device which removes the ac component of rectifier output but allows the dc
component to reach the load. Filter circuits are used to remove unwanted or undesired
frequencies from a signal.
12
Final Semester Project 2016
Capacitor filter
A filter capacitor is a capacitor which filters out a certain frequency or range of frequencies from
a circuit. Usually capacitors filter out very low frequency signals. These are signals that are very
close to 0Hz in frequency value. These are also referred to as DC signals.
The capacitor-input filter, also called the pi filter due to its shape that looks like the Greek
letter π, is a type of electronic filter. Filter circuits are used to remove unwanted or undesired
frequencies from a signal.
Figure 3.7: A simple pi filter, containing a pair of capacitors, an inductor, and a load.
A typical capacitor input filter consists of a filter or reservoir capacitor C1, connected across the
rectifier output, an inductor L, in series and another filter or smoothing capacitor, C2, connected
across the load, RL. A filter of this sort is designed for use at a particular frequency, generally
fixed by the AC line frequency and rectifier configuration. When used in this service, filter
performance is often characterized by its regulation and ripple.
The capacitor-input filter operates in three steps:
1. The capacitor C1 offers low reactance to the AC component of the rectifier output while
it offers infinite resistance to the DC component. As a result the capacitor shunts an
appreciable amount of the AC component while the DC component continues its journey
to the inductor L.
2. The inductor L offers high reactance to the AC component but it offers almost zero
resistance to the DC component. As a result the DC component flows through the
inductor while the AC component is blocked.
3. The capacitor C2 shunts the AC component which the inductor had failed to block. As a
result only the DC component appears across the load RL.
13
Final Semester Project 2016
The component value for the inductor can be estimated as an inductance that resonates the
smoothing capacitor(s) at or below one tenth of the minimum AC frequency in the power
supplied to the filter (100 Hz from a full-wave rectifier in a region where the power supply is
50Hz). In general, the relationship between the resonant frequency, which should be less than or
equal to one tenth of the minimum AC frequency, in this case 100 Hz, the capacitance, and the
inductance can be characterized by the following resonance equation:
Advantages of pi filters:
More output voltage
Ripple-free output
Regulator
Voltage regulator, any electrical or electronic device that maintains the voltage of a power source
within acceptable limits. The voltage regulator is needed to keep voltages within the prescribed
range that can be tolerated by the electrical equipment using that voltage.
An electronic circuit used to maintain a level amount of voltage in an electrical line. It eliminates
power surges, spikes and brownouts, which can cause harm to sensitive electronics. A voltage
regulator "module" (VRM) is a voltage regulator in a replaceable unit.
14
Final Semester Project 2016
Active infrared sensors employ both infrared source and infrared detectors. They operate by
transmitting energy from either a light emitting diode (LED) or a laser diode. A LED is used for
a non-imaging active IR detector, and a laser diode is used for an imaging active IR detector.
In this types of IR sensors, the LED or laser diode illuminates the target, and the reflected energy
is focused onto a detector. Photoelectric cells, Photodiode or phototransistors are generally used
as detectors. 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 target classification because it provides
target profile and shape data.
These sensors are used as reflective opto-sensors. Reflective opto-sensors are either intensity
based or use modulated IR. Intensity based sensors are affected by ambient light. Modulated
Infrared sensors wherein emitter is turned ON and OFF rapidly, are less susceptible to ambient
light. Reflective opto-sensors are used in two configurations.
Break Beam Sensors
This type of sensors consists of a pair of light emitting and light detecting elements. Infrared
source transmits a beam of light towards a remote IR receiver creating an “electronic fence”.
Once a beam is broken/interrupted due to some opaque object, output of detector changes and
associated electronic circuitry takes appropriate actions.
Typical applications of such sensors are intrusion detection, shaft encoder (for measurement of
rotation angle/rate of rotation).
15
Final Semester Project 2016
Reflectance Sensors
This type of sensors house both an IR source and an IR detector in a single housing in such a
way that light from emitter LED bounces off an external object and is reflected into a detector.
Amount of light reflected into the detector depends upon the reflectivity of the surface.
This principle is used in intrusion detection, object detection (measure the presence of an object
in the sensor’s FOV),barcoding decoding, and surface feature detection (detecting features
painted, taped, or otherwise marked onto the floor), wall tracking (detecting distance from the
wall), etc.
It can also be used to scan a defined area; the transmitter emits a beam of light into the scan
zone, the reflected light is used to detect a change in the reflected light thereby scanning the
desired zone.
Passive Infrared Sensors
These are basically IR detectors; they don’t use any IR source. These form the major class of IR
sensors/detectors.
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.
Infrared LED
16
Final Semester Project 2016
IR sensor is the combination of IR LED with photo diode. After this combination we are
connecting Darlington pair transistor. End of the IR sensor we have to connect a NOT gate for
the inverting purpose means low input have corresponding low output infra-red actually is
normal light with a particular color. we humans cannot see this color because its wave length of
950nm is below visible spectrum IR is chosen for remote control purpose.IR LED are quite easy
to make, and can be very cheap.
Transmitter
In the picture below we can see modulated signal during signal driving the IR LED of the
transmitter on the left side. The detected signal is coming out of the receiver at the other side.
Many clips are designed to be used as IR transmitters. The older clips were dedicated to only one
of the many protocols that were invented. Nowadays very low power microcontrollers are used
in IR transmitter for the simple reason that they are more flexible in their use. When no button is
pressed they are in a very low power slip mode, in which hardly any current is consumed. The
processor when wakes up to transmit the appropriate IR command only a key is pressed.
The current through the LED can vary from 100mAto well over 1A.in order to get an acceptable
control distance the LED currents have to be as high as possible. A trade-off should be made
between LED parameters, battery life time and maximum control distance. LED currents can be
that high because the pulses driving the LEDs are very short. Average power dissipation of the
LED should not exceed the maximum value though. You should also to you to it that the
maximum peek current for the LED is not exceeded. All these parameters can be found in the
LED’s data sheet.
Photodiodes
Unfortunately for us there are many more sources of Infrared light. The sun is the brightest
source of all, but there are many others, like: light bulbs, candles, central heating system and
even our body radiate Infrared light. In fact everything that radiates heat, also radiates Infrared
light. Therefore, we have to take precautions to guarantee that our IR message gets across to the
receiver without errors.
17
Final Semester Project 2016
A seven segment display (SSD) or seven segment indicator is a form of electronic display devise
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 electronic
devices for displaying numerical information.
Seven-segment displays are widely used in digital clocks, electronic meters, basic calculators,
and other electronic devices that display numerical information
In most application the seven segment are of nearly uniform shape and size (usually elongated
hexagons, though trapezoidal and rectangles can also be used ),though in the case of adding
machines, the vertical segment are longer and more oddly shaped at the ends in an effort to
further enhance readability.
The numerals 0, 1, 6,7and 9 may be represented by two or more different glyphs on seven
segment displays.
The seven segment displays are arranged as a rectangle of two vertical segments on each side
with horizontal segment on the top, middle and bottom. Additionally, the seventh segment
bisects the rectangle horizontally. There are also fourteen segment display and sixteen segment
displays (for full alphanumeric); however, these have mostly been replaced by dot-matrix
displays.
18
Final Semester Project 2016
19
Final Semester Project 2016
20
Final Semester Project 2016
Pin description
VCC
Provides +5v input Supply voltage.
GND
Ground
Port0
Port 0 is an 8-bit open-drain bi-directional I/O port. As an output port, each pin can sink eight
TTL inputs. When 1s are written to port 0 pins, the pins can be used as high impedance inputs.
Port 0 may also be configured to be the multiplexed low order address/data bus during accesses
to external program and data memory. In this mode P0 has internal pull-ups.
Port 0 also receives the code bytes during Flash programming, and outputs the code bytes during
program verification. External pull-up are required during program verification.
21
Final Semester Project 2016
Port1
Port 1 is an 8-bit bi-directional I/O port with internal pullups.The Port 1 output buffers can
sink/source four TTL inputs. When 1s are written to Port 1 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 1 pins that are externally being pulled
low will source current (IIL) because of the internal pull-ups. Port 1 also receives the low-order
address bytes during Flash programming and verification.
Port2
Port 2 is an 8-bit bi-directional I/O port with internal pullups.The Port 2 output buffers can
sink/source four TTL inputs. When 1s are written to Port 2 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 2 pins that are externally being pulled
low will source current (IIL) because of the internal pull-ups. Port 2 emits the high-order address
byte during fetches from external program memory and during accesses to external data memory
that use 16-bit addresses.
Port3
Port 3 is an 8-bit bi-directional I/O port with internal pull-ups. The Port 3 output buffers can
sink/source four TTL inputs. When 1s are written to Port 3 pins they are pulled high by the
internal pull-ups and can be used as inputs. As inputs, Port 3 pins that are externally being pulled
low will source current (IIL) because of the pull-ups.
22
Final Semester Project 2016
ALE/PROG
Address Latch Enable output pulse for latching the low byte of the address during accesses to
external memory. This pin is also the program pulse input (PROG) during Flash programming.
In normal operation ALE is emitted at a constant rate of 1/6 the oscillator frequency, and may be
used for external timing or clocking purposes. Note, however, that one ALE pulse is skipped
during each access to external Data Memory.
PSEN
Program Store Enable is the read strobe to external program memory. When the AT89C51 is
executing code from external program memory, PSEN is activated twice each machine cycle,
except that two PSEN activations are skipped during each access to external data memory.
EA/VPP
External Access Enable. EA must be strapped to GND in order to enable the device to fetch code
from external program memory locations starting at 0000H up to FFFFH. Note, however, that if
lock bit 1 is programmed, EA will be internally latched on reset. EA should be strapped to VCC
for internal program executions. This pin also receives the 12-volt programming enable voltage
(VPP) during Flash programming, for parts that require 12-volt Vpp.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
Oscillator Characteristics
XTAL1 and XTAL2 are the input and output, respectively, of an inverting amplifier which can
be configured for use as an on-chip oscillator, as shown in Figure 1. Either a quartz crystal or
ceramic resonator may be used. To drive the device from an external clock source, XTAL2
should be left unconnected while XTAL1 is driven as shown in Figure 2.There are no
requirements on the duty cycle of the external clock signal, since the input to the internal
clocking circuitry is through a divide-by-two flip-flop, but minimum and maximum voltage high
and low time specifications must be observed.
IdleMode
In idle mode, the CPU puts itself to sleep while all the on chip peripherals remain active. The
mode is invoked by software. The content of the on-chip RAM and all the special functions
23
Final Semester Project 2016
registers remain unchanged during this mode. The idle mode can be terminated by any enabled
interrupt or by a hardware reset. It should be noted that when idle is terminated by a hardware
reset, the device normally resumes program execution, from where it left off, up to two machine
cycles before the internal reset algorithm takes control. On-chip hardware inhibits access to
internal RAM in this event, but access to the port pins is not inhibited.
Figure 3.13: Oscillator Connections Figure 2.14: External clock drive configuration
24
Final Semester Project 2016
3.1.5 Buzzer
µ Vision5 is an IDE (Integrated Development Environment) that helps to write, compile, and
debug embedded programs.it encapsulates the following components:
25
Final Semester Project 2016
project manger
faculty
tool configuration
editor
a powerful debugger
This software is used for execution of microcontroller programs. Keil development tools for the
MC architecture support every level of software developer from the professional applications
engineer to the student just learning about embedded software development.
The industry-keil c compiler micro assemblers, debuggers, real, time kernels, single board
computers and emulators support all derivatives and help to get more projects completed on
schedule. The keil software development tools are designed to solve the complex problems
facing embedded software developers.
When starting a new project select the microcontroller you the device database and the vision
IDE sets all compiler, assembler, linker, and memory options for you.
Numerous example program are include to help you get stared with the most popular embedded
avr devices.
The keil µ vision debugger accurately simulates on-chip peripherals (PC, CAN, and UART, SPL
interrupts, I/O ports, A/D converter. D.A converter and PWM modules) of your avr device.
Simulation helps you understand how configuration and avoids time wasted on setup problems.
Additionally, with simulation, you can write and test applications before target how is available.
3.2.2 Proteus
Proteus is software for microprocessor simulation, schematic capture, and printed circuit board
(PCB) design. It is developed by lab center Electronics.
The programming language used here in this project is an embedded C language. This embedded
C language is different from the generic C language in few things like
I. data types
II. access over the architecture addresses
26
Final Semester Project 2016
The embedded C programming language forms the user friendly language with access over port
addresses. SFR Register addresses etc.
Signed char:
Used to represent - or + values.
As a result we have only 7 bits for the magnitude of the signed number, giving us values
from -128 to +12 embedded C data types.
Designing of this system is possible when select the specific controller to suite. For this we
selected 89C51 controller. With the help of 89C51 controller traffic control system can be
implemented successfully with the help IR technology to the controller we connected IR
transmitter and receiver circuit, instead of IR transmitter and receiver we can go with photo
diode and photo transmitter also. Here we are using four IR pairs for each side. When of the
direction has large density from the other directions, it gets the highest priority, then glow the
green light and the others are glows red(stop) light.
27
Final Semester Project 2016
IR Mounting
Parameters consider on the IR mounting.
estimate the total length of the roadway to side road
estimate the length of the cars
Statically analysis the arrangement of cars when congestion occur on the road
Road way selection
Traffic light system has different way of road. We select in below illustrates the traffic flow
layout of the four way road. And this is just a model of the four way road, schemes and layout
may subject to change. We have chosen this one for easier explanation of the traffic flow.
28
Final Semester Project 2016
Phase I
Initially Vehicle from A needs to travel to D,F and D. So in the first Phase forward green signal
in A,D,F and H permits vehicles to pass through while the left side roads of east, west and south
roads are stopped by red signal.
Phase II
Phase II permits the vehicle to pass from G to B, D and F roads. Traffic flow left side roads of
east, north and south was stopped by means of Red signal.
Phase III
Phase three permits traffic flow in the directions from C to B, F and H.Traffic flow left side
roads of in the north ,south and west was stopped by means of red signal.
Phase IV
Phase four permits traffic flow from E to B, D and H .Traffic flow left side roads of in the
east .north and west was stopped by means of red signal.
Timing of the signals
The timing is one of the important factors to consider in a traffic light system. Here in this design
we have programmed in such a way a light will be changes dynamically depend on the traffic
density of the road.
29
Final Semester Project 2016
30
Final Semester Project 2016
1
T= = 20m Sec
50 Hz
V min
Ө1 = sin-1( ) = 65o
V max
Ө2
t2 = charging time = ∗T = 1.4m sec
360
T
t1 = discharging time = −t = 8.6m sec
2 2
Il 70 m A∗8.6 m Sec
Then C1¿ ∗t 1= =¿500µF
Vr 1.2 V
Vf = 0.7V, Vdc = 5v
Vprimary = 230v and
Vr = 10 percent of Vdc = 0.5v
Diode selection
Peak = Vmax + 2Vforward
= 5.25 + 2*0.7
= 6.65v
For a full wave rectifiers
V reverse = Vp = 6.65v
I forward (average) = IL/2 = 5mA
12 Volt DC Power Supply
V r = 0.1 * V dc
V max = 14.7 V
V min = 13.3 V
31
Final Semester Project 2016
Chapter Four
Results (output)
Results include the successful operation of the intelligent traffic light control and monitoring
system. The IR sensor with IR transmitter is placed at a gap. Gap acting as a proto-type
indicating a road. The system is placed near road as a standalone device. Whenever any obstacle
like vehicle passes between IR transmitter and IR sensor, microcontroller detects and increase
32
Final Semester Project 2016
number of vehicle density. Traffic light is placed ahead of IR sensor at a distance so that decision
taken by microcontroller to control traffic light can help in reducing the congestion at traffic
light.
On the basis vehicle density microcontroller decide the traffic light delays for next recording
interval. Traffic light delays are classified as low, medium, high range. The ranges are predefined
by varying vehicle density.
Generally we are expected that:
Fuel saved to about 70% compared to normal timer based traffic control.
Traffic can be cleared without any irregularities.
Time can be share evenly for all intersections.
Effective time management.
In the future we will do more advanced system adds to this dynamic traffic light system.
We consider accident cars like fire car, ambulance and police cars.
Control illegal driver (cross the traffic light glow red) without the above consideration,
using GSM based to the traffic station.
We construct the prototype and hardware implementation.
Sychnorozing all the traffic junction in the city and by establishing a network among
them, the network can be wired or wireless.
33
Final Semester Project 2016
Chapter Five
5.1 Conclusion
To reduce the cognation and unwanted time delay in traffic an advanced system is required.
Once such advanced technology is using IR sensors. The sensor helps in keeping density of
vehicles entering to each zones subsequently allot time delay there by giving accurate priority to
each for the time being.
Dynamic traffic lighting system is useful equipment for controlling traffic flow at junctions.
This method has for long outweighed the older system in many ways, it is more efficient and
effective as well, as it can enhance the transportation system of the country saving many hours
usually lost in traffic problems. Accidents may also be prevented and lives can be saved.
34
Final Semester Project 2016
Dynamic traffic light control system is useful equipment for controlling traffic at junctions. More
attention should be given to this method of automatic traffic light system by the government,
individuals and even drivers as it posed to reducing or preventing road accidents there by
reducing or preventing loss of live associated with it. The government should encourage the
installation of this system of traffic at necessary junctions in order to reduce the number of
accounts associated with road.
Drivers and pedestrians should also learn to abide by the rules associated with the system so as to
ease traffic congestion and avoid unnecessary stress on the road and fear of crossing intersections
by the pedestrians. Higher institution of learning most especially engineering fields should
devote time and resources to the project as it would be of great benefit to students and
researchers. It is our belief that a greater design can be achieved if standard equipment, materials
and components are used.
35
Final Semester Project 2016
Reference
36
Final Semester Project 2016
[5] KartikPandit, Ghosal, D., Zhang, H.M., Chen-Nee Chuah, “Adaptive Traffic Signal Control
with Vehicular Ad hoc Networks”, IEEE Transactions on Vehicular Technology, Volume: 62,
Issue: 4May 2013.
[6] Ganesh S. Khekare, Apeksha V. Sakhare, “Intelligent Traffic System for VANET: A
Survey”, International Journal of Advanced Computer Research, Volume-2 Number-4 Issue-6
Dec 2012.
[7] Sanjay S. Dorle, Pratima L. Patel, “Design Approach for Dynamic Traffic Control System
Based on Radio Propagation Model in VANET”, International Journal of Computer Science and
Network, Vol 2, Issue 1, 2013.
[8] Ms.PromilaSinhmar, “Intelligent Traffic Light and Density Control using IR Sensors and
Microcontroller”, International Journal of Advanced Technology & Engineering Research
(IJATER) ISSN NO: 2250-3536 VOLUME 2, ISSUE 2, March 2012.
[9] Nazmus S. Nafi and Jamil Y. Khan “AVANET Based Intelligent Road Traffic Signaling
System”, IEEE 2012
[10] Shruti K R &Vinohi.K “Priority Based Traffic Lights Controller Using Wireless Sensor
Appendices
C -code
#include<reg51.h>
#define density level P1
Sbit ar= P0^0; Sbit ay=P2^0; Sbit ag=P0^1; Sbit by=P2^1;//declaration of input and output ports.
Sbit br=P0^2; Sbit cy=P2^2;sbit bg=P0^3;sbit dy=P2^3;
Sbit cr=P0^4; Sbit cg=P0^5;sbit dr=P0^6;sbit dg=P0^7;
Sbit IRaa=P1^0; Sbit IRab=P1^1;sbit IRba=P1^2;sbit IRbb=P1^3;
Sbit IRca=P1^4; Sbit IRcb=P1^5;sbit IRda=P1^6;sbit IRdb=P1^7;
Sbit Ba=P2^4;sbit Bb=P2^5;sbit Bc=P2^6;sbit Bd=P2^7;
37
Final Semester Project 2016
38
Final Semester Project 2016
{ Alane();
msdelay(1000);
Dlane();
msdelay(500); }
else if((IRab==0||
IRab==1)&&IRba==0&&IRbb==1&&IRca==0&&IRcb==1&&IRda==1&&IRdb==1)
{ Alane();
msdelay(1000);
Blane();
msdelay(500);
Clane();
msdelay(500); }
elseif((IRab==0||
IRab==1)&&IRba==0&&IRbb==1&&IRca==0&&IRcb==1&&IRda==0&&IRdb==1)
{ Alane();
msdelay(1000);
Blane();
msdelay(500);
Clane();
msdelay(500);
Dlane();
msdelay(500); }
else if((IRab==0&&IRba==0&&IRbb==0&&IRca==0&&IRcb==0&&IRda==0&&IRdb==0)||
(IRab==1&&IRba==0&&IRbb==1&&IRca==0&&IRcb==1&&IRda==0&&IRdb==1))
{ ABBlane();
Clane();
msdelay(1000);
Dlane();
msdelay(1000); }
39
Final Semester Project 2016
elseif((IRab==0||
IRab==1)&&IRba==0&&IRbb==1&&IRca==1&&IRcb==1&&IRda==0&&IRdb==1)
{ Alane();
msdelay(1000); //time delay b/n road A and road B.
Blane();
msdelay(500);
Dlane();
msdelay(500); }
else { ABBlane();
}}}
void msdelay(unsigned int value) //delay statement.
{
unsigned int x,y;
for(x=0;x<value;x++)
for(y=0;y<1275;y++);
}
void count(void) //delay statement.
{
int i;
P3=0x3f;
for(i=9;i>=0;)
{
P3=a[i];
i--;
msdelay(100);
}
}
msdelay(1000); }
40
Final Semester Project 2016
41