Cont
Cont
CHAPTER ONE
1. INTRODUCTION
Human is the most intelligent creation of god. For ease and making life more comfortable,
human being is inventing new technologies every day. With new wings of hopes, people are
coming out from their houses for developing the standard of living. This is why traffic
congestion is increasing on the road day- by- day. As a result of which, two main problems are
arises, No traffic, but still need to wait and Heavy traffic jams.
These problems occur due to Fixed Control on Traffic. The meaning of Fixed Control on Traffic
is that we are not controlling the traffic according to the density, but in manner of programming
which is already fixed in the system. To solve this problem of a fixed traffic light control system,
we are introducing a traffic control system which is based on the density and Ambulance, for
keeping control on the traffic. It is named as „Smart traffic light control system‟. Smart traffic
light control system means, a system which can modulate itself according to the number of
vehicles or can say density and the Ambulance.
Here we are using IR sensors for making a conventional traffic control system, a smart traffic
control system. IR sensor contains IR transmitter IR receiver in itself. These IR transmitter and
IR receiver will be mounted on either sides of the road at a particular distance. As the vehicle
passes through these IR sensors, the IR sensor will detect the vehicle & will send the information
to the microcontroller. The microcontroller will count the number of vehicles, and provide the
glowing time to LED according to the density of vehicles. If the density is higher, LED will glow
for higher time than average or vice versa.
The main advantage of this system is that it reduces the waiting time for normal vehicles and
emergency vehicles like ambulance. As we know that time is the most valuable thing now days,
so many of people break the traffic rules just to reach at time to their destination. The reason
behind breaking the traffic rules is to wait for more time whether the traffic is present or not. So,
the proposed system is able to reduce this problem of people and also to minimize the number of
accidents happening on the road every day.
A traffic light is a device that is designed to control the flow of traffic by using three colored
lights. These lights are mainly green, yellow, and red. In 1860s London, the first traffic control
device had arms that extended out to command drivers on how to react at an intersection. The
first four way three color traffic light did not come until December 1920 in Detroit. The true
origins of traffic control are unknown to us but historical evidence has proven that traffic
problems started when highways came in to existence. Man has always had problems with streets
filled to the breaking point with travelers. Some of the first strategies for traffic controls were not
a device but regulations made by governments.
One of the earliest examples was in Rome. During the day of Julius Caesar the streets of Rome
were so clogged with chariots the government made certain areas off limits to all vehicles except
those belonging to people who were public officials and high- ranking citizens. The best
historical example of traffic control that relates towards a traffic light is the use of traffic cops to
control the flow of traffic on London Bridge in 1722. Three men were given the task of directing
traffic coming in and out or either London or southwark. Each officer would help direct traffic
coming out of southwark in to London and he made sure all traffic stayed on the west end of the
bridge. A second officer would direct traffic on the east end of the bridge to control the flow of
people leaving London and going to southwark.
The first traffic control device appeared near the British house of parliament at the intersection of
George and bridge streets. The device was made in response to the desire by a select committee
to use railway signals on highways. The devices had lights and it used arms which extended
outwards. It was operated manually by a police officer. The signal was 22 feet high and crowned
with a gas light. The light was called the semaphore and had arms that would extend horizontally
that commended drivers to “Stop” and then the arms would lower to a 45 degrees angle to tell
drivers to proceed with “Caution”. At night a red light would command “Stop” and a green light
would mean use “Caution”. The man behind this new and different invention was Johan Peake
knight a railroad engineer.
In 1912, a traffic control device was placed on top a tower in Paris at the rue Montmartre and
Grande Boulevard. This tower signal was manned by a police woman and she operated a
revolving four-side metal box on top of a glass showcase where the word ”Stop” was painted in
red and the word “Go” painted in white. The traffic tower was featured in the Rider and Driver
Magazine and soon the United States started to develop their own traffic control towers. The
tower was the first innovation that used the three-colored traffic signal and appeared first in the
city of Detroit, where the first three-colored traffic light was built at the intersection of Michigan
and Woodward Avenues in 1920.
The man behind this three-color traffic light was police officer William Potts of Detroit. He was
concerned about how police officer s at four different lights signals could not change their lights
all at the same time. The answer was third light that was colored amber, which was the same
color, used on the railroad. Potts also placed a timer with the light to help coordinate a four-way
set of lights in the city. The traffic tower soon used twelve floodlights to control traffic and the
reason for a tower in the first place was that at the time the intersection was one of the busiest in
world, with over 20,000 vehicles daily.
The traffic light underwent many evolutions from a manually operated arm extending outward
in 1860s London to being controlled by a timer in a tower at an intersection. The control of
traffic lights made a big turn with the rise of computers in America in the 1950s. Thanks to
computers, the changing of lights made Crosby‟s flow quicker thanks to computerized detection.
A pressure plate was pleased at intersections so once a car was on the plate computers would
know that a car was waiting at the red light. Some of this detection included knowing the number
of waiting cars against the red light and the length of time waited by the first vehicle at the red.
One of the best historical examples of computerized control of lights was in Denver in 1952. One
computer took control of 120 lights with six pressure-sensitive detectors measuring inbound and
outbound traffic. The system was in place at the central business district, where the most traffic
was between the downtown area and the north and northeastern parts of the city.
The control room that housed the computer in charge of the system was in the basement of the
city and county building. As computers started to evolve, traffic light control also improved and
became easier. In 1967, the city of Toronto was the first to use more advanced computers that
were better at vehicle detection. Thanks to the new and better computers traffic flow moved even
quicker than with the use of the tower. The computers maintained control over 159 signals in the
cities through telephone lines. People praised the computers for their detection abilities.
The problems of typical conventional traffic light Controller are mentioned below:
With increasing number of vehicles on road, heavy traffic congestion has substantially increased
in major cities. This happened usually at the main junctions commonly in the morning, before
office hour and in the evening, after office.
The main effect of this matter is increased time wasting of the people on the road. The solution
for this problem is by developing the program which different setting delays for different
junctions. The delay for junctions that have high volume of traffic should be setting longer than
the delay for the junction that has low of traffic. This operation is calling Normal Mode.
At certain junctions, sometimes even if there is no traffic, people have to wait. Because the
traffic light remains red for the preset time period, the road users should wait until the light turn
to green. If they run the red light, they have to pay fine. The solution of this problem is by
developing a system which detects traffic flow on each road and set timings of signals
accordingly. Moreover, synchronization of traffic signals in adjacent junctions is also necessary.
Usually, during traffic jam, the emergency vehicle, such as ambulance, fire brigade and police
will be stuck especially at the traffic light junction. This is because the road users waiting for the
traffic light turn to green. This is very critical problem because it can cause the emergency case
become complicated and involving life.
Present traffic systems unable to provide traffic information on congested roads and also fail to
provide information about alternate roads when traffic congested on roads.
To control the traffic lights based on the density of the vehicles and checking Ambulances at
junction.
The scope of the project is to study and analyze the counting and controlling system by using
ATmega8 microcontroller and construct a four way junction of a traffic light model.
CHAPTER TWO
2. LITRATURE REVIW
In the past, the researchers had gone through different types of technologies. A brief survey of
various solutions to the traffic congestion problems is presented below.
A. Embedded System
Intelligent Traffic Signal Control System by Dinesh Rota & Prof. Swapnili Karmore[1] (2012).
Here the embedded system uses IR sensors, AVR-32 microcontroller with the programmable
flash memory, with built in 8-channels ADC. IR (i.e. Infrared) sensor is programmed to identify
emergency vehicle and microcontroller is designed in such a way that it gives red signal to all
other lane but one with the emergency vehicle.
Limitations: In this system IR sensors are used to identify emergency vehicles only. Due to this
the system does not consider any normal cars. So it is not advisable to implement this kind of
system.
B. Wireless Technologies
The next one is, Priority Based Traffic Lights Controller Using Wireless Sensor Networks by
Shruthi K R and Vinodha K [2] (2012). Wireless Sensor Network (WSN) is being used as
communication infrastructure in the proposed traffic light controller. System uses fuzzy logic to
define the direction of the emergency vehicle. Central monitoring system collects all the
information and gives the appropriate response.
Limitations: Communication in the Wireless Sensor Network (WSN) is still a research field.
Data exchange in between Sensor is not reliable. And as specified before Sensors need to be
robust in order to survive uncomfortable or harsh weather.
In order to remove the weakest link (i.e. human) in the above system, an automatic traffic
management scheme is suggested.
Limitations: This system cannot detect the emergency vehicle; it treats the normal car and
ambulance in the same way. So there are chances of delaying the emergency services. Drivers
disobeying signal rules are also headache, sometimes they causes serious accidents.
D. Image Processing
The Image Processing Based on Intelligent Traffic Controller by Vikram aditya Dangi, Amol
Parab, Kshitij Pawar and S.S Rathod[5] (2012). A camera is fixed on the polls or other tall
structures to overlook the traffic scene. Images extracted from the video are then analyzed to
identify and count vehicles. Then depending on the signal cycle, time is allotted to each lane.
The system also takes into consideration the emergency vehicles at the intersection. If such a
vehicle is detected, then that lane is given priority over the others.
Limitation: A camera is placed or fixed on the poles or other tall strictures in order to capture
the cars. Due to environmental factors like rain, wind, humidity, and so on a camera does not
capture the cars correctly and it does not transfer correct information. So it may cause a series
accidents or risks .Thus the system is not feasible to implement.
This paper has two types of algorithms: i) Linked based, and ii) Vehicle based. In the link based
algorithm it is assumed that if a particular link is given then, then a pair of sensors situated at the
starting point and at the ending point of the link can best reflect the traffic status of that link. In
contrary the vehicle based algorithm uses every available data pair to consider all the links
travelled by them to calculate an average speed of the traffic. Thus, we can say that a sensor
fitted in a vehicle can travel across more than one link which in turn can again be associated with
more than one road. The result gathered can be accurate but having sensors in all the vehicles
and also on all the roads is very costly especially when we are taking into consideration an
economically poor country like India.[5]
CHAPTER THREE
3.1 METHODOLOGY
Microcontroller is a multipurpose device. This means that it can be used to perform various
sophisticated computing functions. Its capability to perform multiple tasks entails the
microcontroller to be included in this smart traffic light control system. One can view
microcontroller as a programmable logical device. It means that microcontroller can be
instructed to perform a given task with its capability. Each component found in this thesis is
interfaced to the microcontroller. IR sensors and output devices can be enabled and disabled by
understanding the status conditions of the vechels. The operations of microcontroller as
programmed. The combining circuits will be constructed on Proteus software to see whether that
a circuit is right or not. IR sensor circuit is providing signal to trigger the microcontroller.
According to the sensed signal the microcontroller permit the traffic light to glow and the RFID
sensor check the presence of emergency cars like Ambulance.
This section of the thesis describes the details of the following units
The logical structure of the thesis design is shown in the block diagram shown in figure below.
The central system (microcontroller) handles all the sensor inputs and data which are given to the
Traffic lights. The controller decides and sends a control signal to the specified output peripheral
device on specified ports. This means according to the input from the IR sensor and RFID the
microcontroller makes decision and gives the corresponding output to the Traffic lights.
Here in our proposed system have developed a system which is used to provide clearance to
emergency vehicle. We have developed a density based control system in order to achieve our
desired results. Due to a fixed traffic light control system there is a traffic conjunction, time
delay, traffic accidents and also the system does not give priorities for the emergency vehicles
like Ambulance, police car and VIP. Thus, we have built our system using density based control
system. The advantage of this system is to provide accurate signal without any interrupt to any
persons. The system also provides security for ambulance clearance. Hence it is easy way to
overcome the defects across traffic signal and performs the certain desired task. The proposed
system consists of four pairs of IR transmitter and IR receiver for the purpose of density
detection and RF transmitter and receiver unit are used in order to get the information from the
emergency vehicle. Whenever they passed the information of the direction then that direction
should be signaling to green. We have performed this system for every four way roads shown
below especially in Wolaita sodo city around Tona market center.
.
RF-Rx
////////////////////////////////
. . . RF-Rx
. . . . . . . . . . RF-RX
. . . . .
///////////////////////////////////
. Legend: = IR-Tx
. = IR-Rx
= Green light
RF-Rx
= Yellow light
. = Red light
Hard ware
PCB board
ATmega8 Microcontroller
Resistors, capacitors
Diodes
Transformer
Transistor
Voltage regulator
Software
2. AVR studio 4
The basic block diagram of the proposed system is illustrated in Fig 1.The heart of the system is
the Atmega8 micro controller. The proposed system also comprises of a power supply unit, a
RFID reader, a RFID tag, an IR transmitters, an IR receivers, light emitting diodes (LEDs).
Power supply
RF IDtag
IR Tx IR Rx RF ID Reader
IR Tx IR Rx Controller
TRAFFIC LIGHTS
IR Tx IR RX TRAFFIC LIGHTS
3.1.4.1 Microcontroller
The microcontroller includes a CPU, RAM, ROM, I/O ports, and timers like a standard
computer, but because they are designed to execute only a single specific task to control a single
system, they are much smaller and simplified so that they can include all the functions required
on a single chip. All components are connected via an internal bus and are all integrated on one
chip. The modules are connected to the outside world via I/O pins.
In order to make the microcontroller useful, it has to be connected to additional electronics, i.e.
peripherals. Each microcontroller has one or more registers (called a “port”) connected to the
microcontroller pins. Why input/output? Because you can change the pin‟s function as you wish.
For example, suppose you want your device to turn three signal LEDs and simultaneously
monitor the logic state of five sensors or push buttons. Some of ports need to be configured so
that there are three outputs (connected to the LEDs) and five inputs (connected to sensors). It is
Memory unit
Memory is part of the microcontroller used for data storage. The easiest way to explain it is to
compare it with a filing cabinet with many drawers. Suppose, the drawers are clearly marked so
that it is easy to access any of them. It is easy enough to find out the contents of the drawer by
reading the label on the front of the drawer. Each memory address corresponds to one memory
location. The content of any location becomes known by its addressing. Memory can either be
written to or read from. There are several types of memory within the microcontroller. ROM
(Read Only Memory) is used to permanently save the program being executed. The size of a
program that can be written depends on the size of this memory. Today‟s microcontrollers
commonly use 8-bit addressing, which means that they are able to address up to 64 Kb of
memory, i.e. 65535 locations. As a novice, your program will rarely exceed the limit of several
As its name suggests, this is a unit which monitors and controls all processes inside the
microcontroller. It consists of several smaller subunits, of which the most important are:
Instruction Decoder is a part of the electronics which recognizes program instructions and runs
other circuits on the basis of that. The “instruction set” which is different for each
microcontroller family expresses the abilities of this circuit.
Arithmetical Logical Unit (ALU) performs all mathematical and logical operations upon data.
Accumulator is a SFR closely related to the operation of the ALU. It is a kind of working desk
used for storing all data upon which some operation should be performed (addition, shift/move
etc.). It also stores the results ready for use in further processing. One of the SFRs, called a
Status Register (PSW), is closely related to the accumulator.
The microcontroller oscillator uses quartz crystal for its operation. Even though it is not the
simplest solution, there are many reasons to use it. Namely, the frequency of such oscillator is
precisely defined and very stable; the pulses it generates are always of the same which makes
them ideal for time measurement. Such oscillators are used in quartz watches. If it is necessary to
measure time between two events, it is sufficient to count pulses coming from this oscillator.
That is exactly what the timer does. Most programs use these miniature electronic
“stopwatches”. These are commonly 8- or 8-bit SFRs and their content is automatically
incremented by each coming pulse. Once a register is completely loaded - an interrupt is
generated! If the timer registers use an internal quartz oscillator for their operation then it is
possible to measure time between two events (if the register value is T1 at the moment
measurement has started, and T2 at the moment it has finished, then the elapsed time is equal to
the result of subtraction T2-T1). If the registers use pulses coming from external source then
such a timer is turned into a counter.
Counter
If a timer is supplying pulses into the microcontroller input pin then it turns into a counter.
Clearly, it is the same electronic circuit. The only difference is that in this case pulses to be
A/D Converter
External signals are usually fundamentally different from those the microcontroller understands
(Ones and Zeros), so that they have to be converted in order for the microcontroller to
understand them. An analogue to digital converter is an electronic circuit which converts
continuous signals to discrete digital numbers. This module is therefore used to convert some
analogue value into binary number and forwards it to the CPU for further processing. In other
words, this module is used for input pin voltage measurement (analogue value). The result of
measurement is a number (digital value) used and processed later in the program
The most programs use interrupts in regular program execution. The purpose of the
microcontroller is mainly to react on changes in its surrounding. In other words, when some
event takes place, the microcontroller does something... For example, when you push a button on
a remote controller, the microcontroller will register it and respond to the order by changing a
channel, turn the volume up or down etc. If the microcontroller spent most of its time endlessly a
few buttons for hours or days... It would not be practical. The microcontroller has learnt during
its evolution a trick. Instead of checking each pin or bit constantly, the microcontroller delegates
Oscillator
Even pulses coming from the oscillator enable harmonic and synchronous operation of all
circuits of the microcontroller. The oscillator module is usually configured to use quartz crystal
or ceramic resonator for frequency stabilization. Furthermore, it can also operate without
elements for frequency stabilization (like RC oscillator). It is important to say that instructions
are not executed at the rate imposed by the oscillator itself, but several times slower. It happens
because each instruction is executed in several steps. In some microcontrollers, the same number
of cycles is needed to execute any instruction, while in others; the execution time is not the same
for all instructions. Accordingly, if the system uses quartz crystal with a frequency of 20 MHz,
execution time of an instruction is not 50nS, but 200, 400 or 800nS, depending on the type of
Microcontroller Unit (MCU).
Figure 8 oscillator
Power supply unit
There are two things worth attention concerning the microcontroller power supply circuit.
Brown-out is a potentially dangerous state which occurs at the moment the microcontroller is
being turned off or in situations when power supply voltage drops to the limit due to electric
noise. As the microcontroller consists of several circuits which have different operating voltage
levels, this state can cause its out-of-control performance. In order to prevent it, the
microcontroller usually has built-in circuit for brown out reset. This circuit immediately resets
AVR microcontroller
AVR was developed in the year 1996 by Atmel Corporation. The architecture of AVR was
developed by Alf-Egil Bogen and Vegard Wollan. AVR derives its name from its developers and
stands for Alf-Egil Bogen Vegard Wollan RISC microcontroller, also known as Advanced
Virtual RISC. The AT90S8515 was the first microcontroller which was based on AVR
architecture however the first microcontroller to hit the commercial market was AT90S1200 in
the year 1997.
1. TinyAVR – Less memory, small size, suitable only for simpler applications
2. MegaAVR – These are the most popular ones having good amount of memory (up to 256
KB), higher number of inbuilt peripherals and suitable for moderate to complex applications.
3. XmegaAVR – It used commercially for complex applications, which require large program
memory and high speed. The following table compares the above mentioned AVR series of
microcontrollers
They are fast: AVR microcontroller executes most of the instructions in single execution cycle.
AVRs are about 4 times faster than PICs; they consume less power and can be operated in
different power saving modes. Let‟s do the comparison between the three most commonly used
families of microcontrollers.
The AT refers to Atmel the manufacturer, Mega means that the microcontroller belong to Mega
AVR category, 8 signifies the memory of the controller, which is 8KB.
By executing powerful instructions in a single clock cycle, the ATmega8 achieves throughputs
approaching 1 MIPS per MHz, allowing the system designed to optimize power consumption
versus processing speed. And it has 23 input/output (I/O) pins which can be used for interfacing
with external world.
It is possible to configure them as input or output by setting a particular register value through
programming. This IC comes in three different packages, but we are using the popular 28-pin
PDIP package (Atmega8-16PU).
All these I/O pins have secondary functions, which are shown in parenthesis on the pin out
diagram shown below. Each of these registers are 8 bits wide, with each bit corresponding to a
single pin (an exception is bit 7 of the port register –PC6- most often used as the RESET pin, not
an I/O.
Pin configuration
Pin Descriptions
VCC: Digital supply voltage. Magnitude of the voltage range between 4.5v to 5.5v.
Port B is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port B output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port B pins that are externally pulled low will source current if the pull-up
resistors are activated. The Port B pins are tri-stated when a reset condition becomes active, even
if the clock is not running.
Depending on the clock selection fuse settings, PB6 can be used as input to the inverting
Oscillator amplifier and input to the internal clock operating circuit.
Depending on the clock selection fuse settings, PB7 can be used as output from the inverting
Oscillator amplifier. If the Internal Calibrated RC Oscillator is used as chip clock source, PB7:6
is used as TOSC2:1 input for the Asynchronous Timer/Counter2 if the AS2 bit in ASSR is set.
Port C (PC5…PC0)
Port C is a 7-bit bi-directional I/O port with internal pull-up resistors (selected for each bit). The
Port C output buffers have symmetrical drive characteristics with both high sink and source
capability. As inputs, Port C pins that are externally pulled low will source current if the pull-up
PC6/RESET
If the RSTDISBL Fuse is programmed, PC6 is used as an I/O pin. Note that the electrical
characteristics of PC6 differ from those of the other pins of Port C.
If the RSTDISBL Fuse is un programmed, PC6 is used as a Reset input. A low level on this pin
for longer than the minimum pulse length will generate a Reset, even if the clock is not running.
Port D (PD7…PD0)
Port D is an 8-bit bi-directional I/O port with internal pull-up resistors (selected for each bit).
The Port D output buffers have symmetrical drive characteristics with both high sink and source
capability.
As inputs, Port D pins that are externally pulled low will source current if the pull-up resistors
are activated. The Port D pins are tri-stated when a reset condition becomes active, even if the
clock is not running.
RESET
Reset input pin. A low level on this pin for longer than the minimum pulse length will generate a
reset, even if the clock is not running.
AVCC
AVCC is the supply voltage pin for the A/D Converter, Port C3…PC0, and ADC7…ADC6. It
should be externally connected to VCC, even if the ADC is not used. If the ADC is used, it
should be connected to VCC through a low-pass filter to reduce noise. Note that PC5…PC4 use
digital supply voltage, VCC.
AREF
In the TQFP and QFN/MLF package, ADC7…ADC6 serve as analog inputs to the A/D
converter. These pins are powered from the analog supply and serve as 10-bit ADC channels.
Internal Calibrated Oscillator Atmega8 is equipped with an internal oscillator for driving its
clock. By default Atmega8 is set to operate at internal calibrated oscillator of 1 MHz. The
ADC Interface: Atmega8 is equipped with an 8 channel ADC (Analog to Digital Converter
with a resolution of 10-bits. ADC reads the analog input for e.g., a sensor input and converts it
into digital information which is understandable by the microcontroller.
Timers/Counters: Atmega8 consists of two 8-bit and one 8-bit timer/counter. Timers are useful
for generating precision actions for e.g., creating time delays between two operations.
Watchdog Timer: Watchdog timer is present with internal oscillator. Watchdog timer
continuously monitors and resets the controller if the code gets stuck at any execution action for
more than a defined time interval.
Interrupt: Atmega8 consists of 21 interrupt sources out of which four are external. The
remaining are internal interrupts which support the peripherals like USART, ADC, and Timers
etc.
Block diagram
An infrared sensor is electrical device that used to emits and detects infrared radiation to sense its
surroundings. The working of any infrared sensor is governed by three laws
Planck‟s radiation law: states that “every object emits radiation at a temperature not equal to
ook(ON-OFF KEYING)” Stephen-Boltzmann laws: states that “at all wavelengths, the total
energy emitted by a black body is proportional to the forth power of the absolute temperature”.
Displacement law: States that “the radiation curve of a black body for different temperatures will
reach its pick at a wavelength inversely proportional to the temperature”. The basic concept of an
Thesis ECE (Control Engineering) Page 27
Smart traffic light control system 2016
infrared sensor which is used as obstacle detector is to transmit an infrared signal, this infrared
signal bounces from the surface of an object and the signal is received at the infrared receiver.
There are five basic elements used in a typical infrared detection system: an infrared source, a
transmission medium, optical component, infrared detectors or receivers and signal processing.
Infrared lasers and infrared LEDs of specific wavelength can be used as infrared source. The
three main types of media used for infrared transmission are vacuumed, atmosphere and optical
fibers. Optical components are used to focus the infrared radiation or to limit the spectral
response. Optical lenses made of Quartz, Germanium and silcon are used to focus the infrared
radiation. Infrared receiver can be photodiodes, phototransistor etc. Some important
specifications of infrared reciver are photosensitivity, detective and noise equivalent power.
Signal processing is done by amplifiers or transistors as the output of infrared detector is very
small.
Types of IR sensors
Infrared sensors can be passive or active. Passive infrared sensors are basically infrared
detectors. Passive infrared sensors do not use any infrared source and detects energy emitted by
obstacles in the field of view.
They are of two types : quantum and thermal.Thermal infrared sensors use infrared energy as the
source of heat and are independent of wavelength. Thermocouples, pyroelectric detectors and
bolometer are the common types of thermal infrared detectors.
Quantum type infrared detectors offer higher detection performance and are faster than thermal
type infrared detectors. The photosensitivity of quantum type detector is wavelength dependant.
Quantum type detectors are further classified in to two types: Intrinsic and extrinsic types.
Intrinsic type quantum quantum detectors are photoconductive cells and photovoltaic cells.
Active infrared sensor consists of two elements: infrared source and infrared detector. Infrared
source includes an LED or infrared laser diode. An infrared detector includes photodiode or
phototransistors. The energy emitted by the infrared source is reflected by an object and falls on
Figure 12 IR sensor
IR Transmitter
Infrared transmitter is a light emitting diode (LED) which emits infrared radiation. Hence, they
are called IR LEDs. Even though an IR LED looks like a normal LED, the radiation emitted by it
is invisible to human eye.
There are different types of infrared transmitters depending up on their wavelengths, output
power and response time.
A simple infrared transmitter can be constructed using an infrared LED, a current limiting
resistor and a power supply.
IR Receiver
Infrared receivers are also called as infrared sensors as they detect the radiation from an IR
transmitter. IR receivers came in the form of photodiodes and phototransistor. Infrared
photodiodes are different from normal photodiodes as they detect only infrared radiation.
The principles for an IR sensor working as an object detection sensor can be explained using the
following figure. An IR sensor consists of an IR LED and an IR photodiode, together they are
called as photo- coupler or opt-coupler.
One of the inputs of an op-amp is at threshold value set by the potentiometer. The other input of
op-amp is from the photodiodes series resistor. When the incident radiation is more on the
photodiode, the voltage drop across the series resistor will be high. In the IC, both the threshold
voltage and the voltage across series resistor are compared. If the voltage across the resistor
series to photodiode is greater than that of the threshold voltage, the output of the IC op- amp is
high and vice versa. The output of the IC is connected to a controlling device. The threshold
voltage can be adjusted by adjusting the potentiometer depending on the environmental
conditions.
The positioning of the IR LED and the IR receiver is an important factor. When the IR LED is
held directly in front of the IR receiver, this setup is called direct incidence. In this case, almost
the entire radiation from the IR LED will fall on the IR receiver. Hence there is a line of sight
communication between the infrared transmitter and the receiver. If an object falls in this line, it
obstructs the radiation from reaching the receiver either by reflecting the radiation or absorbing
the radiations.
It is universal that black color absorbs the entire radiation incident on it and white color reflects
the entire radiation incident on it. Based on this principle, the second positioning of the sensor
couple can be made. The IR LED and photodiode are placed side by side.
When the IR transmitter emits infrared radiation, since there is no direct line of contact between
the transmitter and receiver, the emitted radiation must reflect back to the photodiode after
hitting any object. The surface of the object can be dividing in to two types: reflective surface
and non- reflective surface. If the surface of the object is reflective in nature i.e. it is white or
other light color, most of the radiation incident on it will get reflected back and reaches the
photodiode. Depending on the intensity of the radiation reflected back, current flows in the
photodiode.
If the surface of the object is non-reflective in nature i.e. it is black or other dark color, it absorbs
almost all the radiation incident on it. As there is no reflected radiation, there is no radiation
incident on the photodiode and the resistance of the photodiode remains higher allowing no
current to flow. This situation is similar to there being no object at all.
Characteristics of IR sensor
This is useful for security application, but sometimes makes measurements and optical system
design difficult.
Small energy
Infrared radiation energy is equal to the vibration or rotational energy of molecules. This
phenomenon makes it possible to identify molecules.
Long wavelength
This means infrared radiation is less scattered and offers better transmit ion through various
medium.
Emissivity varies with the surface condition of an object. It also usually varies with the
wavelength and temperature of an object. Since emissivity is equivalent to absorbance, the
emissivity of an object with large reflectance or transmittance becomes small.
1. RFID tags - these are electronic programmed with the unique information;
3. Antenna
1 RFID tags
The heart of the RFID system is a tag, which can be fixed inside in an object or directly attached
to an object. This tag is equipped with a programmable chip and an antenna. Each paper-thin tag
contains an engraved antenna and a microchip with a capacity of at least 64 bits.
Tags contain microchips that store the unique identification (ID) of each object. The ID is a
serial number stored in the RFID memory. The chip is made up of integrated circuit and
embedded in a silicon chip. RFID memory chip can be permanent or changeable depending on
the read/write characteristics. Read-only and rewrite circuits are different as read-only tag
contains fixed data and cannot be changed without re-program electronically. On the other hand,
re-write tags can be programmed through the reader at any time without any limit. RFID tags can
be different sizes and shapes depending on the application and the environment at which it will
be used.
1. Passive tags
2. Active tags
3. Semi-passive tags
Passive tags
Passive tags have no built-in power source. Power is provided by the radio frequency wave
created by the reader that includes in the antenna, a tiny but sufficient electrical current to
activate the tag. When the tag comes into the ranges of the radio frequency wave field created
by the reader, it uses that energy to power up its internal components and to communicate with
the reader. It transmits a weak signal, read distance range of 10 cm to a few meters, operating at
low frequencies (commonly 128 kHz, 13.6 MHz, 915 MHz), it operate until damaged or
discarded and small in size.
Active tags
Active tags have an internal power source (a battery) that provides the necessary power for the
operation of the tag over a period of time. The higher the beeping frequency, the shorter the
battery life, because active tags beep at specified intervals; the battery life is determined by the
frequency of the beeps. It transmits a stronger signal, have a longer “read” range (can exceed 100
meters, depending on antenna size), operating at higher frequencies (commonly 455MHz,
2.45GHz, or 5.8GHz), and expire after battery power runs out.
Semi-passive tags
Semi-passive tags are similar to active tags as they have their own power source, but the battery
is used just to power the microchip. The radio frequency energy is reflected back to the reader
like a passive tag. An alternative use for the battery is to store energy from the reader to emit a
response in the future, usually by means of backscattering. Tags which do not have a battery
need to emit their response reflecting energy from the reader carrier on the fly. Semi-passive tags
are comparable to active tags in reliability while featuring the effective reading range of a
passive tag.
Tag Frequencies
The range of the RFID tags depends on their frequency. This frequency determines the resistance
to interference and other performance attributes. The use/selection of RFID tag depends on the
application; different frequencies are used on different RFID tags. The following are the
commonly used frequencies:
• Microwave: works on above 2.45 GHz, it has good reader rate even faster than UHF tags.
Although at this frequency the reading rate results are not the same on wet surfaces and near
metals, the frequency produce better results in applications such as vehicle tracking (in and out
with barriers), with approximately 1 meter of tags read range.
• Ultra High Frequency: works within a range of 860-950 MHz, it can identify large numbers
of tags at one time with quick multiple read rate at a given time. So, it has a considerable good
reading speed. It has the same limitation as Microwave when is applied on wet surface and near
metal. However, it is faster than high frequency data transfer with a reading range of 3 meters.
Mostly UHF tags are worked in 2.45GHz.
• High Frequency: works on 10-15MHz and has less than one meter reading range but is
inexpensive and useful for access control, items identifications on sales points etc as it can
implanted inside thin things such as paper. The most common frequency for high frequency tag
is 13.56MHz.
• Low Frequency: works on30-500 kHz, it has approximately half a meter reading range and
mostly used for short reading range applications such as shops, manufacturing factories,
inventory control through in and out counts, access control through showing a card to the reader.
These low frequency tags are mostly not affected when applied on wet and near metal surfaces.
The most common frequencies used for low frequency tags are 125-134.2 kHz and 140-148.5
kHz.
2 Readers
Radio frequency identification readers or receivers are composed of a radio frequency module, a
control unit and an antenna to interrogate electronic tags via radio frequency (RF)
communication. The reader powers an antenna to generate an RF field.
When a tag passes through the field, the information stored on the chip in the tag is interpreted
by the reader and sent to the server, which in turn, communicates with the integrated library
system when the RFID system is interfaced with it. RFID reader works as a central place for the
RFID system. It reads tags data through the RFID antennas at a certain frequency. Basically, the
reader is an electronic apparatus which produce and accept a radio signals. The antennas contains
an attached reader, the reader translates the tags radio signals through antenna, depending on the
tags capacity. The readers consist of a build-in anti-collision schemes and a single reader can
operate on multiple frequencies. Readers use near and far fields of methodology to communicate
to the tag through its antennas. If a tag wants to respond to the reader then the tag will need to
receive energy and communicate with a reader. For example, passive tags use either one of the
two following methods.
Near Fields: Near field uses method similar to transformer, and employs inductive (magnetic)
coupling of the tag to the magnetic field circulating around the reader antenna (see figure 8).
Near-field coupling techniques are generally applied to RFID systems operating in the LF and
HF bands with relatively short reading distances.
Generally radio frequency identification reader (RFID reader) is a device that used to gather
information from an RFID tag, which is used to track individual objects. Radio waves are used to
transfer data from the tag to a reader.
In this project we will use CC2500 reader. CC2500 RF Module is a receiver module which
provides easy to use RF communication at 2.4 GHz. It can be used to transmit and receive data at
9600 baud rates from any standard CMOS/TTL source. This module is a direct line in
replacement for your serial communication it requires no extra hardware and no extra coding to
it works in Half Duplex mode i.e. it provides communication in both directions, but only one
direction at same time
RXD = Receive input, input serial data of 3 to 5v logic level, usually connected to TXD pin of
microcontroller.
TXD = Transmit output, output serial data of 3v logic level, usually connected to RXD pin of
microcontroller.
GND = Ground level of power supply. must be common ground with microcontroller
Specification
The antenna produces radio signals to activate the tag and read/write data to it. Antenna is the
channel between the tag and the reader, which controls the system‟s data acquisitions and
communication. The electromagnetic field produced by an antenna can be constantly present
when multiple tags are expected continually. The antenna uses radio frequency waves to transmit
a signal that activates the transponder. RFID antennas collect data and are used as a medium for
tag reading. It consists of the following types: Patch antennas, Gate antennas, Linear polarized,
Circular polarized, Di-pole or multi-pole antennas, Stick antennas, Beam-forming or phased-
array element antennas, Adaptive antennas, and Omni directional antennas.
RFID readers are devices that wirelessly communicate with tags to identify the item connected to
each tag and possibly associate the tagged item with related data. In other words, readers send
electromagnetic signal to the tag and read its response. They generally transmit their
observations to a controller and a computer system running RFID software. The antenna of the
RFID reader emits radio signals to activate the tag. When an RFID tag passes through the
electromagnetic zone, it detects the reader's activation signal. The reader decodes the data
encoded in the tag's integrated circuit (silicon chip) and the data is passed to the host computer or
controller for processing.
A power supply is a device that supplies electric power to one or more electric loads. A regulated
power supply is one that controls the output voltage or current to a specific value; the controlled
value is held nearly constant despite variations in either load current or the voltage supplied by
the power supply's energy source.
Regulated DC power supply is done by many steps: AC current is rectified and then filtered by
capacitor to obtain rippled current and after that regulated by voltage regulator to obtain DC
regulated power supply. See figure.2 below.
230v - -
50Hz
I I I I
A step down transformer A step down transformer is an electrical device that used to step
down the voltage from the AC mains to the required voltage level. The turn‟s ratio of the
transformer is so adjusted such as to obtain the required voltage. The output of the transformer is
given as an input to the rectifier circuit.
1 We want to reduce the voltage level which we get from the AC mains. Transformer can do the
job of reducing the voltage level in a simple and efficient manner.
2 The diode used in the rectifier block cannot handle such a high level of voltage from the AC
mains. So the voltage is the first stepped down by the transformer and the reduced voltage is
applied to the rectifier section.
Rectifier
Before understanding what rectifiers are and how they are used in power supplies, let us first
understand the meaning of the word “rectification”. Merriam-Webster dictionary define the word
rectification as “to correct by removing errors”.
The function of half wave rectifier and full wave rectifier is shown bellow. Full wave rectifiers
are the most commonly used rectifiers in power supply. Speaking of full wave rectifiers in
simple language, it simply allows the positive half cycle to pass through and inverts the negative
half cycle to positive half cycle. This is shown above in the block diagram of power supply and
its function is shown below.
Other than the issues of low power and limited life, a battery is an ideal DC source. It delivers
steady current virtually free of electrical noise. Rectified DC, on the other hand, needs filter
circuits to remove noise or minimize ripple voltage. Usually, these filters are simple, consisting
of large electrolytic capacitors. Though the DC coming from the filter has less noise, the voltage
can wander unpredictably, causing reliability issues with sensitive electronics. To solve that
problem, the power supply uses a voltage regulator.
Typically input output voltage of filters used in power supply is shown below.
Regulator
2. L1 = center tap Step down transformer with input of 230 V AC 50 Hz and output of (13.8V
AC 50Hz)
3. C1 = 3300uf capacitor
4. C2 = 10 uf capacitor
5. IC1: =L78S09 for +9V DC with 2A output (for microcontroller circuit) and LM323T5V with
3A output (cellular shield).
Components Selection
2. Capacitor V min;
230V 50Hz AC power is stepped down to 13.8V 50Hz. After that, positive power cycle from
transformer secondary will go through diode rectifier D1 and continue to positive side of
capacitor filter C1.also the negative power cycle from transformer secondary through rectifier
diode D2 to positive side of capacitor filter C1. The ripple in the voltages after rectifier diodes is
reduced by the filter to the desired one. Then the rippled voltage goes though the IC L78S09 to
get regulated 9 DC V which is the supply of the 9 DC V microcontroller circuits.
The LM323T is then connected in parallel with L78S09 to get 5V that supplies the cellular
shield.
The quality of the power supply is determined by various characteristics like load voltage, load
current, voltage regulation, source regulation, output impedance, ripple rejection, and so on.
Some of the characteristics are briefly explained bellow:
Load regulation – the load regulation or load effect is the change in regulated output voltage
when the load current changes from minimum to maximum value.
From the above equation we can understand that whenVno_load occurs the load resistance is
infinite, that is, the out terminals are open circuited. Vfull_load occurs when the load resistance
is of the minimum value when voltage regulation is lost.
Minimum load resistance – The load resistance at which a power supply delivers its full_load
rated current at rated voltage is referred to as minimum load resistance.
The value of current full load (Ifull_load), full load current should never increase than that
mentioned in the data sheet of the power supply.
The source regulation is defined as the change in regulated output voltage for a specified range
of line voltage.
Output Impedance – A regulated power supply is a very stiff dc voltage source. This means
that the output resistance is very small. Even though the external load resistance is varied, almost
no change is seen in the load voltage. An ideal voltage source has an output impedance of zero.
Ripple Rejection – Voltage regulators stabilize the output voltage against variations in input
voltage. Ripple his equivalent to a periodic variation in the input voltage. Thus, a voltage
regulator attenuates the ripple that comes in with the unregulated input voltage. Since a voltage
regulator uses negative feedback, the distortion is reduced by the same factor as the gain.
Traffic lights, also known as traffic signals, traffic lamps, traffic semaphore, signal lights, stop
lights, and (in technical parlance) traffic control signals, are signaling devices positioned at road
intersection, pedestrian crossings, and other locations to control flows of traffic.
The most basic traffic light consists of three bulbs with different colored lenses, which from top
to bottom are red, yellow and green.
1. Red This indicates that traffic must stop behind the line. It is compulsory for all road users to
do so. Some traffic lights even have cameras to catch drivers breaking this law.
2. Yellow This combination of bulbs indicates that the lights are about to change to green, and
gives drivers time to release their handbrake and prepare to drive off as soon as they are allowed
to do so.
3. Green This indicates that traffic may pass through the junction, provided that it is safe to do
so and the way is clear.
The system is mainly divided into two processes, those are monitoring of signaling with
according to density and detection of emergency vehicle, providing way for that vehicle. The
density of vehicles information is getting with the help of IR sensors placed towards the junction
on four roads, when it detects that the vehicle stopped. The process of continuous signaling is
stopped and then immediately it is transforming to the particular destination in which the density
of vehicle is high. In other side it is continuously monitors the RF receiver information. If the
levels at RF receiver changes then it automatically executes the information which we have
written in the programming.
The main heart of this traffic system is microcontroller. IR sensors are connected to the PORT C
(PC0, PC1,PC2 and PC3 ) of the microcontroller and traffic lights are connected to PORT Band
PORT D. if there is a traffic on road then the particular sensor output become logic 1 otherwise
logic 0. By receiving this IE sensor outputs, we have to write the program to control the traffic
system.
If you receive logic 1 from any of these sensors, we have to give the green signal to that
particular path and give red signal to all other paths. Here continuously we have to monitor the
IR sensor to check for the traffic.
CHAPTER FOUR
4. RESULT AND DISCUSSION
In this system we are give a regulated power supply for the operation of microcontroller from
DC source, connect four IR sensors to PORTC of the microcontroller, connect traffic lights to
PORTB and PORTD of the microcontroller, and arrange all the traffic lights and IR sensors in
each road. After arrange these elements we design the whole circuit diagram in protues
professional 8.0 software then our program is downloaded to Atmega8 microcontroller. After
simulating the circuit we are tried to observe that the traffic signal operation will be start by the
glowing traffic light Green first for the first road and in the remaining roads it glow the red
traffic lights. After glowing the yellow light for small time then the Green light will be glow in
the next road. The system performs this condition when there is no traffic density in the junction
that means when the traffic continues in normal traffic system. When there is a traffic density in
each or any of the road in the junction the Green traffic lights will be glow in each sides
according to its density, if a higher density in one of the road in the junction the traffic light will
be glow based on the sequence of the road according to its density and after glowing of the
yellow traffic light for small time the Green signal will be glow in the next road. The process is
repeated for every lane and for the same duration for normal time and according to its density
until the emergency status is activated. The IR sensor is attached at some distance from traffic
signal along each lane. These sensors keep track of amount of traffic along each road. When
traffic signal is changing in normal traffic in one lane, the IR sensor of next lane keeps checking
on the amount of traffic in that lane. When traffic becomes too high in that lane, the IR receiver
detects the light reflected back from the vehicle and the emergency status of that lane becomes
ON and the time duration of green signal of that lane is increased to get rid off from the heavy
traffic. Same process is carried on for the all the lanes. Then we are understood the traffic light
system that had been developed presents several advantages. Since the waiting time of the
vehicles for the lights to change is optimal, the emission of carbon monoxide from the vehicles is
reduced. This will give a positive effect to the greenhouse effect towards the environment. And
the traffic light system will also save the motorists‟ time and reduce their frustration while
waiting for the lights to change since it helps in reducing congestion at the traffic intersections.
CHAPTER FIVE
5. CONCLUSION AND RECOMMENDATION
5.1 Conclusion
In this paper we have proposed Smart traffic light control and congestion avoidance System
using microcontroller and IR sensors. The controller we used having the following features like
8bit atmega8 architecture in a 28 pin PDIP package, 1KB RAM and flash type on-chip program
memory. This system can also be used to control the change of traffic lights at intersection points
giving high priority to emergency vehicles. Furthermore this System can also provide smart
traffic routing that chooses the shortest routes having the least congestions based upon IR
received signals at various signals along a route. In this system, the traffic system is checked
according to its density of the road. This show how the traffic light Signal control the acquired
data from road side units reschedule the traffic light timing according to the traffic condition for
low or high density road traffic. If the density of the road traffic is high then maximum density of
traffic will allow maximum default timing for traffic lights. Minimum density of traffic will
allow traffic with minimum timing for traffic lights. If the traffic rate on both side is equal or gap
within traffic then according to arrival time traffic light signal set to minimized. Thus we have
studied the optimization of traffic light controller in a City using IR sensors and microcontroller.
By using this system configuration we tried to reduce the possibilities of traffic jams, caused by
traffic lights, to an extent and. No. of passing vehicle in the fixed time slot on the road decide the
density range of traffics and on the basis of vehicle count microcontroller decide the traffic light
delays for next recording interval. With automatic traffic signal control based on the traffic
density in the route, the manual effort on the part of the traffic policeman is saved. Emergency
vehicles like ambulance, fire trucks, need to reach their destinations at the earliest. If they spend
a lot of time in traffic jams, precious lives of many people may be in danger. With emergency
vehicle clearance, the traffic signal turns to green as long as the emergency vehicle is waiting in
the traffic junction. The signal turns to red, only after the emergency vehicle passes through.
5.2 Recommendation
The performance of the system is slightly sluggish. Some recommendations for future works is
listed below based on problems met in the project in order to improve the performance of the
system.
1. Hardware implementation
We are not performing the practical part of the system due to shortage of time, materials, and
economy of us. Thus we tried to perform this in the feature and also another person do in
updated form.
2. Software improvement
Using AVR studio4 we tried to Wright the program for the relation of atmega8 microcontroller
and IR sensors. By using the same or other software anybody Wright a program including
emergency part of the system and it changes more attractive system.
REFERENCE
[1] A. Albagul et al, 2006.Design and Development of Sensor Based Traffic Light System,
American Journal of Applied Sciences 3 (3): 1745-1749, ISSN 1546-9239.
[2] H.R.Kashani and G.N.Saridis “Intelligent Control for Urban Traffic Systems” International
Federation of Automatic Control Automatica, vol.19, No.
[3] PAPAGEORGIOU M., DIAKAKI C., DINOPOULOU V., KOTSIALOS A., WANG Y.:
„Review of road traffic control strategies‟, Proc.
[4]S. Sharma, A. Pithora, G. Gupta, M. Goel, and M. Sinha, “Traffic light priority control for
emergency vehicle using RFID,” Int. J. Innov. Eng. Technol., vol. 2, no. 2, pp. 363–366, 2013.
[5] W. Wen & C. L. Yang. “A dynamic and automatic traffic light control system for solving the
road congestion problem”.
APPENDEX
#define F_CPU 16000000UL
#include <avr/io.h>
#include <util/delay.h>
#define R1 PB0
#define Y1 PB1
#define G1 PB2
#define R2 PB3
#define Y2 PB4
#define G2 PB5
#define R3 PD5
#define Y3 PD4
#define G3 PD3
#define R4 PD2
#define Y4 PD1
#define G4 PD0
int main(void)
DDRB = 0xff;
DDRD = 0xff;
DDRC = 0x00;
PORTB = 0x00;
PORTD = 0x00;
while(1)
Thesis ECE (Control Engineering) Page 57
Smart traffic light control system 2016
{
if((PINC&0x01) == 0x01)
PORTB |= (1<<G1);
PORTB |= (1<<Y2);
PORTD |= (1<<R3);
PORTD |= (1<<R4);
PORTB |= (1<<R1);
PORTB |= (1<<G2);
PORTD |= (1<<Y3);
PORTD |= (1<<R4);
PORTB |= (1<<R1);
PORTB |= (1<<R2);
PORTD |= (1<<G3);
PORTD |= (1<<Y4);
PORTB |= (1<<Y1);
PORTD |= (1<<R3);
PORTD |= (1<<G4);
else
PORTB = 0x00;
PORTD = 0x00;
PORTB |= (1<<G1);
PORTB |= (1<<Y2);
PORTD |= (1<<R3);
PORTD |= (1<<R4);
_delay_ms(8000);
PORTB = 0x00;
PORTD = 0x00;
PORTB |= (1<<R1);
PORTB |= (1<<G2);
PORTD |= (1<<Y3);
PORTD |= (1<<R4);
_delay_ms(8000);
PORTB = 0x00;
PORTD = 0x00;
PORTB |= (1<<R1);
PORTD |= (1<<G3);
PORTD |= (1<<Y4);
_delay_ms(8000);
PORTB = 0x00;
PORTD = 0x00;
PORTB |= (1<<Y1);
PORTB |= (1<<R2);
PORTD |= (1<<R3);
PORTD |= (1<<G4);
_delay_ms(8000);
PORTB = 0x00;
PORTD = 0x00;
List of tables
Table 1 AVR microcontroller type ............................................................................................................... 20
Table 2 Comparison of AVR with other two families of microcontroller..................................................... 21
Table 3 specification of ATmega8 microcontroller ..................................................................................... 26
List of acronym
IR Infra red