You are on page 1of 13

DENSITY BASED TRAFFIC CONTROL SYSTEM

Abstract: Traffic congestion is one of the major issues in the present-day world. The present-
day traffic signal control only works on a fixed time delay basis irrespective of the vehicle
density. With the rapid increase in vehicle usage, such a system can prove to be inefficient
causing a lot of losses. In this proposed system involves a density based traffic control system
which uses Arduino UNO, IR sensors and LED’s for the effective signal handling and vehicle
density control at the junction.
Keywords: Traffic control system, Arduino UNO, IR sensors, LED’s.

Introduction:
In the present day world, with growing technologies and adverse development in the
metropolitan cities, traffic administration has become one of the most important fields to be dealt
with. The main role of a traffic administration is to constantly improve the traffic control system
and effectively regulate the same (1). With the number of vehicle users constantly increasing, the
facility provided by the current system is limited and inefficient with respect to the energy and
time consumed. A survey shows that an average person spends about four to six months of his/her
entire life just waiting for the green light to be turned ON at a signal (2). It is also been identified
that this inadequate facility and irrational distribution of signal control is leading to such traffic
issues.These inefficient traffic control system is also contributing to various traffic violation
wherein the people don’t possess the patience to wait for that interval of the signal which does not
have much vehicle density than the other existing densities. Avoiding conditions of extreme traffic
jams is highly important in the current situation. Hence in this proposed system of traffic control,
we focus on the traffic density rather than just giving control to the signals on a fixed time
basis.This proposed in based on vehicle detection by IR sensors, analysation and computation of
the scenarios by the Arduino UNO and the same gives the control depending on the control time
in the code to the LED’s . On a whole, this system senses the presence of the vehicle in that given
lane and suitably gives control to the signals(3).

1
Demerits of the current system:
1.) The presence of a fixed time period of signal operation irrespective of the lack of
comparison of the vehicle densities in the different parts of the road at a junction.
2.) Even if the road is empty and lacks the presence of vehicles, still receives a fixed time
period of green signal which is of no use.
3.) This can lead to a large levels of traffic congestion since there is no uniform flow of
vehicles from all the roads at the junction.
4.) Human irritability increases and this can be one of the main reasons for some of the traffic
violations such as jumping signals, over speeding, etc. (4)
Proposed traffic control system:
The main aim of the proposed system is to constantly monitor the vehicle density present
in all parts of the road at the junction. The basic flow of operation is as follows: collection of
vehicle density data from the roads; next is to send the same data to the device which compares
the same and arrives at a particular characteristic output pattern; then the execution of the output
pattern which is reflected in the signal pattern. In this model, the IR sensors are used to detect the
presence of any vehicle in that part of the road. When detected it sends a triggered output to
Arduino UNO which is the heart of the project. Then Arduino analyses the number of such
triggered outputs from the set of sensors placed in the different roads at the junction and
correspondingly triggers the different LED lights in the signals in order to felicitate the vehicle
movement (5).
Related works:
Below are some of the prominent researches and solutions proposed for this problem of
traffic congestion.

• Based on microcontroller
1) Saiba P A et al proposed a density based traffic control system using PIC
microcontroller were three IR sensors are employed in each road for the detection of the
presence of the automobile and the density is identified in different levels such as low,
medium and high. Based on the density recorded, the duration of the green light is decided
by the microcontroller (6).

2) Pramod Sharma et al proposed a density based intelligent traffic control system using
IR sensors using the ATMEL 89C51 Microcontroller were IR sensors are used for the
vehicle detection and the control of the signals are taken over by the microcontroller (7).

3) Sakshi Pandey et al proposed a density based traffic control system using ATmega8
microcontroller where IR sensors are used to identify the level of vehicle density present

2
in each road at a junction and in case of emergency vehicles, their approach was identified
by proving a unique RFID card for the same (8).

4) Bilal Ghazal et al proposed a smart traffic light control system using PIC
microcontroller and IR sensors but transferred the data from the IR sensors to the
microcontroller using XBee transreciever based on ZigBee firmware (9).

• Based on the principle of image processing


1) K.Vidhya et al proposed a density based traffic control system using Raspberry pi and
concept of image processing. Under this, they analysed the ways to obtain the vehicle count
by obtaining the real time images of the vehicle densities and further processing it into a
series of grayscale, threshold, canny, erode and contour images (10).

2) D. D. Pukale et al proposed a density based traffic control system using video


processing. With the help of Arduino, the implementation is carried out by analysing the
video recordings and extracting the frames using which the vehicle densities is found.
Corresponding the density present, the time duration for the specific control of the signal
is decided (11).

• Based on IoT and its combined results


1) K.Lalitha et al proposed a density based traffic management using IoT. It involves the
use of Arduino mega, IR sensors and an ethernet shield. The IR sensor identifies the
number of vehicles present and sends the information to Arduino which then suitably
provides control to the signals via ethernet shield (12).

2) Ashok. P.V et al proposed IoT based traffic signaling system using a combination of
ultrasonic sensors, Arduino and Raspberry Pi3. The sensors are interfaced with Arduino
which sends the data wirelessly to Raspberry which analyses the same and suitably controls
the signals (13).

3) Elizabeth Basil et al proposed IoT based traffic light control system using Raspberry
Pi. This involves the combined operation of Arduino UNO, Raspberry Pi, WiFi module
and camera for image capturing. The software implementation is carried out using Arduino
IDE and MATLAB(with Simulink support). The operation involves continuous recording
of the traffic density and reading the corresponding frames. Then the grayscale image
conversion is achieved followed by binarization, blob analysis, labeling to obtain the
vehicle count using simulink. Based on the count obtained, the traffic signals are suitably
controlled (14).

3
Components:
Following are the components required for the execution of the proposed traffic control system

• Arduino UNO

[Fig 1- Arduino UNO module]

Arduino is a open source hardware based on the microcontroller Atmel ATmega328P.


ATmega328P is a 8bit microcontroller based on the Reduced Instruction Set Computer (RISC)
with an operational speed of 20 million instructions per second (MIPS) when operated at a 20MHz
(15). It is also equipped with various other features which can be conveniently categorised into the
various systems namely: memory system, port system, timer system, analog-to-digital converter
(ADC), interrupt system and serial communication.Below is the detailed information of these
various systems (16).

• 32 K byte ,ISP programmable flash


Memory system • 1 K byte, byte addressable EEPROM
• 2 K byte RAM
• 14 digital I/O pins (6 provide Pulse wave
Port system modulation [PWM])
• 6 analog I/O pins
• Two 8 bit-timer/counter
Timer system • One 16 bit-timer/counter
• Six PWM channels
Analog-to-digital converter • 6 channel 10-bit ADC (PDIP)
Interrupt system • 26 total interrupts
• 2 external pin interrupts
• Serial USART
Serial communication • Serial peripheral interface
• Two wire interface (TWI)

4
• IR sensor module

[Fig 2.1 – IR proximity sensor, Fig 2.2 - Working illustration of the IR sensor]

IR proximity sensor is an electronic instrument which comprises of an IR light


emitting diode, an IR photodiode, an op-amp (as comparator), couple of resistors (including a
variable resister) and capacitors whose basic operation is to detect the presence of any kind of
object or obstacle in the vicinity of the sensor within the particular range. In this particular
type of IR sensor module used in the project, IC LM 393 op-amp is used as comparator.
When the IR receiver does not detect any of the signals from the IR LED, the potential
at the inverting input of the comparator will be higher than that corresponding to the non-
inverting terminal. Hence the resulting output of the comparator becomes low. On the other
hand, if the IR receiver detects some signals which are sent back after encountering an
obstacle/object, the potential at the inverting terminal will be low than the non-inverting
terminal. Hence the output of the comparator will be high. This voltage level of the comparator
is used in arriving at the conclusion of whether the object is present or not. The variable
resistor connected helps in changing the sensitivity of the IR sensor module (17).

[Fig 3 – Schematic diagram of IR proximity sensor ]

5
• Light Emitting Diode (LED)

[Fig 4 – Red, Green and Yellow LED’s]

LED is an active electronic device, comparable to a general purpose diode except for its
ability to emit light with different wavelengths. When a suitable potential difference is applied
across its terminals, electrons recombine with the holes within the device thereby releasing the
energy in the form of photons. This phenomenon is known as electroluminescence (18).
Following are the specific semiconductor combination employed for obtaining a LED emitting
radiation of characteristic wavelength:
1. Gallium Arsenide (GaAs) – Infrared light
2. Gallium-Arsenide-Phosphorous (GaAsP) – yellow/red light
3. Gallium-Phosphorous(GaP) – green light

• Resistors

[Fig 5 – Resistors]

Resistors are basically used as current limiters for LED’s in order to prevent the damage of the
LED’s due to high current.

6
Design:

[Fig 6 – Block diagram for the proposed density based traffic control system, Fig 7 – Schematic circuit
diagram of the proposed model ]

The circuit design involves an IR sensors being placed at the left side of each of the four
roads in a ‘+’ type junction. These identify the presence of vehicle in that road of the junction.
When the IR signals from them are obstructed by a vehicle, the output of the sensors go high and
thereby indicate the same to the Arduino UNO (19). Based on as how many roads have vehicle
density out of the four roads, the signals are turned ON. The Arduino UNO is either powered by a
power bank or using a laptop which is used to upload the code as well. The coding is done in
Arduino IDE platform using C/C++ language (20). The IR sensors are powered using the voltage
ranges i.e. 5V and 3.3V available in the arduino board. The analog output of the IR sensors are
connected to the analog pins of the arduino UNO (21). The code is written so as to set a value to
the variable holding the analog value. If the analog value is well above a threshold value, then the
variable is set to 1; else to 0. Here the codes for turning ON or OFF of a particular signal is written
in the form of functions. Depending on whether the variable is 0 or 1, a particular set of functions
are called by the code and executed. The entire execution is in the form of a loop which
continuously checks for the presence of the vehicle density in any of the roads in that junction
(22). If detected, the green signal is turned ON in that road for a period of 10000ms and then turned
to red.

[Fig 7 – Arduino IDE platform]

7
Arduino code:

#define ledA1 2 pinMode(ledC2, Serial.print("\t");


OUTPUT);
#define ledA2 3 Serial.print(c1);
pinMode(ledC3,
#define ledA3 4 Serial.print("\t");
OUTPUT);
#define ledB1 5 Serial.print(d1);
pinMode(ledD1,
#define ledB2 6 OUTPUT); Serial.print("\t");
#define ledB3 7 pinMode(ledD2, }
OUTPUT);
#define ledC1 8 void roadAopen()
pinMode(ledD3,
#define ledC2 9 {
OUTPUT);
#define ledC3 10 delay(800);
}
#define ledD1 12 digitalWrite(ledA3,
void readSensor()
HIGH);
#define ledD2 11
{
digitalWrite(ledA2, LOW);
#define ledD3 13
a1 = analogRead(A2);
digitalWrite(ledA1, LOW);
int a1, b1, c1, d1, a, b, c, d;
b1 = analogRead(A3);
digitalWrite(ledB2, LOW);
void setup() {
c1 = analogRead(A4);
digitalWrite(ledB1,
Serial.begin(9600);
d1 = analogRead(A5); HIGH);
pinMode(ledA1,
if (a1 < 800) a1 = 1; else digitalWrite(ledB3, LOW);
OUTPUT);
a1 = 0;
digitalWrite(ledC2,
pinMode(ledA2,
if (b1 < 800) b1 = 1; else b1 LOW);
OUTPUT);
= 0;
digitalWrite(ledC1,
pinMode(ledA3,
if (c1 < 800) c1 = 1; else c1 HIGH);
OUTPUT);
= 0;
digitalWrite(ledC3,
pinMode(ledB1,
if (d1 < 800) d1 = 1; else d1 LOW);
OUTPUT);
= 0;
digitalWrite(ledD2,
pinMode(ledB2,
Serial.print(a1); LOW);
OUTPUT);
Serial.print("\t"); digitalWrite(ledD1,
pinMode(ledB3,
HIGH);
OUTPUT); Serial.print(b1);
pinMode(ledC1, OUTPUT);

8
digitalWrite(ledD3, LOW); digitalWrite(ledD1, digitalWrite(ledB2, LOW);
HIGH);
delay(10000); digitalWrite(ledB1,
digitalWrite(ledD3, HIGH);
digitalWrite(ledA3,
LOW);
LOW); digitalWrite(ledB3, LOW);
delay(10000);
digitalWrite(ledA2, digitalWrite(ledD2, LOW);
HIGH); digitalWrite(ledB3,
digitalWrite(ledD1,
LOW);
delay(1000); HIGH);
digitalWrite(ledB2,
digitalWrite(ledA2, digitalWrite(ledD3, LOW);
HIGH);
LOW);
delay(10000);
delay(1000);
digitalWrite(ledA1,
digitalWrite(ledC3,LOW);
HIGH); digitalWrite(ledB2,
LOW); digitalWrite(ledC2,
readSensor();
HIGH);
digitalWrite(ledB1,
}
HIGH); delay(1000);
void roadBopen()
readSensor(); digitalWrite(ledC2, LOW);
{
} digitalWrite(ledC1,
delay(800); HIGH);
void roadCopen()
digitalWrite(ledB3, readSensor();
{
HIGH);
}
delay(800);
digitalWrite(ledB2, LOW);
void roadDopen()
digitalWrite(ledC3,HIGH
digitalWrite(ledB1, LOW);
); {
digitalWrite(ledA3, LOW);
digitalWrite(ledC2, delay(800);
digitalWrite(ledA2, LOW); LOW);
digitalWrite(ledD3, HIGH);
digitalWrite(ledA1, digitalWrite(ledC1,
digitalWrite(ledD2, LOW);
HIGH); LOW);
digitalWrite(ledD1, LOW);
digitalWrite(ledC2, LOW); digitalWrite(ledA3,
LOW); digitalWrite(ledA3, LOW);
digitalWrite(ledC1,
HIGH); digitalWrite(ledA2, digitalWrite(ledA2, LOW);
LOW);
digitalWrite(ledC3, LOW); digitalWrite(ledA1,
digitalWrite(ledA1, HIGH);
digitalWrite(ledD2, LOW);
HIGH);

9
digitalWrite(ledB2, LOW); digitalWrite(ledB2, else if (a1==0 && b1 == 1
HIGH); && c1 == 0 && d1 == 0)
digitalWrite(ledB1,
HIGH); digitalWrite(ledC2, {
HIGH);
digitalWrite(ledB3, LOW); roadBopen();
digitalWrite(ledD2,
digitalWrite(ledC2, LOW); }
HIGH);
digitalWrite(ledC1, else if (a1==0 && b1 == 0
delay(800);
HIGH); && c1 == 1 && d1 == 0)
digitalWrite(ledA2, LOW);
digitalWrite(ledC3, LOW); {
digitalWrite(ledB2, LOW);
delay(10000); roadCopen();
digitalWrite(ledC2, LOW);
digitalWrite(ledD3, LOW); }
digitalWrite(ledD2, LOW);
digitalWrite(ledD2, else if (a1==0 && b1 == 0
HIGH); delay(500); && c1 == 0 && d1 == 1)
delay(1000); readSensor(); {
digitalWrite(ledD2, LOW); } roadDopen();

digitalWrite(ledD1, void loop() }


HIGH);
{ else if (a1==1 && b1==1
readSensor(); && c1==0 && d1==0)
readSensor();
} {
if (a1 ==0 && b1 == 0 &&
void arc() c1 == 0 && d1 == 0) roadAopen();

{ { roadBopen();
digitalWrite(ledA1, arc(); }
LOW);
} else if (a1==1 && b1==0
digitalWrite(ledB1, LOW); && c1==1 && d1==0)
else if (a1==1 && b1 == 0
digitalWrite(ledC1, && c1 == 0 && d1 == 0) {
LOW);
{ roadAopen();
digitalWrite(ledD1,
roadAopen(); roadCopen();
LOW);
} }
digitalWrite(ledA2,
HIGH);

10
else if (a1==1 && b1==0 && c1==0 && {
d1==1)
roadBopen();
{
roadCopen();
roadAopen();
}
roadDopen();
else if (a1==0 && b1==1 && c1==0 &&
} d1==1)
else if (a1==1 && b1==1 && c1==1 && {
d1==0)
roadBopen();
{
roadDopen();
roadAopen();
}
roadBopen();
else if (a1==0 && b1==1 && c1==1 &&
roadCopen(); d1==1)
} {
else if (a1==1 && b1==1 && c1==0 && roadBopen();
d1==1)
roadCopen();
{
roadDopen();
roadAopen();
}
roadBopen();
else if (a1==0 && b1==0 && c1==1 &&
roadDopen(); d1==1)
} {
else if (a1==1 && b1==0 && c1==1 && roadCopen();
d1==1)
roadDopen();
{
}
roadAopen();
else if (a1==1 && b1==1 && c1==1 &&
roadCopen(); d1==1)
roadDopen(); {
} roadAopen();roadBopen();
else if (a1==0 && b1==1 && c1==1 &&
Results: roadCopen(); roadDopen();}}
d1==0)

11
Results:
The results of the proposed model can be analysed in three different scenarios.
1. When there is vehicle density present in all the four roads of the junction, then the signal
functionalises normally, similar to the existing system.

[Fig 8 – Vehicle density present in all the roads]

2. When there an absence of vehicle density in one or more roads but present in atleast one
road, then the signal for green light skips that particular road with no vehicle density and
moves forward with the ones with density present.

[Fig 9a,b,c – Vehicle densities absent in atleast one road]

12
3. When no vehicle density is recoded in any of the roads at the junction, the yellows light is
triggered in all of the signals with time delay of 800ms which gives a blinking effect in the
signals.

[Fig 10 – Vehicle density absent in all the roads]

Conclusion:
The proposed traffic control system is the very basic step towards achieving
automation in the field of traffic control system. With various advancements taking place in
today’s world, people are in search for automated systems which not only saves their time but also
a lot of energy in different forms. The saving of fuel (petrol, diesel, natural gas), reduction in time
of the operation of automobile engines, reduction in the emission of the harmful gases in the
atmosphere. Thus this system helps in reducing the number of accidents that take place just because
of this improper traffic control system and paving way to a better traffic control system.
The proposed system aims to save the number of manhours wasted at the signals and hence making
effective utilization of time. Further a lot of work and progress an be made on these lines by giving
priority to emergency tag vehicles. Also, a lot of work can be done on the usage of solar energy of
the operation of such systems which can also make them highly energy efficient. It is also possible
to make use of gas sensors to control the timing of the timers in the traffic nodes. Using GPRS
map as an additional step for progress in this area, the best route can be figured out for emergency
as well as police vehicles.

13

You might also like