IOT Based Smart Traffic Management System
IOT Based Smart Traffic Management System
Using IoT
Submitted by
ABINASH MISHRA
Regd no. 2221294118
7th Semester
in
Submitted by:
ABINASH MISHRA
A smart traffic management is a wide topic of research. Many modifications can be made to make
the urban traffic flow smoothly on the roads. The increasing utilization of private vehicles and public
transportation due to advancement of technology causes hectic traffic complexities for the civilians across
the globe. The problem of traffic congestion is an everyday problem for human resource and therefore
hinders the growth of the country by affecting its productivity as well as economy. Moreover, the traffic
signaling systems have predetermined fixed operational time which fails to manage the traffic density
changing with time and thus, long traffic queues are formed at the road crossings resulting in increased
pollution and waiting time. In this paper, we tried to provide solution to reduce the waiting time at road
crossings while keeping in mind the importance of time of the citizens as well as the emergency service
providers (such as EMS i.e. Emergency Medical Services, Fire and Rescue Services, etc.). The presented
system in this paper is based on smart traffic congestion control system that will automatically set the signal
time based on the measured values of vehicle density on road lanes. However, the manual changes can also
be made to traffic signals for efficient traffic management in case of emergencies. This paper presents an idea
of traffic management using internet of things (IOT). The Internet of Things (IoT) refers toa system of internet-
connected objects that are able to collect and transfer data over a wireless network without human
intervention. This technology provides an effective communication between different signals and helps in
collection of data thereby providing an IoT based smart traffic management system in terms of its automated
tracking, monitoring and controlling of vehicles and its data processing.
CONTENTS
1. Introduction
2. Literature review and findings
a. About IoT
b. Advantages of IoT
c. Disadvantages of IoT
d. IoT in traffic management
3. Materials and methodology
• Work flow
4. Existing system
• Limitations of existing system
5. Proposed system
• Advantages of proposed system
6. System design and architecture
a. Aurdino micro controller
b. IR sensor
c. Power supply
d. Traffic LED
e. ESP module
f. RFRX module
g. Jumping wires
7. Working principle
8. Diagrams
a. Flow chart
b. Sequence diagram
c. Use case diagram
9. Algorithm
a. Vehicle counter algorithm
b. Traffic control algorithm
10. Operation
11. Result and analysis
12. Miscellaneous
• Future scope
• Related work
13. Conclusion
INTRODUCTION
In a world with growing population and increasing transportation needs, the cities need an
intelligent traffic management system (ITS) which works based on traffic concentration on different lanes
[1]. This system will be created to reduce waiting time at lanes and let the citizens travel to their homes,
offices, schools and other destinations more quickly. The problem of unnecessarily waiting at signal, while
other roads are empty is the cause of delay for people to reach their destinations. This problem is addressed
here. The citizens will not be stuck in traffic for too long.
There is no live traffic monitoring developed for the citizens to be able to view the traffic status from
anywhere. This system aims to provide the users with facility (maybe a website or an app) to view the
actual traffic density and traffic status, like is there is no traffic, light traffic or very high traffic. This will help
the people to decide on their path from whichever location they are current at. This will help them to avoid
traffic and or pass through light traffic in order to get to their destinations. An emergency service has a very
crucial role in people’s life. In India, people always complain about the not getting ambulance, police, fire
brigades and other lifesaving services on time. This system addresses this issue and gives the traffic control
center people and authorities with a facility to manually control the traffic so that the citizens can get easy
and fast access to the emergency services be it medical necessity, crime prevention measure or rescue
services [2].
The project is an application of IOT. This system will reduce the waiting time of citizens at road crossings. It
will allow users to monitor the traffic from anywhere inthe world [3]. The user can monitor the traffic
status from a website and chose the best path to take in order to reach his/her destination. It also aims to
provide the citizens with emergency services more quickly by giving the manual control to authorities at
traffic control station.
In this system, the idea is to make a three dimensional prototype model of a traffic signal system made on a
solid cardboard. The LEDs representing traffic signal lights are placed at each intersection of a four lane road.
The dividers placed beside each lane are mounted with IRsensors. The data from sensors will reach to the
Control Centre (microcontroller), made nearby to road, and controls traffic lights (LEDs) accordingly. The
Control Centre will automatically send live traffic data to users via website for monitoring. The authorized
person will be ableto change the green signal for emergencies.
LITERATURE REVIEW AND FINDINGS
a) About IoT
The Internet of Things (IoT), also sometimes referred to as the Internet of Everything (IoE), consists of all the
web-enabled devices that collect, send and act on data they acquire from their surrounding environments
using embedded sensors, processors and communication hardware. These devices, often called “connected”
or “smart” devices, can sometimes talk to other related devices, a process called machine-to-machine(M2M)
communication, and act on the information they get from one another. Humans can interact with the
gadgets to set them up, give them instructions or access the data, but the devices do most of the work on
their own without human intervention. Their existence has been made possible by all the tiny mobile
components that are available these days, as well as the always-online nature of our home and business
networks. Connected devices also generate massive amounts of Internet traffic, including loads of data that
can be used to make the devices useful, but can also be mined for other purposes. All this new data, and the
Internet-accessible nature of the devices, raises both privacy and security concerns. But this technology
allows for a level of real-time information that we have never had before. We can monitor our homes and
families remotely to keep them safe. Businesses can improve processes to increase productivity and reduce
material waste and unforeseen downtime. Sensors in city infrastructure can help reduce road congestion
and warn us when infrastructure is in danger of crumbling. Gadgets out in the open can monitor for changing
environmental conditions and warn us of impending disasters.
b) Advantages of IoT
a. Communication: IoT encourages the communication between devices, also famously known as
Machine-to-Machine (M2M) communication. Because of this, the physical devices are able to stay
connected and hence the total transparency is available with lesser inefficiencies and greater quality.
b. Automation and Control: Due to physical objects getting connected and controlled digitally and
centrally with wireless infrastructure, there is a large amount of automation and control in the
workings. Without human intervention, the machines are able to communicate with each other
leading to faster and timely output.
c. Information: It is obvious that having more information helps making better decisions. Whether it is
mundane decisions as needing to know what to buy at the grocery store or if your company has
enough widgets and supplies, knowledge is power and more knowledge is better.
d. Monitor: The second most obvious advantage of IoT is monitoring. Knowing the exact quantity of
supplies or the air quality in your home, can further provide more information that could not have
previously been collected easily. For instance, knowing that you are low on milk or printer ink could
save you another trip to the store in the near future. Furthermore, monitoring the expiration of
products can and will improve safety.
e. Time: As hinted in the previous examples, the amount of time saved because of IoT could be quite
large. And in today’s modern life, we all could use more time.
f. Money: The biggest advantage of IoT is saving money. If the price of the tagging and monitoring
equipment is less than the amount of money saved, then the Internet of Things will be very widely
adopted. IoT fundamentally proves to be very helpful to people in their daily routines by making the
appliances communicate to each other in an effective manner thereby saving and conserving energy
and cost. Allowing the data to be communicated and shared between devices and then translating it
into our required way, it makes our systems efficient.
g. Efficient and Saves Time: The machine-to-machine interaction provides better efficiency, hence;
accurate results can be obtained fast. This results in saving valuable time. Instead of repeating the
same tasks every day, it enables people to do other creative jobs.
h. Better Quality of Life: All the applications of this technology culminate in increased comfort,
convenience, and better management, thereby improving the quality of life
c) Disadvantages of IoT
a. Compatibility: Currently, there is no international standard of compatibility for the tagging and
monitoring equipment. I believe this disadvantage is the most easy to overcome. The manufacturing
companies of these equipment just need to agree to a standard, such as Bluetooth, USB, etc. This is
nothing new or innovative needed.
b. Complexity: As with all complex systems, there are more opportunities of failure. With the Internet
of Things, failures could sky rocket. For instance, let’s say that both you and your spouse each get a
message saying that your milk has expired, and both of you stop at a store on your way home, and
you both purchase milk. As a result, you and your spouse have purchased twice the amount that you
both need. Or maybe a bug in the software ends up automatically ordering a new ink cartridge for
your printer each and every hour for a few days, or at least after each power failure, when you only
need a single replacement.
c. Privacy/Security: With all of this IoT data being transmitted, the risk of losing privacy increases. For
instance, how well encrypted will the data be kept and transmitted with? Do you want your
neighbours or employers to know what medications that you are taking or your financial situation?
d. Safety: As all the household appliances, industrial machinery, public sector services like water supply
and transport, and many other devices all are connected to the Internet, a lot of information is
available on it. This information is prone to attack by hackers. It would be very disastrous if private
and confidential information is accessed by unauthorized intruders.
e. Lesser Employment of Manpower: The unskilled workers and helpers may end up losing their jobs
in the effect of automation of daily activities. This can lead to unemployment issues in the society.
This is a problem with the advent of any technology and can be overcome with education. With daily
activities getting automated, naturally, there will be fewer requirements of human resources,
primarily, workers and less educated staff. This may create Unemployment issue in the society.
Work Flow:
An IoT-based traffic density updation system (Figure 1) that utilizes IR sensors and controls traffic signal timing
based on density typically involves several essential steps:
a. Deployment of IR sensors: The first step involves deploying IR sensors in various locations to detect
and monitor traffic. These sensors can detect the number of vehicles waiting at a signal through a
particular point and send the data to the IoT system.
b. Data Collection: The collected data from the IR sensors is then sent to the cloud for processing and
analysis using wireless communication protocols such as Wi-Fi.
c. Data Analytics: The next step involves analyzing the collected data using data analytics software to
determine traffic density in different locations using three IR sensors.
d. Traffic Signal Timing Control: Based on the traffic density in different locations, the traffic signal
timing is controlled. If the density is high, the green light duration will be longer, and the red light
duration will be shorter. Similarly, if the density is low, the green light duration will be shorter, and
the red light duration will be longer.
e. Real-Time Monitoring: The system provides real-time monitoring of traffic density, congestion, and
other parameters to help drivers and traffic management authorities make informed decisions.
f. Maintenance and Upgrades: Finally, the system requires regular maintenance and upgrades to
ensure optimal performance and keep up with new technologies and changing traffic patterns. The
main objective of this paper is to design a dynamic traffic signal system. based on traffic density. Traffic
congestion is a significant problem in most cities, and it is necessary to shift from fixed-timer systems
to automated systems with decision-making capabilities. The existing traffic signaling systems are
fixed time-based, which can be inefficient if one lane has more traffic than others. To optimize this
problem, an intelligent traffic control system framework has been proposed.
Existing system
The exiting traffic system is generally controlled by the traffic police. The main drawback of this system
controlled by the traffic police is that the system is not smart enough to deal with the traffic congestion. The
traffic police official can either block a road for more amount of time or let the vehicles on another road pass
by i.e. the decision making may not be smart enough and it entirely depends on the official’s decision.
Moreover, even if traffic lights are used the time interval for which the vehicles will be showed green or red
signal is fixed. Therefore, it may not be able to solve the problem of traffic congestion. In India, it has been
seen that even after the presence of traffic lights, traffic police officials are on duty, which means that in this
system more manpower is required and it is not economical in nature.
Traffic Congestion
No means to detect traffic congestion
Number of accidents are more
It cannot be remotely controlled
It requires more manpower
It is less economical
It is not efficient
PROPOSED SYSTEMS
The proposed system uses IR sensors to measure traffic density and assign the time period of green and red
lights based on the density of traffic present at the junction.
The proposed system uses a microcontroller (Arduino) to assign the green light duration based on the traffic
density. The IR sensors are placed on the sides of the road to detect the presence of vehicles and send
information to the microcontroller, which decides how long a flank will remain open or when to change the
signal lights. The proposed system also assigns different weights to different types of emergency vehicles,
such as ambulances, fire engines, and police vehicles, so that the signal controller can serve them by their
priorities.
The proposed system uses IoT technology to interface all the IR sensors with the microcontroller, which
detects and controls the traffic system based on the traffic density. The paper explains the detailed
procedure of this proposed framework in subsequent sections.
Advantages of proposed system
Figure : IR Sensor
of an emitter and a receiver, typically made of a material that can emit and detect infrared radiation. The
emitter emits a beam of infrared radiation, which travels through the air and reflects off objects in its path.
The reflected radiation is then detected by the receiver, which converts it into an electrical signal that can be
analyzed and used for various purposes.
In traffic management systems, IR sensors are deployed at various locations to detect and monitor traffic
density. They can detect the number of vehicles waiting in the signal through a particular point and send the
data to the IoT system. This data is then used to analyze traffic patterns and control traffic signals based on
the density of vehicles at different locations. IR sensors are an important component of the IoT- based traffic
management system, which can significantly improve traffic flow, reduce congestion, and enhance road
safety.
C. Power Supply
A power supply unit (PSU) is an electronic device that converts alternating current (AC) from the main power
source to direct current (DC) that can be used by electronic devices. It is an essential component of most
electronic systems, including computers, televisions, and other electronic devices. The PSU is responsible for
providing stable and reliable power to all components in the electronic system. It typically includes a
transformer, rectifier, and voltage regulator circuitry to ensure that the output voltage is within the required
range and stable under varying loads. The transformer is responsible for stepping down the AC voltage from
the main power source to a lower voltage that can be used by the rectifier circuit. The rectifier circuit converts
the AC voltage to DC voltage. However, the output of the rectifier is not yet stable enough to be used by
electronic devices. Therefore, the voltage regulator circuitry is responsible for stabilizing the output voltage
within a specified range.
D. Traffic LED
Traffic LED lights are the light- emitting diodes (LEDs) used in traffic signals to indicate when a vehicle should
stop, go or proceed with caution. The LED technology used in traffic lights has replaced the incandescent
bulbs used in older traffic signal systems, providing several advantages over traditional bulbs.
LEDs offer a longer lifespan than incandescent bulbs and consume less energy, resulting in lower maintenance
costs and reduced energy consumption. The brightness of LEDs can also be easily adjusted, allowing for better
visibility and more efficient use of power. Additionally, LEDs have faster response times than traditional bulbs,
enabling faster and more precise changes in traffic signals.
Traffic LED lights typically have three colors: red, yellow, and green. Red signals indicate that vehicles should
stop, yellow signals caution to prepare for a red signal, and green signals indicate that vehicles may proceed.
In addition to these standard colors, some traffic signals may include special LED symbols or arrows to
indicate specific actions or turning lanes.
E. ESP Module
ESP modules, short for "Embedded Serial Port" modules, are Wi-Fi enabled microcontrollers designed for use
in IoT devices and other projects that require wireless connectivity. These modules are widely used in the
development of smart homes, industrial automation systems, and other IoT applications.
ESP modules are based on the ESP8266 or ESP32 chips, which are manufactured by Espressif Systems. They
come with built-in Wi-Fi connectivity, allowing them to connect to wireless networks and exchange data with
other devices over the internet.
These modules typically come in a compact form factor and can be programmed using popular programming
languages such as C and Python. They have a range of built-in peripherals, including GPIO pins, analog-to-
digital converters (ADCs), and UART interfaces, which allow them to interface with a wide range of sensors,
actuators, and other hardware components.
F. RFRX module
It consists of RF transmitter and RF receiver; it is used for transmitting and receiving data.
G. Jumping Wires
A jump wire (also known as jumper, jumper wire, jumper cable, DuPont wire or cable) is an electrical wire,
or group of them in a cable, with a connector or pin at each end (or sometimes without them – simply
"tinned"), which is normally used to interconnect the components of a breadboard or other prototype or
test circuit, internally or with other equipment or components, without soldering.
WORKING PRINCIPLE
There will 8 sensors across the 4 lanes with each lane having 2 sensors each, to give the data how much
dense the lane is. If in case the entire lanes have less traffic then the system will work normally means the
lanes sequence will be first A lane then B lane, then C lane and at last D lane. But in case if any of the lane
gets more cars or gets denser then the other 3 lanes then that specific lane will open then the other with the
second highest denser, then the same order continued to the other 2 lanes. If in case all the lanes have same
number of vehicles then all the lanes will open in same order i.e. A, B, C, D. If in case there is an emergency
vehicle that can be ambulance, fire brigade or an emergency scout team then we have a separate Wi-Fi
module through which we can open can lane in which the emergency vehicle is arrived.
CIRCUIT DIAGRAM
IMPLEMENTATION
The vehicle concentration or density will be detected by the IR LEDs and photodiodes. The controller
will take the data from IR communication taking place in between IR Transmitter and IR Receiver. The
microcontroller arduino nano will process this received data and show the signals through red, yellow and
green LED’s along with that controller will also ensure the delivery of the sensor data tousers in form of a
user friendly website where the people could watch the live traffic status.
For the manual control operation, the authorized person will send the request to the server with the login
data i.e. the username and password. The server will match the user entered data with the pre-stored
values, after successful matching the server will open the page from which theuser can set the direction
in which he/she wants to display the green signal light.The user after entering on the control page will be
asked which mode of operation he/she would like to keep for the traffic. There are two options being
provided one manual and the other is automatic. First, he/she have to select the manual mode and then as
the user will click on opening a specific lane i.e. turning the green signal for that specific lane, the
microcontroller will stop taking the data from IR Communication and will open the requested lane by
showing the green signal in twenty seconds. When the authorized person is done its work, he/she will again
have to set the control to automatic mode for the proper functioning of traffic. Then he/she can log out by
clicking on the log out button, the server will redirect to the monitoring page.
The circuit has been designed and configured with the help of Proteus Design Suite. The LEDs; red, yellow
and green, are connected in the matrix of 4 × 3 where 4 represent the number of lanes and 3 represent
respective LEDs. For the purpose of simulation and circuit design torch ldr is used as input collecting device.
In the implementation of hardware the torch ldr’s will be replaced by IR sensor (transmitter and receiver).
The controller is also connected with virtual terminal which is acting as an IOT server. Just as how the user
sends the request to server when once connected to web, we arealso sending the request to virtual
terminal and the virtual terminal it sends the response to user by displaying the messages on terminal.
DIAGRAMS
a. FLOW CHART
b. SEQUENCE DIAGRAM
c. USE CASE DIAGRAM
ALGORITHMS
a) Vehicle Counter Algorithm
Assuming the objects detected by the IR Sensors to be vehicles,
int counter = 0;
int hit Object = false;
int val ;
Step 1: Read value from sensor (val). Sensor gives output 0 if car is detected and 1 if no
car is detected.
Step 2: If val == 0 hit Object = false then increment the counter and set hit Object = true.
else if val == 1 hit Object = true
then set hit Object = false.
Step 3: Go to step 1
b) Traffic Control Algorithm
No. of sensors = 8 and are denoted by S1, S2, S3, S4, S5, S6, S7, S8
No. of cars in Lane 1 (N1) = S1 – S2
No. of cars in Lane 2 (N2) = S3 – S4
No. of cars in Lane 3 (N3) = S5 – S6
No. of cars in Lane 4 (N4) = S7 – S8
Li = (L1, L2, L3, L4), Ni = (N1, N2, N3, N4), Ti = (T1, T2, T3, T4)
Step 1: Start
Step 2: Sensors will read the no. of vehicles on each lane (i.e. L1, L2, L3, L4)
Step 3: if (Vehicle Count < Threshold) Then status = Normal traffic. Turn on the green
signal for all the lanes one after another in a sequential manner (L1-L2-L3-L4). When
signal is green for one lane, the others will remain red.
Step 4: else status = congestion.
Step 5: COMPARE (N1, N2 , N3, N4), Select the highest of the four (say Ni),turn on green
signal for that lane (say Li) for time (Ti). When time Ti ends, turn on the red signal.
Step 6: COMPARE (N2, N3, N4), Select the highest of the three (say Ni), turn on green
signal for that lane (say Li) for time (Ti). When time Ti ends, turn on the red signal.
Step 7: COMPARE (N3, N4), Select the highest of the two (say Ni), turn on green signal
for that lane (say Li) for time (Ti). When time Ti ends, turn on the red signal.
Step 8: The last remaining lane automatically gets selected and it is given the green
signal for time Ti.
Step 9: Jump to Step 3.
OPERATION
In the above figure, Lane 2 is open with green signal and other lanes are closed with red signal.
RELATED WORKS
In the field of IoT, many systems are proposed in order to control, manage the traffic system effectively. Each
of the systems use different types of technologies, components for managing Traffic congestion like IR
Sensors, RFID’s, Zigbee, Traffic warning systems, Big Data, Bluetooth etc. The following are some the works
that are related to our project. In the past ten years, the Internet of Things evolution has been
unprecedented. Recently, various driver assistance systems have been actively developed that use both
information communication technology and on-board sensors. Invisibility of traffic signal caused by huge
vehicles blocking the view, prevent traffic congestion at toll gates and give advanced collision warning to the
drivers. A microcontroller with a RF module will be installed and is programmed to connect to each
automobile passing by. Later it displays signal status on the traffic signal status display system installed inside
the automobile. This system installed in the vehicle is also capable of giving collision warnings to the driver.
IoT links the objects of the real world to the virtual world. It constitutes to a world where physical objects
and living beings, as well as virtual data and environments, interact with each other. Urban IoT system that
is used to build intelligent transportation system (ITS) has been developed. IoT based intelligent
transportation systems are designed to support the Smart City vision, which aims at employing the advanced
and powerful communication technologies for the administration of the city and the citizens. ITS uses
technologies like near field communication (NFC) and wireless sensor network (WSN).
Automation combined with the increasing market penetration of on-line communication, navigation, and
advanced driver assistance systems will ultimately result in intelligent vehicle highway systems (IVHS) that
distribute intelligence between roadside infrastructure and vehicles and in particular on the longer term, are
one of the most promising solutions to the traffic congestion problem. The simulation and evaluation of a
traffic congestion detection system which combines inter-vehicular communications, fixed roadside
infrastructure and infrastructure-to-infrastructure connectivity and big data. To simulate and evaluate, a big
data cluster was developed based on Cassandra. Big data cluster is coupled with discreet event network
simulator with the SUMO (Simulation of Urban Mobility) traffic simulator and the Veins vehicular network
framework. The results validate the efficiency of the traffic detection system and its positive impact in
detecting, reporting and rerouting traffic when traffic events occur.
CONCLUSION
Smart Traffic Management System has been developed by using multiple features of hardware components
in IoT. Traffic optimization is achieved using IoT platform for efficient utilizing allocating varying time to all
traffic signal according to available vehicles count in road path. Smart Traffic Management System is
implemented to deal efficiently with problem of congestion and perform re-routing at intersections on a
road.
This research presents an effective solution for rapid growth of traffic flow particularly in big cities which is
increasing day by day and traditional systems have some limitations as they fail to manage current traffic
effectively. Keeping in view the state of the art approach for traffic management systems, a smart traffic
management system is proposed to control road traffic situations more efficiently and effectively. It changes
the signal timing intelligently according to traffic density on the particular roadside and regulates traffic flow
by communicating with local server more effectively than ever before. The decentralized approach makes it
optimized and effective as the system works even if a local server or centralized server has crashed. The
system also provides useful information to higher authorities that can be used in road planning which helps
in optimal usage of resources.