DENSITY BASED TRAFFIC SIGNAL SYSTEM USING MICROCONTROLLER A Report in Partial Fulfilment of the Requirement for The Award of the Degree of BACHELOR OF TECHNOLOGY (Electronics and Communication Engineering) To DR. APJ ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW-160014 SUBMITTED BY KRITY KUMARI ROLL NO. 1233331031 UNDER THE SUPERVISION OF Mr. NAVEEN DUBEY Assistant Professor DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING RAJ KUMAR GOEL INSTITUTE OF TECHNOLOGY FOR WOMEN GHAZIABAD-201003 May, 2016
30
Embed
Density Based Traffic signal system using microcontroller
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
DENSITY BASED TRAFFIC SIGNAL SYSTEM USING
MICROCONTROLLER
A Report in Partial Fulfilment of the Requirement for The Award of the
Degree of
BACHELOR OF TECHNOLOGY (Electronics and Communication Engineering)
To
DR. APJ ABDUL KALAM TECHNICAL UNIVERSITY
LUCKNOW-160014
SUBMITTED BY
KRITY KUMARI
ROLL NO. 1233331031
UNDER THE SUPERVISION OF Mr. NAVEEN DUBEY
Assistant Professor
DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING
RAJ KUMAR GOEL INSTITUTE OF TECHNOLOGY FOR WOMEN
GHAZIABAD-201003
May, 2016
ii
DECLARATION
I ,Krity Kumari hereby declare that the work which is being presented in this report titled
“Density based Traffic Signal System Using Microcontroller” by me, in partial fulfillment of
the requirements for the award of Bachelor of Technology (B.Tech) Degree in “Electronics and
Communication Engineering” at Department of Electronics and Communication Engineering,
Raj Kumar Goel Institute of Technology for Women, is an authentic record of my own work
carried out under supervision of Mr Naveen Dubey and Lab coordinator Praveen Kumar.
Date : Krity kumari Roll Number : 1233331031
iii
CERTIFICATE
This is to certify that the report titled “Density based traffic signal system using
microcontroller” submitted by krity kumari in partial fulfillment of the requirements for the
award of Bachelor of Technology (B.Tech) Degree in “Electronics and Communication
Engineering” at Department of Electronics and Communication Engineering, Raj Kumar Goel
Institute of Technology for Women, is an authentic record of work carried out by her under the
supervision of Mr. Naveen Dubey. The project has reached the standards of full filling the
requirement to award the degree.
Date: Mr. Naveen Dubey
(Assistant Professor)
(Project Guide)
Mr. Kunal Lala
(Assistant Professor)
(Project Coordinator)
Mrs. Reshu Gupta
(Head of Department) (External Examiner)
RAJ KUMAR GOEL INSTITUTE OF TECHNOLOGY FOR WOMEN
Ghaziabad-201013 (UP)
Affiliated to
DR. A.P.J ABDUL KALAM TECHNICAL UNIVERSITY
iv
ACKNOWLEDGEMENT
The satisfaction that accompanies that the successful completion of any task would be
incomplete without the mention of people whose ceaseless cooperation made it possible, whose
constant guidance and encouragement crown all efforts with success.
We are grateful to Mr. Naveen dubey, Ms. Reshu Gupta (HOD EC) and all the faculty members
of EC Department for their guidance, inspiration and constructive suggestions that helped us in
the preparation of this report. We are very thankful to our Lab Instructors Mr. Praveen Kumar,
Mr. Pyush Tyagi, Mr. Sanjay Sharma, Mr. Manoj Kumar and Mr. Vijay of EC Department for
their consistence help to complete this task on time.
We also thank our colleagues who have helped in successful completion of the project report.
Date : Krity kumari Roll Number : 1233331031
v
ABSTRACT
Nowadays, controlling the traffic becomes major issue because of rapid increase in automobiles
and also because of large time delays between traffic lights. So, in order to rectify this problem,
we will go for density based traffic lights system. This article explains you how to control the
traffic based on density.
In this system, we will use IR sensors to measure the traffic density. We have to arrange one IR
sensor for each road; these sensors always sense the traffic on that particular road. All these
sensors are interfaced to the microcontroller. Based on these sensors, controller detects the traffic
and controls the traffic system.
vi
Topic Page No.
Declaration ii
Certificate iii
Acknowledgment iv
Abstract v
Contents vi
List of figures viii
Chapter 1: INTRODUCTION 1
1.1 Introduction 1
Chapter 2: LITERATURE REVIEW 2
2.1 Study of several research paper 2
2.2 Problem definition 3
2.3 Objective 3
Chapter 3: HARDWARE DESCRIPTION
4
3.1 Block diagram 4
3.2Components required 4
3.2.1 Atmega32 4
3.2.1.1 Features 5
CONTENTS
vii
4.5 Simulation process 16
4.6 Proteus simulation of circuit 16
4.7 PCB designing process 18
Conclusion 20
Future scope and applications 21
References 22
3.3 IR sensor 8
3.3.1 Technical specification 8
3.4 Resistance 10
3.5 LED 10
Chapter 4: Software design and hardware results 12
4.1 Installing tools for c programming 12
4.2 Using an ICC AVR project 12
4.3 Creating an ICC AVR project 12
4.4 Compiling C code to HEX file 14
viii
Figure Caption Page No.
3.1 Block diagram of density based traffic system 4
3.2.1
3.3
Atmega 32 pin configuration
IR sensor
5
9
3.4 Resistances used 10
3.5 LED 11
4.3.1 The ICC AVR with project file open 13
4.4.1 Compiling code 14
4.4.2 Continued code 15
4.5 Output on proteus 17
4.7 Final layout of the project 19
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW , Ghaziabad 1
CHAPTER 1
INTRODUCTION
A steady increase in metro-city population, the number of automobiles and cars increases rapidly
and metro traffic is growing crowded which leads to the traffic jam problem. Nowadays,
controlling the traffic becomes major issue because of rapid increase in automobiles and also
because of large time delays between traffic lights. So, in order to rectify this problem, we will go
for density based traffic lights system. This article explains you how to control the traffic based
on density. In this system, we will use IR sensors to measure the traffic density. We have to
arrange one IR sensor for each road; these sensors always sense the traffic on that particular road.
All these sensors are interfaced to the microcontroller. Based on these sensors, controller detects
the traffic and controls the traffic system.
The main heart of this traffic system is microcontroller. IR sensors are connected to the PORT C
(PC0, PC2, PC4, and PC6) of the microcontroller and traffic lights are connected to PORT A and
PORT B. If there is traffic on road then that particular sensor output becomes logic 0 otherwise
logic 1. By receiving these IR sensor outputs, we have to write the program to control the traffic
system. If you receive logic 0 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
sensors to check for the traffic. We have to place these IR pair in such a way that when we place
an obstacle in front of this IR pair, IR receiver should be able to receive the IR rays. When we
give the power, the transmitted IR rays hit the object and reflect back to the IR receiver. Instead
of traffic lights, you can use LEDs (RED, GREEN, YELLOW). In normal traffic system, you
have to glow the LEDs on time basis. If the traffic density is high on any particular path, then
glows green LED of that particular path and glows the red LEDs for remaining paths.
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 2
CHAPTER 2
LITERATURE REVIEW
2.1 STUDY OF SEVERAL RESEARCH PAPERS
[1] K.Vidhya, A.Bazila Banu use the Density measurement by using open tool as software for
image processing by just displaying the various conversion of image in the screen and finally
surrounding the box on the vehicle in the given image, the number of vehicle is calculated. They
can calculate the density of the vehicle by using mat lab tool by comparing the four side of the
image which is given as a input. they can simulate the result of the four given input image but this
cannot be used in real time applications as it is very slow and the software is not free of cost like
open to overcome this disadvantage of mat lab, open software is used which is very easy to install
and is open source software and can be used in real time application in a quick manner. In this
paper they have shown the density measurement in the signal by using open in the System..
[2] G.Kavya, B.Saranya: Density Based Intelligent Traffic Signal System Using PIC
Microcontroller, the optimization of traffic light controller in a City using IR sensors and
microcontroller. By using this system configuration tried to reduce the possibilities of traffic
jams, caused by traffic lights, to an extent and successfully gets the results. 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. The recorded data
can be downloaded to the computer through communication between microcontroller and the
computer.
[3] Sachin Jaiswal, Tushar Agarwal ,Akanksha Singh and Lakshita: The project is a
replica of a four way lane crossing of real time scenario. In the first part, concentrated on
problems faced by Ambulances, RFID concept is used to make the Ambulance’s lane Green and
thus providing a stoppage free way for the Ambulance. In the second part, concentrated on
problems faced by Priority vehicles, IR transmitter and receiver are used to make the vehicles’
lane Green and thus preventing traffic congestion. In the third part, concentrated on Traffic
density control, IR transmitter and receiver are used to provide dynamic traffic control and thus
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 3
increasing the duration of the Green light of the lane in which traffic density is high and hence,
regulating traffic.
2.2 PROBLEM DEFINITION
The high volume of vehicles, the inadequate infrastructure and the irrational distribution of the
development are main reasons for increasing traffic jam. The major cause leading to traffic
congestion is the high number of vehicle which was caused by the population and the
development of economy. Traffic congestion is a condition on road networks that occurs as use
increases, and is characterized by slower speeds, longer trip times, and increased vehicular
queuing. The most common example is the physical use of roads by vehicles. When traffic
demand is great enough that the interaction between vehicles slows the speed of the traffic
stream, these results in some congestion .As demand approaches the capacity of a road (or of the
intersections along the road), extreme traffic congestion sets in. When vehicles are fully stopped
for periods of time, this is colloquially known as a traffic jam or traffic snarl-up. Traffic
congestion can lead to drivers becoming frustrated and engaging in road rage. In order to avoid
the congestion in the traffic. In traffic environments, Traffic Sign Recognition (TSR) is used to
regulate traffic signs, warn the driver, and command or prohibit certain actions. A fast real-time
and robust automatic traffic sign detection and recognition can support and disburden the driver,
and thus, significantly increase driving safety and comfort. Generally, traffic signs provide the
driver various information for safe and efficient navigation Automatic recognition of traffic signs
is, therefore, important for automated intelligent driving vehicle or driver assistance systems.
2.3 OBJECTIVE
During our literature survey we come across many journal papers in which traffic is control with
the help of microcontroller. In this manuscript, I am controlling traffic signal using
microcontroller . It is density based traffic signal system. Here I am utilizing the concept of IR
sensor and control the density of traffic. In this project with the help of command we control the
microcontro
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 4
CHAPTER 3
HARDWARE DESCRIPTION
3.1 BLOCK DIAGRAM
Fig: 3.1 Block diagram of density based traffic signal system
3.2 COMPONENTS REQUIRED
The components required for this project are:
3.2.1 ATMEGA 32A
The Atmel® ATmega32A is a low-power CMOS 8-bit microcontroller based on the AVR®
enhanced RISC architecture. By executing powerful instructions in a single clock cycle, the
ATmega32A achieves throughputs close to 1MIPS per MHz this empowers system designed to
optimize the device for power consumption versus processing speed.
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 5
Fig: 3.2.1 Atmega32 Pin Configuration
VCC: Digital supply voltage.
GND: Ground.
Port A (PA7:PA0): Port A serves as the analog inputs to the A/D Converter. Port A also serves
as an 8-bit bi-directional I/O port, if the A/D Converter is not used. Port pins can provide internal
pull-up resistors (selected for each bit). The Port A output buffers have symmetrical drive
characteristics with both high sink and source capability. When pins PA0 to PA7 are used as
inputs and are externally pulled low, they will source current if the internal pull-up resistors are
activated. The Port A pins are tristated when a reset condition becomes active, even if the clock is
not running.
Port B (PB7:PB0): 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 tristated when a reset condition
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 6
becomes active, even if the clock is not running. Port B also serves the functions of various
special features of the ATmega32A as listed in Alternate Functions of Port B.
Port C (PC7:PC0): Port C is an 8-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 resistors are activated. The Port C pins are tri-stated when a reset condition
becomes active, even if the clock is not running. If the JTAG interface is enabled, the pull-up
resistors on pins PC5(TDI), PC3(TMS) and PC2(TCK) will be activated even if a reset occurs.
The TD0 pin is tristated unless TAP states that shift out data are entered. Port C also serves the
functions of the JTAG interface and other special features of the ATmega32A as listed in
Alternate Functions of Port C.
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 tristated when a reset condition
becomes active, even if the clock is not running. Port D also serves the functions of various
special features of the ATmega32A as listed in Alternate Functions of Port D.
RESET: 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. The minimum pulse length is given in System
and Reset Characteristics. Shorter pulses are not guaranteed to generate a reset. Related Links
System and Reset Characteristics on page 367
XTAL1 Input to the inverting Oscillator amplifier and input to the internal clock operating
circuit.
XTAL2 Output from the inverting Oscillator amplifier.
AVCC AVCC is the supply voltage pin for Port A and the A/D Converter. 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.
AREF AREF is the analog reference pin for the A/D Converter
Density based traffic signal system using Microcontroller
2016
Department Of Electronics And Communication Engineering RKGITW, Ghaziabad 7
3.2.2 Features: The features of the microcontroller Atmega32 are given as: