You are on page 1of 24

TRAFFIC LIGHT SENSOR USING AURDINO BOARD

A PROJECT REPORT
Submitted by

ARUNKUMAR.A [REG.NO.15BCS2011]
JEYAPRAKASH.K [REG.NO.15BCS2031]
DINESHKUMAR.M [REG.NO.15BCS2302]

in partial fulfillment for the award of the degree


of
BACHELOR OF ENGINEERING
in
COMPUTER SCIENCE AND ENGINEERING

M.KUMARASAMY COLLEGE OF ENGINEERING


(Autonomous)
KARUR –639 113
OCTOBER-2017
M.KUMARASAMY COLLEGE OF ENGINEERING
(Autonomous)
KARUR-639 113

BONAFIDE CERTIFICATE

Certified that this project report “TRAFFIC LIGHT SENSORS USING AURDINO”is
the bona fide work of “ARUNKUMAR A [15BCS2011], JEYAPRAKASH K [15BCS2031],
DINESHKUMAR M[15BCS2302]” who carried out the project work under my supervision.

SIGNATURE SIGNATURE
Dr.P.SANTHI ME., Ph.D., MS.S.KEERTHI B.E., M.E.,
HEAD OF THE DEPARTMENT SUPERVISOR
PROFESSOR ASSISTANT PROFESSOR
Computer Science and Engineering Computer Science and Engineering
M.Kumarasamy College of M.Kumarasamy College of
Engineering, Karur Engineering, Karur

Submitted for the project work Viva Voce held on _________

INTERNAL EXAMINER EXTERNAL EXAMINER


ACKNOWLEDGEMENT

We express our sincere thanks to Thiru.M.KUMARASAMY, Ex.V.M, Honorable


Chairman and Dr.K.RAMAKRISHNAN, Honorable Secretary of our college for their kind
and generous offer of all facilities in the college.

We also extend our sincere thanks to Dr.V.KAVITHA, M.E., Ph.D., PRINCIPAL, for
forwarding us to do our project work and offering adequate facilities during our project work.

We are also grateful to Dr.S.THILAGAMANI, M.E., Ph.D., DEAN – COMPUTER


ENGINEERING and Dr.P.SANTHI, M.E., Ph.D.,HEAD OF THE DEPARTMENT, for
their constructive suggestion and encouragement during our project work.

We have great pleasure in expressing our sincere gratitude and hearty thanks to our
supervisor Ms.S.KEERTHI,M.E., ASSISTANT PROFESSOR,giving us valuable guidance
that helps in completing this project.

We extend our sincere thanks to staff members and lab technicians of Department of
Computer Science and Engineering for providing great support at different times. We are
extremely grateful to them.

Without the moral support of our parents, relatives and friends it would not have been
possible for us to complete the project. We are indebted to them.

Above all, we thank the almighty who showered his blessings on us and helped us to
complete out project work successfully.
ABSTRACT

This project describes about the “TRAFFIC LIGHT SENSORSUSING AURDINO

BOARD”.It will control the traffic while peoples crossing the road. it may cause some

accidents nowadays sensor will detect the vehicle and we will give the vehicle number as a

input using image processing. If the vehicle will reach the zebra crossing line it will glow the

border light and the alarm will glow.Every vehicle should be having a one warning if they

reached their warning they will pay fine for this. By using this idea we have to control the

accidents in roads sides and in foreign countries they can follow this implementations but in

india there is no .so it will reduce the accidents.


TABLE OF CONTENT

CHAPTER No. TITLE PAGE No.


ABSTRACT 1
LIST OF TABLES 1
LIST OF FIGURES 2

1 INTRODUCTION
1.1:INTRODUCTION
1.2:HISTORY

2 PROJECT DESCRIPTION

2.1 Existing system 11


2.2 Proposed system 12

3 SYSTEM ANALYSIS
3.1 Software Requirements 14
3.2 Hardware Requirements 15

4 SOFTWARE SPECIFICATION
4.1 Closed Loop System Design
5 HARDWARE DESCRIPTION

5.1:Working of the Traffic Light Controller Project

6 MODULE DESCRIPTION
6.1 Module 24
6.1.1 Module 1 24
6.1.2 Module 2 25
6.1.3 Module 3 25

7 CONCLUSION AND FUTURE ENHANCEMENTS 43

8 APPENDIX 45
8.1 Source code 24
8.2 Screenshot 24

9 REFERENCE 47
Chapter 1
INTRODUCTION
Chapter 1
INTRODUCTION

1.1:INTRODUCTION

The use of personal vehicles is very common now a days and a result, the number of vehicles on the
roads are exponentially increasing. Roads without any supervision or guidance can lead in to traffic congestions
and accidents.

Traffic Lights or Traffic Signals are signalling devices that are used to control the flow of traffic.
Generally, they are positioned at junctions, intersections, ‘X’ roads, pedestrian crossings etc. and alternate the
priority of who has to wait and who has to go.

The traffic lights will provide instructions to the users (drivers and pedestrians) by displaying lights of
standard color. The three colors used in traffic lights are Red, Yellow and Green.

The system must be used to control the traffic lights for smooth and safe movement of traffic. These
control systems consists of electro mechanical controllers with clockwork mechanisms or modern solid state
computerised systems with easy setup and maintenance.

Traffic lights, also known as traffic signals, traffic lamps, signal lights, robots are signaling devices
positioned at or near road intersections, pedestrian crossings and other locations to control competing flows of
traffic. Traffic lights were first installed in 1868 in London, United Kingdom; now used in almost every city of
the world. Traffic lights alternate the right of way accorded to road users by displaying lights of a standard color
(red, yellow/amber, and green) following a universal color code (and a precise sequence to enable
comprehension by those who are color blind).

1.2:HISTORY

On 10 December 1868, the first traffic lights were installed outside the British Houses of Parliament in
London, by the railway engineer J. P. Knight. They resembled railway signals of the time, with semaphore arms
and red and green gas lamps for night use. The gas lantern was turned with a lever at its base so that the
appropriate light faced traffic. It exploded on 2 January 1869, injuring or killing the policeman who was
operating it. The modern electric traffic light is an American invention. As early as 1912 in Salt Lake City,
Utah, policeman Lester Wire invented the first red-green electric traffic lights. On 5 August 1914, the American
Traffic Signal Company installed a traffic signal system on the corner of East 105th Street and Euclid Avenue
in Cleveland, Ohio. It had two colors, red and green, and a buzzer, based on the design of James Hoge, to
provide a warning for color changes. The design by James Hoge allowed police and fire stations to control the
signals in case of emergency. The first four-way, three-color traffic light was created by police officer William
Potts in Detroit, Michigan in 1920. In 1922, T.E.
Hayes patented his "Combination traffic guide and traffic regulating signal" (Patent # 1447659).
Ashville, Ohio claims to be the location of the oldest working traffic light in the United States, used at an
intersection of public roads until 1982 when it was moved to a local museum.

Figure 1.1: installation of a traffic signal


Chapter 2
PROJECT DESCRIPTION
Chapter 2
PROJECT DESCRIPTION

In this project, an Arduino based Traffic Light Controller system is designed. It is a simple
implementation of traffic lights system but can be extended to a real time system with programmable timings,
pedestrian lighting etc.

2.1:EXISTING SYSTEM:

The project is not suitable for actual implementation but just a demonstration of the process behind the
system.Real time traffic light controller systems are generally run time programmable i.e. the operator (usually
a policeman) can change the timings of each lane as per the intensity of the traffic in each lane.There will also
be a provision for either manual operation or pre-programmed operation. At pre-timed traffic signals each signal
phase or traffic movement is serviced in a programmed sequence that is repeated throughout the day. Main
street traffic receives a fixed amount of green time followed by the amber and red clearance intervals. The same
interval timing is then repeated for the minor or side street.Battery powered, low power consumption, and can
be used in areas with deteriorated pavement Simplified maintenance . The project is not suitable for actual
implementation but just a demonstration of the process behind the system.Real time traffic light controller
systems are generally run time programmable i.e. the operator (usually a policeman) can change the timings of
each lane as per the intensity of the traffic in each lane.There will also be a provision for either manual
operation or pre-programmed operation.
2.2:PROPOSED SYSTEM:

Installed 4.25 inches below the surface of the pavement or based on the manufacturer's recommendation.
Can be installed in relatively poor pavement in a small patched area. Installation takes about 15 minutes per
sensor and the epoxy cover dries in 5 minutes, reducing disruption time to traffic. No trenching is required for
artery detection though a tall pedestal may be required for a transceiver. Sensors can transmit a signal
approximately 150 feet to a transceiver which relays the signal to the receiver up to 1,000 feet away or 2,000
feet away with use of a repeater. The detection area of a sensor is approximately a 6 foot diameter zone where
detection is most effective 4 feet in front of and 2 feet behind the sensor.

Single lane closure required during installation Line of sight required between transceivers and receiver
Sensors and transceivers battery .

If there is a proposed change that would cause a reduction in load or if the proposal is to replace in kind
(no change in load) and provided that the mast arm is in good condition, then an analysis could be waived.
Determination of mast arm condition is based on an inspection of both the mast arm assembly and mast arm
foundation. The inspection should include the elements listed in the structural analysis section above.
Chapter 3
SYSTEM ANALYSIS
Chapter 3
SYSTEM ANALYSIS

3.1:SOFTWARE REQUIREMENTS

1. Define system parameters:


a) Number of intersections controlled.
b) Number of timing plans using computer programs such as Synchro, Passer II, Transyt-7 or other
techniques.
c) Number of system sections - determine if the defined system should be broken down into sub-s
systems.
2. Define methods of controlling system timing:
a) Time of day.
b) Manual - (manual override) ability to implement special system timing plans from a remote site.
Selection of Alternative Systems

1.Initial Screening:
If the proposed system limits lie within an alternate route, select a closed loop system, disregard the
signal system work sheet and proceed to the approval stage.
1.
2. Signal System Work Sheet:
a) Fill out the signal system work sheet.
b) Select the system whose point total corresponds with the range of total points indicated
Obtain Approval of the Selected Type of Signal System Upon the return of the Signal System Concurrence
Sheet from the Office of Highway Operations and consideration of any comments, the originating unit shall
forward the final recommendation for the type of signal system and all supporting information to the Manager
of Traffic Engineering for approval.
3.2:HARDWARE REQUIREMENTS

Components

 Arduino UNO
 1KΩ Resistor X 12
 Red LEDs X 4
 Yellow LEDs X 4
 Green LEDs X 4
 Connecting wires
 Prototyping board
 Power adapter

Component Description

Arduino UNO:

The main part of the Traffic Light Controller is the controller itself. Arduino UNO will serve the
purpose in this project to handle all the switching of the LEDs and controlling their timings.

LEDs:

The LEDs used in the project are basic 5mm LEDs of Red, Yellow and Green colors. The maximum
current that can be allowed through these LEDs (Red, Yellow and Green in particular) is 20mA. (Foe Blue
LED, the maximum current can be up to 30mA).

Circuit Design

Since the project is a traffic light controller, the circuit consists of many LEDs (12 as a matter of fact) as
we are implementing traffic lights at a 4 way intersection. The project is a simple representation of traffic light
controller and hence no other extra components are used.
We need three LEDs of Red, Yellow and Green colors at each intersection. The intersection is divided in
to four lanes: Lane1, Lane 2 Lane 3 and Lane 4.

All the LEDs are connected to the Arduino UNO’s digital I/O pins through respective current limiting
resistors of 1KΩ.

Figure.3.1:circuit diagram
Chapter 4

SOFTWARE SPECIFICATION
Chapter 4

SOFTWARE SPECIFICATION

Closed Loop System Design

All State owned closed loop coordination equipment must comply with the applicable sections of the
current edition of the DOT Functional Specifications for Traffic Control Equipment. It is recommended that the
designer become familiar with these specifications which describe the minimum system parameters.
The following operational information and guidelines apply to systems purchased under the
specifications in effect as of the publication date of this manual. Because of the continual advances in
technology and software upgrades, earlier (and future) DOT systems may operate in a slightly different manner.
If there is any question regarding the operation of a particular system, or the features available, the designer
should request advice from the signal lab. The design of a municipal system should comply with municipal
specifications therefore the following information and guidelines may not apply. When signals are under closed
loop control the max settings in the local controllers are inhibited.
By inhibiting the max timing for phases in the local controllers, the engineer can develop splits for the
system to assign different max timings for each phase for each timing pattern. The designer can use the max 1
and max 2 settings for times when the signal is running under programmed free operation. Usually the designer
would only run full-actuated signals under free operation. Under free operation the system only monitors the
local signal controller's operation and all the timings come from the settings on the local signal controller. The
following is provided to clarify what type of operation results when there is either a communication or
coordination failure in closed loop systems.
This can help the engineer better understand and assess complaints regarding signal operation. If there
is a communication failure such as a break in interconnect between master and local, the signals time the
programmed splits and offsets but with no communication. In the case of a coordination failure such as a
prolonged period of double cycling, signals default to max 1 timings (free operation). The designer should
ensure that this is considered in determining the max 1 green time settings for all signal phases.
Chapter 5

HARDWARE SPECIFICATION

5.1:Working of the Traffic Light Controller Project

The real time traffic light controller is a complex piece of equipment which consists of power cabinet,
main controller or processor, relays, control panel with switches or keys, communication ports etc.

In this project, a simple traffic light system for a 4 way intersection is implemented using Arduino UNO.
Although it is not the ideal implementation for real life scenarios, it gives an idea of the process behind the
traffic light control system

The aim of the project is to implement a simple traffic light controller using Arduino UNO, where the
traffic is controlled in a pre-defined timing system. The working of the project is very simple and is explained
below.

In that, first the Lane 1 gets its Green light turned. Hence, in all the other Lanes, their corresponding Red
lights are turned on. After a time delay of predefined time say 5 seconds, the Green light in the Lane 3 must be
turned on and the Green light in the Lane 1 must be turned off.

As a warning indicator, the Yellow light in Lane 1 is tuned on indicating that the red light is about to
light up. Similarly, the yellow light in the Lane 3 is also turned as an indication that the green light about to be
turned on.

The yellow lights in Lanes 1 and 3 are turned for a small duration say 2 seconds after with the red light
in the Lane 1 is turned on and green light in Lane 3 is also turned on.

The green light in Lane 3 is also turned on for a predefined time and the process moves forward to Lane
4 and finally Lane 2.

The system then loops back to Lane 1 where the process mentioned above will be repeated all over again.
Chapter 7
CONCLUSION AND FUTURE ENHANCEMENTS
Chapter 8
APPENDIX
Chapter 8
APPENDIX

8.1:source code

int Lane1[] = {13,12,11}; // Lane 1 Red, Yellow and Green


int Lane2[] = {10,9,8};// Lane 2 Red, Yellow and Green
int Lane3[] = {7,6,5};// Lane 3 Red, Yellow and Green
int Lane4[] = {4,3,2};// Lane 4 Red, Yellow and Green
void setup()
{
for (int i = 0; i < 3; i++)
{
pinMode(Lane1[i], OUTPUT);
pinMode(Lane2[i], OUTPUT);
pinMode(Lane3[i], OUTPUT);
pinMode(Lane4[i], OUTPUT);
}
for (int i = 0; i < 3; i++)
{
digitalWrite(Lane1[i], LOW);
digitalWrite(Lane2[i], LOW);
digitalWrite(Lane3[i], LOW);
digitalWrite(Lane4[i], LOW);
}
}
void loop()
{
digitalWrite(Lane1[2], HIGH);
digitalWrite(Lane3[0], HIGH);
digitalWrite(Lane4[0], HIGH);
digitalWrite(Lane2[0], HIGH);
delay(7000);
digitalWrite(Lane1[2], LOW);
digitalWrite(Lane3[0], LOW);
digitalWrite(Lane1[1], HIGH);
digitalWrite(Lane3[1], HIGH);
delay(3000);
digitalWrite(Lane1[1], LOW);
digitalWrite(Lane3[1], LOW);
digitalWrite(Lane1[0], HIGH);
digitalWrite(Lane3[2], HIGH);
delay(7000);
digitalWrite(Lane3[2], LOW);
digitalWrite(Lane4[0], LOW);
digitalWrite(Lane3[1], HIGH);
digitalWrite(Lane4[1], HIGH);
delay(3000);
digitalWrite(Lane3[1], LOW);
digitalWrite(Lane4[1], LOW);
digitalWrite(Lane3[0], HIGH);
digitalWrite(Lane4[2], HIGH);
delay(7000);
digitalWrite(Lane4[2], LOW);
digitalWrite(Lane2[0], LOW);
digitalWrite(Lane4[1], HIGH);
digitalWrite(Lane2[1], HIGH);
delay(3000);
digitalWrite(Lane4[1], LOW);
digitalWrite(Lane2[1], LOW);
digitalWrite(Lane4[0], HIGH);
digitalWrite(Lane2[2], HIGH);
delay(7000);
digitalWrite(Lane1[0], LOW);
digitalWrite(Lane2[2], LOW);
digitalWrite(Lane1[1], HIGH);
digitalWrite(Lane2[1], HIGH);
delay(3000);
digitalWrite(Lane2[1], LOW);
digitalWrite(Lane1[1], LOW);
}

You might also like