Dynamic Traffic Light Control Using Microcontroller: Industrial and Control Engineering
Dynamic Traffic Light Control Using Microcontroller: Industrial and Control Engineering
Dynamic Traffic Light Control Using Microcontroller: Industrial and Control Engineering
USING MICROCONTROLLER
Submitted to Arba Minch University, Institute of Technology, Electrical and
Computer Engineering Department in partial fulfilment of the requirements
For
The award of degree of
B.Sc.
In
Amrellah Tewfik
Asseged Eshetu
Bereket Berhanu
Fuad Jemal
Muhammed Jemal
June 2014.
CERTIFICATE
i
Acknowledgement
It is a matter of great pleasure & privilege for us to present this report of minor project on “Traffic
light controller using PIC 16F877A”. Through this project report we would like to thank numerous
people whose consistent support and guidance has been the standing pillar in architecture of this
project.
We would like to thank our instructor Mr. H/Mareyam and Mr.Balak Krishnan for exposing us to
the world of Embedded Systems.
We would also like to thank our coordinators and add Advisores Mr. Asrat Gedefa and Dr.
Sunder Rajan for their enduring support and guidance throughout the project. We are very grateful
to the whole faculty for their support and guidance.
We are also thankful to Mr.Brhanu Oumer, overall project coordinator and Mr.Natnael Chutta,
Head of Department (Electrical and Computer engineering) Last but not the least, we are grateful to
the almighty for enabling us to present this project report as the outcome of our learning in this very
form.
Date June 23, 2014
ii
Abstract
Vehicular traffic at intersecting streets is typically controlled by traffic control lights. The function
of traffic lights requires sophisticated control and coordination to ensure that traffic moves as
smoothly and safely as possible. In recent days electro-mechanical controllers are replaced by
electronic circuits. The accuracy & fault tolerant drive towards electronic circuits. This project is
developed to meet the requirements of a 4-way solid state traffic lane by using a traffic light
controller with microcontroller as the main controlling element, and led ’s as the indication of light.
Our device provides an effective way to reduce the amount of waiting time of each commuter in
every lane of the 4-way road before he can pass the junction without risking the chance of accidents
during lane changes. A micro controller is interfaced to LEDs provide for centralized control of the
traffic signals. Microcontroller is programmed in such a way to provide their timing and phasing in
a fair manner to each lane. Two seven segment displays are used to display the count timings of
each light of opposite lanes. This project can be enhanced in such a way as to automatically control
the signals depending on the number of vehicles on the roads using sensors like IR detector/receiver
module extended with automatically. The circuit besides being reliable and compact is also cost
effective.
iii
Table of Contents
Acknowledgement ............................................................................................................................................. ii
Abstract ................................................................................................................................................................ iii
List of figure ........................................................................................................................................................ vi
List of table .......................................................................................................................................................... vi
Abbreviation ...................................................................................................................................................... vii
Chapter 1.......................................................................................................................................................................... 1
Introduction............................................................................................................................................................... 1
1.1 Problem statement ........................................................................................................................................ 2
1.2 Project Background ....................................................................................................................................... 2
1.2.1 Objective of the project ........................................................................................................................ 2
1.2.2 Scope of project ...................................................................................................................................3
1.2.3 Brief description ..................................................................................................................................3
1.2.4 Connection diagram.......................................................................................................................... 6
1.2.5 Flow chart .............................................................................................................................................7
Chapter Two ................................................................................................................................................................. 8
2. Literature review ................................................................................................................................................ 8
2.1 The traffic light system ................................................................................................................................ 8
2.2 Traffic light objectives .............................................................................................................................. 8
2.3 Advantages of traffic light ........................................................................................................................ 8
2.4 Traffic light history .................................................................................................................................... 8
2.5 PIC Microcontrollers ................................................................................................................................ 9
2.5.1 Overview and Features .................................................................................................................... 9
2.5.2 ARCHITECTURE of PIC 16F877A ..............................................................................................11
2.5.3 Pin Diagram ........................................................................................................................................ 12
2.5.4 PIC Features ....................................................................................................................................... 12
Chapter 3 ....................................................................................................................................................................... 16
3. Design Hardware and Software Development ......................................................................................... 16
3.1 HARDWARE COMPONENTS USED .................................................................................................. 16
3.1.1 VOLTAGE REGULATOR (IC 7805) .............................................................................................. 16
iv
3.1.2 SEVEN SEGMENT DISPLAY ....................................................................................................... 17
3.1.3 RESISTOR ......................................................................................................................................... 19
3.1.4 CAPACITOR .................................................................................................................................... 19
3.1.5 BERG CONNECTOR ..................................................................................................................... 19
3.1.6 OSCILLATOR ................................................................................................................................... 19
3.1.7 LED ....................................................................................................................................................... 19
3.1.8 Infra-Red (IR) Sensors ................................................................................................................... 20
3.1.9 DECODER (74LS47) ....................................................................................................................... 21
3.1.10 TRANSISTOR .................................................................................................................................. 23
3.1.11 PICKIT 2 USB PROGRAMMER ................................................................................................ 23
3.2 Software design ......................................................................................................................................... 24
3.2.1 Software development tools ......................................................................................................... 24
3.2.2 Software used.................................................................................................................................... 25
3.2.3 Design and Implementation ......................................................................................................... 29
3.2.4 Calculation ........................................................................................................................................ 30
3.2.5 Connection circuit diagram for proteus..................................................................................... 31
3.3 Coding ......................................................................................................................................................... 32
Chapter Four ............................................................................................................................................................... 34
4. RESULTS AND DISCUSSIONS .................................................................................................................. 34
4.1 Results ......................................................................................................................................................... 34
4.2 Discussions ................................................................................................................................................. 34
Chapter 5 ...................................................................................................................................................................... 35
5. Conclusion and future scope ........................................................................................................................ 35
5.1 Conclusion ..................................................................................................................................................... 35
5.2 Future Scope .............................................................................................................................................. 35
v
List of figure
List of table
vi
Abbreviation
DC Direct Current
IR Infrared Sensor
vii
Chapter 1
Introduction
Traffic congestion is a severe problem in many modern cities around the world. Traffic
congestion has been causing many critical problems and challenges in the major and most
populated cities. To travel to different places within the city is becoming more difficult for the
travellers in traffic. Due to these congestion problems, people lose time, miss opportunities, and
get frustrated. Traffic congestion directly impacts the companies. Due to traffic congestions there
is a loss in productivity from workers, trade opportunities are lost, delivery gets delayed, and
thereby the costs goes on increasing.
To solve these congestion problems, we have to build new facilities & infrastructure but at the
same time make it smart. The only disadvantage of making new roads on facilities is that it
makes the surroundings more congested. So for that reason we need to change the system rather
than making new infrastructure twice. Therefore many countries are working to manage their
existing transportation systems to improve mobility, safety and traffic flows in order to reduce
the demand of vehicle use.
The project uses simple Electronic components such as LED as Traffic Light indicator and a
Microcontroller for auto change of signal after a pre-specified time interval.
Microcontroller PIC16F877A is the brain of the project which initiates the traffic signal at a
junction. The LEDs are automatically on and off by making the corresponding port pin of the
micro controller high. A seven segment display also connected to display the timing of each
signal. At a particular instant only one green light holds and other lights hold at red. During
transition from green to red, the present group yellow led and succeeding group yellow led glows
and then succeeding group led changes to green. This process continues as a cycle.
In our research we focus on optimization of traffic light controller in a city using IR sensor and
developed visual monitoring using microcontroller PIC16F877A.Roadwork and accidents further
influence complexity and performance. In this paper, we propose two approaches, the first
approach to take data/input from object or vehicle with using IR sensor and in the second
approach to process the input data by Microcontroller and finally display it on the traffic light
signal to control the Closed Loop System.
Designing the traffic light controller circuit and programming of the PIC 16F designing
Construct a model of four way junction of a traffic light model
Solving the congestion at the side roads
Sensors are implemented in the side road to detect how many vehicles are their
Combine the software part and the hardware part to simulate a traffic light system
The project uses simple electronic components such as LED as Traffic Light indicator, a
seven segment display, Infra-red (IR) sensor and a Microcontroller for auto change of signal
after a pre-specified time interval. Figure shows the drawing of the 4-way junction, where
each way has its traffic light and counter
Microcontroller PIC 16F877A is the brain of the project which initiates the traffic signal at a
junction.
LEDs used are red, yellow and green. Red LED indicates “stop driving” Yellow LED indicates
“start stopping” Green LED indicates “drive”. The sequence of altering the LEDs according to
their colour is as shown in the figure below: Green-Yellow-Red-Green. Twelve LEDs are used;
three to each traffic light. The LED’s are automatically on and off by making the corresponding
port pin of the micro controller high. Furthermore associated is the right turn green lights which
are on for the first 10 seconds of the total green light time.
7-segment LED displays are used to show the current count value. Since all of the traffic
lights are working simultaneously, each one is to display a different digit than the other.
When a traffic light is tuned green, its corresponding 7-segment displays start counting down
from a specific value and decrements until zero is reached. After this the counter starts by a
new count value at the moment the yellow light turns on. When the red light turns on after
the yellow took its time, the count continues to decrement until reaching zero. This means
that the same 7-segments, on each traffic light, are used to display the count when cars are
allowed and not allowed to pass. In terms of counting, the yellow and red are considered one
set while the green is another set. The circuit board designed supports in-circuit serial
Arba minch university institute of technology, AMiT 4
Dynamic traffic light control using microcontroller 2014
programming (ICSP) for the PIC. This support eases the way to the designer to program the
microcontroller without the need to plug the microcontroller in and out repeatedly.
The following flow represents the sequence of operation done by the signal.
Each sensor transmits the status periodically to the controller.
Controller receives the signals and computes the following: - Check all counters how
many vehicles are there then give command signal for each traffic light sequence ally.
This chapter will discuss literature review of this project. The content of literature review is one
of the important steps to gather information about the project. Literature review will explore the
basic history and evolution of traffic light system, microcontroller review especially PIC
16F877A and PIC programming that is used in this project.
middle of the street. Other cities soon adopted the idea of having someone on the scene to control
the lights. Garrett Morgan, inventor of the gas mask, also developed traffic signalling devices.
Having witnessed an accident between a car and a carriage, Morgan felt compelled to devise a
system to prevent such collisions at street intersections. In 1923 he patented an electric traffic
light system using a pole with a cross section on which the words STOP and GO were
illuminated. These basic designs were soon improved. In 1926 the first automatic signals were
installed in London; they depended on a timer to activate them. In the 1930s vehicle activated
lights were created in which cars rolled over half-buried rubber tubes. Air in the tubes was
displaced by the weight of the car rolling over them, and the increased pressure operated an
electric contact, activating the lights. But these tubes wore out quickly. A better idea was the
inductive-loop device: a loop of wire was imbedded in the road itself and connected to a box
controlling the lights; a current of electricity passed through the loop, and when the steel body of
a car passed overhead, it produced a signal that activated the light. Today, traffic is automatically
routed onto limited access highways courtesy of a computer activated guidance system that
determines traffic volume on the highway. Global positioning satellite systems (GPS) are
installed in many cars. These systems connect with a satellite and inform drivers where they are
and possible routes to their destination. Such systems will eventually enable a drive to determine
the best route to a destination given prevailing traffic conditions
The PIC 16F8XX Microcontrollers are basically RISC microcontrollers with very small
instruction set of only 35 instructions and a two-stage pipeline concept fetch and
execution of instructions. As a result, all instructions execute in a single cycle except for
program branches.
PIC 16F877A is a 40-pin 8-Bit CMOS FLASH Microcontroller. The core architecture is
high-performance RISC CPU. Since it follows the RISC architecture, all single cycle
instructions take only one instruction cycle except for program branches which take two
cycles.
16F877A comes with 3 operating speeds with 4, 8, or 20 MHz clock input. Since each
instruction cycle takes four operating clock cycles, each instruction takes 0.2 μs when
20MHz oscillator is used.
It has two types of internal memories .One is program memory and the other is data
memory. Program memory is provided by 8K words (or 8K*14 bits) of FLASH Memory,
and data memory has two sources. One type of data memory is a 368-byte RAM (random
access memory) and the other is256-byte EEPROM (Electrically erasable programmable
ROM).
The core features include interrupt up to 14 sources,
power saving SLEEP mode,
A single 5V supply and In-Circuit Serial Programming (ICSP) capability.
Memory Organization
The memory module of the PIC controller has three memory blocks.
a) Program Memory The PIC 16F8XX has 4k x14 program memory space (0000H-0FFFH).It
has a 13 bit Program counter(PC) to access any address (213=4k). This PIC family uses 13-bit
program counter allowing the controllers to an 8k-program memory without changing the CPU
structure. FIGURE-8 PROGRAM MEMORY
b) Data memory. The data memory of PIC 16F8XX is partitioned into multiple banks which
contain the general purpose registers and the Special function Registers. (SFRs).The bits RP1
and RP0 bits of the status register are used to select these banks. Each bank extends up to 7FH
(128 Bytes).The lower bytes of the each bank are reserved for the Special Function Registers.
Above the SFRs are general purpose registers implemented as static RAM.
PORT A: Port A is a 6-bit wide bi-directional port. Its data direction register is TRISA
setting TRISA bit to 1 will make the corresponding PORTA Pin an input. Clearing a
TRIS a bit will make the corresponding pin as an output.
PORT B: Port B is an 8-bit wide, bi-directional port. Four of the PORT B pins RB7 –
RB4 have an interrupt-on- change feature. Only the pins configured as inputs can cause
this interrupt to occur.
PORT C: Port C is an 8-bit wide, bidirectional port. Bits of the TRISC Register
determine the function of its pins. Similar to other ports, a logic one 1 in the TRISC
Register configures the appropriate port pin as an input.
PORT D: Port D is an 8-bit wide bi-directional port. In addition to I/O port, Port D also
works as 8-bit parallel slave port or microprocessor port. When control bit PSPMODE
(TRISE: 4) is set.
PORT E: It is a 3-bit bi-directional port. Port E bits are multiplexed with analog inputs of
ADC and they serve as control signals (RD, WR and CS) for parallel slave port mode of
operation.
Addressing Modes
The PIC microcontrollers support only TWO addressing modes .They are,
(i) Direct Addressing Mode
(ii) Indirect Addressing mode Direct Addressing Mode In direct addressing mode 7 bits
(0-6) of the instruction identify the register file address and the 8th bit of the register
file address register bank select bit (RP0). Indirect Addressing Mode In the indirect
addressing mode the 8-bit register file address is first written into a Special Function
Register (SFR) which acts as a pointer to any address location in the register file. A
subsequent direct access of INDF will actually access the register file using the
content of FSR as a pointer to the desired location of the operand.
Instruction Set
The instruction set of PIC is divided into three basic categories. They are:
(a) Byte oriented Instructions
(b) Bit oriented Instructions
(c) Literal and Control Instructions
Byte Oriented Instructions In a byte oriented Instructions f represents a file register and d
represents destination register. The destination specifies where the result of operation is to be
placed. If D= 0 the result is placed in W register (Accumulator) and if d = 1, the result is placed
in the file register specified in the instruction. ADDWF f, d: Add W and f CLRF f: Clear f
MOVWF f, d: Move f NOP: No operation SUBWF f, d: Subtract W from f Bit Oriented
Instruction In bit oriented instructions, b represents a bit field designator which selects the
number of the bit affected by the operation and f represents the number of the file in which the
bit is located. BCF f, b: Bit clear f BSF f, b: Bit set f BTFSC f, b: Bit test f, skip if set
Literal and Control Instructions In literal and control instructions K represents an 8 or 11 bit
constant or literal value. ADDLW k: Add literal and W ANDLW k: AND literal with W CALL
k: Call subroutine MOVLW k: Move literal to W
Classification of Instructions
The PIC 16F family of microcontrollers has a total of 33 pins arranged into 5 ports. Port A, Port
B, Port C, Port D and Port E. In order to use them as I/O ports, they must be properly
programmed. In addition to acting as I/O ports, they also have certain additional functions like
ADC, Timers, Interrupts and serial communication pins etc.
Limitations
o One accumulation
o Register-bank switching is required to access the entire RAM of many devices
o Operations and registers are not orthogonal; some instructions can address RAM
and/or immediate constants, while others can only use the accumulator Stack
limitations:
o The hardware call stack is not addressable, so pre-emptive task, switching cannot
be implemented.
o Software-implemented stacks are not efficient, so it is difficult to generate re-
entrant code and support local variables
IC 7805 is a 5V Voltage Regulator that restricts the voltage output to 5V and draws
5V regulated power supply.
It comes with provision to add heat sink. The maximum value for input to the
voltage regulator is 35V.
It can provide a constant steady voltage flow of 5V for higher voltage input till the
threshold limit of 35V.
If the voltage is near to 7.5V then it does not produce any heat and hence no need
for heat sink. If the voltage input is more, then excess electricity is liberated as heat
from 7805.
It regulates a steady output of 5V if the input voltage is in rage of 7.2V to 35V.
Hence to avoid power loss try to maintain the input to 7.2V.
Four common anode 7-segment displays are used in this 4-way traffic light control
system. Figure 3.2 shows a segment LED display and its pin description.
It is a 10-pin display device. The pins are: a, b, c, d, e, f, g, DP (dot) and com. The pins
labelled as “com” are internally connected to each other.
The digits displayed in every 7-segment range from 0 to 9. Since the required numbers to
display are more than 9, two 7-segment LED displays (left and right) were used for every
traffic light and this is why 4 displays were used in this project (a pair for each opposite
lanes). The data pins (a, b, c, d, e, f and g) for the left and right displays in every strip
board are connected to each other because they are multiplexed.
Multiplexing is made by using a 3 to 8 decoder.
The IC (74LS47) is used to select which 7 segment to show the digit. This chip has 4 input
pins labelled A, B and C and 8 output pins labelled. The input pins are connected to the
microcontroller for it to select which 7 segment to light up.
3.1.3 RESISTOR
3.1.4 CAPACITOR
3.1.6 OSCILLATOR
Light emitting diodes (LEDs) are semiconductor light sources. The light emitted from LEDs
varies from visible to infrared and ultraviolet regions. They operate on low voltage and power.
LEDs are one of the most common electronic components and are mostly used as indicators in
circuits. They are also used for luminance and optoelectronic applications. Three colours of LED
are used in this project.
They are:
The DM74LS47 accepts four lines of BCD (8421) input data, generates
their complements internally and decodes the data with seven AND/OR
gates having open-collector outputs to drive indicator segments directly.
Each segment output is guaranteed to sink 24 mA in the ON (LOW) state
and withstand 15V in the OFF (HIGH) state with a maximum leakage
current of 250 mA. Auxiliary inputs provided blanking, lamp test and Figure 3.8 74LS47 decoder
cascadable zero-suppression functions.
Figure 3.9- Decoder (74LS47) (a) connection diagram (b) pin description
3.1.10 TRANSISTOR
A transistor is an electronic control device, where an electrical signal input can control another
electrical signal. The very name derives from the fact that this control action was seen as an input
current flowing into one resistor (base-emitter) causing a larger current in another resistor
(collector-emitter). The early named for this device was the transfer-resistor and hence
transistor.
In digital circuits, transistors are always used as a switch. Like a common light switch, the ideal
digital transistor is, at any one instant, either "off" with zero current flowing through it, or "on"
with nearly zero voltage across it. There are occasional transitions between the two states, but in
this book we ignore the details of what happens during the transition.
Features:
Separate programmer/debugger unit which plugs into the board carrying the chip to be
programmed.
The PICkit 2 is open to the public, including its hardware schematic, firmware source
code and application programs.
Programmer-To-Go: Set up a PICkit 2 to program a device without the need for a PC.
128K byte memory.
Easy to use with MIKROC® IDE and other development environments.
Includes the UART Tool and Logic Tool microcontroller development utilities.
The PICkit 2 Programmer application allows you to program all supported devices listed in the
PICkit 2 Readme file.
The tools for developing software and hardware for microcontroller-based systems include
editors, assemblers, compilers, debuggers, simulators, emulators, and device programmers. A
typical development cycle starts with writing the application program using a text editor. The
program is then translated into an executable code with the help of an assembler or compiler. If
the program has several modules, a linker is used to combine them into a single application. Any
syntax errors are detected by the assembler or compiler and must be corrected before the
executable code can be generated. Next, a simulator is used to test the application program
without the target hardware. Simulators are helpful in checking the correctness of an algorithm
or a program with limited or no input-outputs, and most errors can be removed during
simulation. Once the program seems to be working and the programmer is happy with it, the
executable code is loaded to the target microcontroller chip using a device programmer, and the
system logic is tested. Software and hardware tools such as in-circuit debuggers and in-circuit
emulators can analyse the program’s operation and display the variables and registers in real time
with the help of breakpoints set in the program. Software development tools are computer
programs, usually run on personal computers that allow the programmer (or system developer) to
create, modify, and test applications programs.
Some common software development tools are:
Text editors
Assemblers/compilers
Simulators
High-level language simulators
Integrated development environments (IDEs)
1. Micro C Pro
Micro C is a powerful, feature rich development tool for PIC micros. It is designed to provide
the customer with the easiest possible solution for developing applications for embedded
systems, without compromising performance or control. PIC and C fit together well: PIC is
the most popular 8-bit chip in the world, used in a wide variety of applications, and C, prized
for its efficiency, is the natural choice for developing embedded systems. Micro C provides a
successful match featuring highly advanced IDE, ANSI complaint compiler, broad set of
hardware libraries, comprehensive documentation, and plenty of ready-to-run applications.
Micro C allows us to quickly develop and deploy complex applications:
Writing C code using highly advanced Code Editor
It includes design libraries to dramatically speed up the development: data
acquisition, memory, displays, conversions, and communications.
Monitoring program structures, variables and functions in the code explorer.
Generates commented, human readable assembly, and standard HEX compatible
with all programmers.
Inspecting program flow and debugging executable logic with the integrated
debugger. Similar Getting detailed reports and graphs on code statistics, assembly
listings, calling tree.
Proteus v8 is software for microprocessor simulation, schematic capture, and printed circuit
board (PCB) design. It is developed by Lab enter Electronics.
System components:
ISIS Schematic Capture - a tool for entering designs.
PROSPICE Mixed mode SPICE simulation - industry standard SPICE3F5 simulator
combined with a digital simulator.
ARES PCB Layout - PCB design system with automatic component placer, rip up and
retry auto-router and interactive design rule checking.
VSM - Virtual System Modelling lets co-simulate embedded software for popular
micro-controllers alongside hardware design.
System Benefits Integrated package with common user interface and fully context
sensitive help.
As we have seen in the above chapters, the traffic light control using microcontroller needs to
design and implementing properly.
The first thing to design the project is starting the flow chart is shown in figure (). The concept of
the project is clearly seen in the flow chart. Let as discuss about the steps clearly.
The voltage regulator takes the voltage at a range of 7 to 35 volt. But we have to give
12V as average volt and also the regulator take the ground. It is known that the output
voltage is +5V. Then this volt is applied for all pins that have need the supply voltage,
like decoder, M.C, 7-segment …
From the microcontroller all of PORTB pins are interrupted. So it has to connect to the
sensor.
PORTC is connected to the decoders. It is used to show how many seconds green light is
glow. Already the microcontroller counts HEXA decimal. The decoder is converted to
seven segments.
PORTD and the first pins of PORTA have connected to the LED through the 330 ohm
resistors.
The LED gets the supply voltage from the transistor. The transistor gets the power to
generate by its base pin from the microcontroller of PORTE. Then it will be generate.
3.2.4 Calculation
Since our project is to count the number of vehicles and vary the seconds to glow the green light.
So between the traffic light and the sensor that send the signal data must have some distance. We
can adjust the limit of the number of the vehicles by adjusting the distance.
Before that what is the length of the vehicle?
There are many vehicles that are different by size (length). In Arba Minch town, we can separate
the vehicles depending on their length, in to three parts.
The minimum length of the vehicles, about 1.5 meters and near to this.
The middle length of the vehicles, about 3 meters and near to this.
The maximum length of the vehicle, about 7 meters and near to this.
From the data’s 40% of the vehicles is minimum length. 50% of those are middle, and also 10%
is large.
So we can calculate first the average length of the vehicles.
=2.8 meters
Since the average vehicle length is 2.8 m, and the gap between each cascaded vehicle is 0.2m,
then the overall distance in a vehicle is 3meters.
So if we want to cascade ten vehicles, the sensor must put about 30 meters long from the traffic
light.
In this project, the distance is 30 meters. Because of the road in the Arba Minch town is so short.
Depending on the road you can vary the distance of the sensor from the traffic light.
The usable connection diagram of the traffic light control using microcontroller is shown below
3.3 Coding
Finally the proteus design has needed the source code. So, the final code is shown below.
4.2 Discussions
This project can be enhanced in such a way as to automatically control the signals depending on
the traffic density on the roads using sensors like IR detector/receiver module extended with
automatic turn off when no vehicles are running on any side of the road which helps in power
consumption saving. The timing of green and red light at each crossing of road will be decided
by microcontroller based on the number of vehicles.
5.1 Conclusion
In conclusion, this paper has successfully demonstrated an improved traffic controller and also we
have studied the optimization of traffic light controller using IR sensors and microcontroller.
Figure1 shows four ways traffic light model Figure2 shows the basic block diagram of the
system and figure4 shows the complete circuit diagram of microcontroller board. By using this
system configuration we tries to reduce the possibilities of traffic jams or congestion, caused by
traffic lights, to an extent and we have successfully gets the results. The witting time of green
light and red light decided basis of vehicle counts microcontroller based on the number of
vehicles detected by IR sensors.
The improvement of town traffic condition is largely dependent on the modern ways of traffic
management and control. Advanced traffic signal controllers and control system contribute to the
improvement of the traffic problem. The Dynamic traffic light controller is introduced in this
project with powerful functions and hardware interface. This project has two major phases. The
first stage is to design a program, which consists of reading, research, planning and designing a
program. Microcontroller Assembly Language was chosen to write a program code for
simulation only to get a timing diagram. After that, second phase is to continue with the
hardware implementation using the embedded system and the interface light is using LED. It is
observed that the proposed Dynamic Traffic Light Controller is more efficient than the
conventional controller in respect of less waiting time. Moreover, the designed system has
simple architecture, fast response time, user friendliness and scope for further expansion.
red light is glow and sending massage to traffic police by using GSM which is beneficial for security
purposes, pedestrian traffic management and air traffic control.
REFRENCES
For Books
John B.Peatman- PIC Microcontroller design, 1st edition: Pearsons Education; 1997
Muhammad Ali Mazidi- PIC Microcontroller and Embedded systems, 3rd edition: Pearsons
Education; 2007
Iovine John- PIC Microcontroller Project Book, 2nd Edition, Singapore: McGraw Hill 121-123;
2000. Nd
Appendix 1
Table 2 components
Appendix 2