1.1 INTRODUCTION TRAFFIC DENSITY ANALYZER CUM SIGNALING FOR METRO CITIES is an application specific project which provides an intelligent environment. 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. Whenever discontinuity occurs in the 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. 1.2 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 1
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
1.1 INTRODUCTION
TRAFFIC DENSITY ANALYZER CUM SIGNALING FOR METRO
CITIES is an application specific project which provides an intelligent environment.
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.
Whenever discontinuity occurs in the 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.
1.2 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 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.
1.3 METHODOLOGY
In our project, we place IR transmitters and IR receivers in line of sight on
either sides of the road, where continuous transmission and reception of IR rays take
place. When there is any break up in the above process for specific period of time,
1
the 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.
1.4 SIGNIFICANCE OF THE WORK
The significance of our project is to monitor the present day traffic by
analyzing the density and signaling the roads for varied amount of time depending
upon the density thereby reducing the traffic problems in the metropolitan cities
especially during the busy hours.
The application of our project is mainly to monitor and control the traffic
density at the junctions and can also be extended in monitoring the street light and can
also be applied for domestic purpose.
1.5 ORGANIZATION OF THE REPORT
The chapter 1 gives the brief introduction, aim and methodology of the project, Significance of the Work and organisation of the Report.
The chapter 2 gives the literature review, block diagram and the description of the project.
The chapter 3 gives the detailed description of the hardware components that are used in the project i.e., microcontroller, power supply and its components and the IR LEDs.
The chapter 4 gives the project circuitry (schematic) and its working principle.
The chapter 5 gives the results and conclusions that are achieved successfully by the end of the project.
2
2.1 LITERATURE REVIEW
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.
3
2.2 BLOCK DIAGRAM OF THE PROJECT
Fig.(2): Block Diagram of Project
2.3 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 transmitter and the IR receiver 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.
4
MICRO CONTROLLER
POWER SUPPLY
Signals from IR receivers from all directions
RED
GREEN
YELLOW
North side
RED
GREEN
YELLOW
South side
RED
GREEN
YELLOW
East side RED
GREEN
YELLOW
West side
IR Transmitter
signalsFrom all
directions
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.
Hardware Components
Microcontroller
Power supply
IR transmitter
IR receiver
LEDs
Software Tools
Keil
Embedded C
Express PCB
5
3.1 MICROCONTROLLER3.1.1 INTRODUCTION
A Microcontroller consists of a powerful CPU tightly coupled with memory,
various I/O interfaces such as serial port, parallel port timer or counter, interrupt
controller, data acquisition interfaces-Analog to Digital converter, Digital to Analog
converter integrated on to a single silicon chip.
If a system is developed with a microprocessor, the designer has to go for
external memory such as RAM, ROM, EPROM and peripherals. But controller is
provided all these facilities on a single chip. Development of a Microcontroller
reduces PCB size and cost of design.
One of the major differences between a Microprocessor and a Microcontroller
is that a controller often deals with bits not bytes as in the real world application. Intel
has introduced a family of Microcontrollers called the MCS-51.
3.1.2 BLOCK DIAGRAM
Accumulator
Registers
Internal RAM
Stack Pointer
Timer / Counter
Internal ROM
I/O Port
Interrupt Circuits
Clock Circuits
I/O Port
Program Counter
Arithmetic and Logic Unit
6
Fig.(3): Block diagram of Microcontroller3.1.3 Features
• 4K bytes of In-System Programmable (ISP) flash memory
• 4.0V to 5.5V operating range
• Fully static operation: 0 Hz to 33 MHz
• Three-level program memory lock
• 128 x 8-bit internal RAM
• 32 programmable I/O lines
• Two 16-bit timer/counters
• Six interrupt sources
• Full duplex UART serial channel
• Low-power idle and power-down modes
3.1.4 Description
The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller
with 4K bytes of in-system programmable Flash memory. The device is manufactured
using Atmel’s high-density nonvolatile memory technology and is compatible with
the industry- standard 80C51 instruction set and pin out.
The on-chip Flash allows the program memory to be reprogrammed in-system
or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit
CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is
a powerful microcontroller which provides a highly-flexible and cost-effective
solution to many embedded control applications.
7
Fig.(3.1): Microcontroller3.1.5 PIN DIAGRAM
Fig.(3.2): Pin Diagram of Microcontroller
8
3.1.6 PIN DESCRIPTION
VCC - Supply voltage
GND - Ground
Port 0
Port 0 is an 8-bit open drain bidirectional I/O port. As an output port, each pin can
sink eight TTL inputs. When 1’s are written to port 0 pins, the pins can be used as high-
impedance inputs. Port 0 can also be configured to be the multiplexed low-order
address/data bus during access 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-ups are required during program
verification.
Port 1
Port 1 is an 8-bit bidirectional I/O port with internal pull-ups. The port 1
output buffers can sink/source four TTL inputs. When 1’s 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.
Port 2
Port 2 is an 8-bit bidirectional I/O port with internal pull-ups. The port 2
output buffers can sink/source four TTL inputs. When 1’s 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 also receives the high-order address bits
and some control signals during flash programming and verification.
Port 3
9
Port 3 is an 8-bit bidirectional I/O port with internal pull-ups. The port 3
output buffers can sink/source four TTL inputs. When 1’s 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. Port 3 receives some control signals for flash
programming and verification.
Port 3 also serves the functions of various special features of the AT89S51, as
shown in the following table.
Table(1) : Port 3 Pin Functions
RST
Reset input. A high on this pin for two machine cycles while the oscillator is
running resets the device.
ALE/PROG
Address Latch Enable (ALE) is an output pulse for latching the low byte of the
address during access to external memory. This pin is also the program pulse input
(PROG) during Flash programming.
10
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.
If desired, ALE operation can be disabled by setting bit 0 of SFR location
8EH. With the bit set, ALE is active only during a MOVX or MOVC instruction.
Otherwise, the pin is weakly pulled high.
Setting the ALE-disable bit has no effect if the microcontroller is in external
execution mode.
PSEN
Program Store Enable (PSEN) is the read strobe to external program memory.
When the AT89S51 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 upto
FFFFH.
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.
XTAL1
Input to the inverting oscillator amplifier and input to the internal clock
operating circuit.
XTAL2
Output from the inverting oscillator amplifier.
11
3.2 POWER SUPPLY DESCRIPTION
The power supplies are designed to convert high voltage AC mains electricity
to a suitable low voltage supply for electronics circuits and other devices. A power
supply can by broken down into a series of blocks, each of which performs a particular
function. A DC power supply which maintains the output voltage constant irrespective
of AC mains fluctuations or load variations is known as “Regulated DC Power
Supply”
For example a 5V regulated power supply system as shown below:
Fig.(3.3): Components of a typical power supply
3.3 TRANSFORMER
A transformer is an electrical device which is used to convert electrical power
from one electrical circuit to another without any change in frequency.
12
Transformers convert AC electricity from one voltage to another with little
loss of power. Transformers work only with AC and this is one of the reasons why
mains electricity is AC. Step-up transformers increase the output voltage while step-
down transformers decrease the output voltage.
Most of the power supplies use a step-down transformer to reduce the
dangerous high mains voltage to a 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 the transformer. The two lines in the middle of the circuit
symbol represent the core.
Transformers waste very little power so the power out is (almost) equal to the
power in. 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.
Fig.(3.4): An Electrical Transformer
13
Turns ratio = Vp/ VS = Np/NS
Power Out= Power In
VS x IS=VP x IP
Vp = primary (input) voltage
Np = number of turns on primary coil
Ip = primary (input) current
3.4 RECTIFIER
A circuit which is used to convert ac to dc is known as RECTIFIER. The
process of conversion of ac to dc is called “rectification”.
3.4.1 TYPES OF RECTIFIERS
Half wave Rectifier
Full wave rectifier
1. Centre tap full wave rectifier
2. Bridge type full wave rectifier
Half-wave Rectifier
The Half wave rectifier is a circuit, which converts an ac voltage to dc voltage
When a diode is connected to a source of alternating voltage, it will be
alternately forward-biased, and then reverse-biased, during each cycle of the AC sine-
wave.
When a single diode is used in a rectifier circuit, current will flow through the
circuit only during one-half of the input voltage cycle. For this reason, this rectifier
circuit is called a half-wave rectifier.
Full-wave Rectifier
14
A Full Wave Rectifier is a circuit, which converts an ac voltage into a
pulsating dc voltage using both half cycles of the applied ac voltage. It uses two
diodes of which one conducts during one half cycle while the other conducts during
the other half cycle of the applied ac voltage.
Fig.(3.5): Centre tap full wave rectifier
Bridge Rectifier
A bridge rectifier makes use of 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.
Fig.(3.6): Bridge Rectifier
3.4.2 OPERATION
15
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 in the fig(3.7). The current
flow direction is shown in the fig.(3.7) with dotted arrows.
Fig.(3.7):Bridge Rectifier – Positive Half Cycle
During negative half cycle of secondary voltage, the diodes D1 and D4 are in
forward biased while D2 and D3 are in reverse biased as shown in the fig(3.8). The
current flow direction is shown in the fig.(3.8) with dotted arrows.
Fig.(3.8):Bridge Rectifier – Negative Half Cycle
3.5 FILTER
A Filter is a device which removes the ac component of rectifier output but allows the dc component to reach the load.
3.5.1 Capacitor Filter
16
The ripple content in the rectified output of half wave rectifier is 121% or that
of full-wave or bridge rectifier is 48%. Such high percentage of ripples is not
acceptable for most of the applications. Ripples can be removed by one of the
following methods of filtering.
A capacitor, in parallel to the load, provides an easier by-pass for the ripple
voltage through it due to low impedance at ripple frequency and leaves the dc to
appear at the load.
Filtering is performed by a large value electrolytic capacitor connected across
the DC supply to act as a reservoir, supplying current to the output when the varying
DC voltage from the rectifier is falling.
The capacitor charges quickly near the peak of the varying DC and then
discharges as it supplies current to the output. Filtering significantly increases the
average DC voltage to almost the peak value (1.4 × RMS value).
To calculate the value of capacitor(C),
C = ¼ * √3 * f * r * Rl
Where,
f = supply frequency,
r = ripple factor,
Rl = load resistance
3.6 REGULATOR
Voltage regulator ICs are available with fixed (typically 5, 12 and 15V) or
variable output voltages. The maximum current they can pass also rates them.
Negative voltage regulators are available, mainly for use in dual supplies.
17
Many of the fixed voltage regulators ICs have 3 leads and look like power
transistors, such as the 7805 +5V 1A regulator shown in the fig (3.5). The LM7805 is
simple to use.
The positive lead of an unregulated DC power supply (anything from 9V DC
to 24V DC) is connected to the input pin, and connect the negative lead to the
common pin and when the power is on, 5V appear at the output pin.
Fig.(3.9): A Three Terminal Voltage Regulator
3.6.1 LM78XX Description
The Bay Linear LM78XX is an integrated linear positive regulator with three
terminals. The LM78XX offer several fixed output voltages making them useful in