IOT BASED SMART TRAFFIC DIVERSION SYSTEM FOR
ROAD CONGESTION MANAGEMENT
Project Created by:
G.Archana,M.Baviya,B.Monica,V.Shalini
Project Reviewed by:A.Libonce
Project Created Date: 28/05/2024
Project Code: IoT 005
College Code: 5113
Team Name: IoT 0936
Our Smart Traffic Diversion System utilizes cutting-edge IoT technology to tackle road
congestion head-on. By harnessing real-time data from sensors embedded in road
infrastructure, vehicles, and urban environments, the system dynamically analyzes traffic
patterns. Through AI algorithms, it identifies congestion hotspots and optimizes traffic flow
by diverting vehicles through alternate routes in real-time. This proactive approach not only
minimizes travel time for commuters but also reduces carbon emissions and enhances road
safety. With its scalable architecture and adaptable algorithms, our system offers a
sustainable solution for managing urban traffic congestion effectively.
Executive summary:……………………………………………………………………………………………………………2
Table of contents:……………………………………………………………………………………………………………….3
Project objective:………………………………………………………………………………………………………………..4
Scope:…………………………………………………………………………………………………………………………………5
Methodology:…………………………………………………………………………………………………………….……….5
Artifacts used:…………………………………………………………………………………………………………….……….6
Technical coverage:……………………………………………………………………………………………………………..8
Results:………………………………………………………………………………………………………………………………14
Challenges and resolutions:………………………………………………………………………………………………15
Conclusion:…………………………………………………………………………………………………………………………15
References:…………………………………………………………………………………………………………………………16
A real time traffic management system (TMS) using the Internet of Things(IoT) and data
analytics and can be predicted portable traffic congestion in the intersection point and
identify the vechicle and charge a fine that is paid through wallet mobile app.This proposed
system is cost effective , very simple to install and easy to maintain.
1. Real-time Data Collection: Sensors, cameras, and other IoT devices collect data on
traffic volume, speed, and congestion levels across road networks.
2. Data Analysis: The collected data is processed in real-time using machine learning and
AI algorithms to identify patterns, predict traffic congestion, and optimize traffic flow.
3. Intelligent Decision Making: Based on the analysis, the system makes intelligent
decisions to divert traffic away from congested areas by suggesting alternative routes to
drivers through digital signage, mobile apps, or in-car navigation systems.
4. Integration with Wokwi: Wokwi, a virtual hardware prototyping platform, can be utilized
to simulate and test the Smart Traffic Diversion System's algorithms and hardware
components before real-world deployment. This allows for thorough testing and optimization,
reducing the risk of system failures and improving overall performance.
5. Adaptive Control: The system continuously monitors traffic conditions and
dynamically adjusts diversion strategies to respond to changing congestion patterns,
accidents, or road closures in real-time
® Reducing traffic jams and accidents on the streets.
® Ensuring immediate clearance for emergency vehicles.
® Facilitating safer and shorter commute times.
® Reducing congestion and energy consumption at intersections.
® Offering significant productivity benefits with real time monitoring of crucial
infrastructures.
® Ensuring compliance with the regulation for reducing the carbon foot print.
® Saving billions of gallons of fuel wasted every year.
® Accurate tracking and quick recovery of lost and stolen vehicles.
The scope and the key features are listed below depending on cities sie and the scope of the
governmental policies.
® With cloud connectivity, sensors, and CCTV cameras tracking
intersections and 24*7, technicians can remotely monitor all the streets in real time from
the cities control room.
® A smart traffic system using IoT technology can connect with road
side tracking devices to enable direct communication between intelligent vehicles and
intersections.
® Real time detection of congestion triggers dynamic adjustments in the
systems meant for controlling traffic lights , express lanes , entry alarms.
® A system with edge data processing and programmatic alerting
capabilities can immediately flag high cruising speeds and reckless driver or inappropriate
pedestrian behaviour.
® Commercial traffic management systems enable quick and
convenient electronic financial data safety.
The project follows a systematic approach:
: Research existing traffic management systems and IoT technologies to
understand current methodologies and identify areas for improvement.
: Develop routing algorithms to divert traffic away from congested
areas. This can involve machine learning techniques to predict and manage traffic
congestion.
Build a prototype system using the
chosen hardware and
software components.
Test the system in a controlled environment to ensure it
functions as expected.
Incorporate feedback from users and traffic
data to continuously improve
the system.
1. Microcontroller (Arduino Mega 2560): The Arduino Mega 2560 is a
microcontroller board based on the Atmega 2560. It has 54 digital input/output pins (of which
15 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports), a 16
MHz crystal oscillator, a USB connection, a power jack, an ICSP header, and a reset button.
It contains everything needed to support the microcontroller; simply connect it to a computer
with a USB cable or power it with a AC-to-DC adapter or battery to get started. The Mega
2560 board is compatible with most shields designed for the Uno and the former boards
Duemilanove or Diecimila
2. Microcontroller (Arduino Uno): The Arduino UNO is an open source microcontroller
board based on the Microchip ATmega328Pmicrocontroller and developed by Arduino.cc.
The board is equipped with sets of digital and analog input/output (I/O) pins that may be
interfaced to various expansion boards (shields) and other circuits. The board has 14 Digital
pins, 6 Analog pins, and programmable with the Arduino IDE (Integrated Development
Environment) via a type B USB cable.
3. LEDs: LEDs are used for the purpose of signaling according to the traffic condition.
4. IR Sensor: IR Sensor is used to count the vehicles on the road.
4. Jumper Wires: It is used to connect the components to each other
1.Urban Traffic Management: This system helps manage city
traffic by dynamically rerouting vehicles away from congested
routes, keeping traffic flowing smoothly.
2.Event Traffic Control: During large events like concerts or sports
games, the system directs traffic to alternative routes to prevent
congestion near the venue.
3.Emergency Response Optimization: It ensures emergency vehicles
reach their destinations quickly by rerouting them around traffic jams or
road closures.
4.Public Transportation Support: The system integrates with public
transport networks, prioritizing buses or trams to improve service
reliability.
5.Environmentally Friendly Routing: By reducing congestion and idling,
it minimizes fuel consumption and emissions, promoting environmental
sustainability.
6.Road Maintenance Assistance: During road repairs, it helps
manage traffic flow around construction sites to minimize disruptions.
7.School Zone Safety: It regulates traffic around schools during peak
hours to ensure student safety and prevent accidents.
8.Dynamic Tolling: Toll rates adjust based on traffic conditions,
encouraging drivers to use less congested routes.
9.Fleet Management: Logistics companies use it to optimize delivery
routes in real-time, improving efficiency and reducing delivery times.
10.Tourist Traffic Management: In tourist areas, it guides visitors to
less crowded routes, reducing traffic in residential neighborhoods.
These applications illustrate how a smart traffic diversion system can
make cities more livable and transportation networks more efficient.
1. ESP32 Simulator.
2. HC-SR04 Ultra Sonic Distance Sensor.
3. LED Bulbs.
4. Jumper wires.
Downloaded from https://wokwi.com/projects/400323423188466689
Simulate this project on https://wokwi.com
#define BLYNK_TEMPLATE_ID "TMPL3jc_NcE-q"
#define BLYNK_TEMPLATE_NAME "smart traffic diversion system for
road congestion"
#define BLYNK_AUTH_TOKEN "Oqz6G-ITkq0ywHrz3EvdPiwi1muURy7Z"
#include
<Blynk.h>
#include
<WiFi.h>
#include
<BlynkSimpleEsp32
.h>
// WiFi
credentials
const char* ssid = "Wokwi-
GUEST"; const char* password =
"";
const int trigPin = 5;
const int echoPin = 18;
const int redLED = 23;
const int yellowLED =
22; const int greenLED
= 21; long duration;
int distance;
void setup()
{ Serial.begin(115200);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(redLED, OUTPUT);
pinMode(yellowLED,
OUTPUT);
pinMode(greenLED,
OUTPUT);
// Connect to Wi-Fi and
Serial.print("Connecting to
WiFi .."); while (WiFi.status() !=
WL_CONNECTED) {
delay(1000);
Serial.print('.');
}
Serial.println("\nConnected to WiFi
and Blynk");
}
void loop() {
Blynk.run()
;
// Clear the trigPin by setting it
LOW digitalWrite(trigPin, LOW);
delayMicroseconds(2);
// Set the trigPin HIGH for 10
microseconds digitalWrite(trigPin,
HIGH); delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Read the echoPin, returns the sound wave travel time in
microseconds duration = pulseIn(echoPin, HIGH);
// Calculate the distance
distance = duration * 0.034 /
2;
Serial.print("Distance: ");
Serial.println(distance);
// Traffic light logic based on
distance if (distance < 100) {
digitalWrite(redLED, HIGH);
digitalWrite(yellowLED,
LOW);
digitalWrite(greenLED,
LOW);
Serial.println("Heavy Traffic Detected: Red Light
ON"); Blynk.virtualWrite(V2,HIGH);
Blynk.virtualWrite(V1,LOW);
} else if (distance < 200)
{ digitalWrite(redLED, LOW);
digitalWrite(yellowLED,
HIGH);
digitalWrite(greenLED,
LOW);
Serial.println("Moderate
Traffic Detected: Yellow
Light ON");
} else
Blynk.virtualWrite(V1,HIGH
);
Blynk.virtualWrite(V2,LOW)
;
}
// Send traffic data to Blynk
Blynk.virtualWrite(V0,
distance);
delay(10000); // Send data
every 10 seconds
}
A prototype was developed to demonstrate the applicability of our proposed system. Several
experiments on real traffic data were carried out to evaluate the efficiency of the proposed
algorithm. The traffic density was monitored and calculated by vehicle detection as shown in
Figure. As soon as the traffic density crosses the specified threshold on a road, the system
stopped the normal operation and kept the green light on till the situation on the road became
normal. The real-time data was also being sent to the local and central server as well.
Besides this, a web interface was also developed for the authorities to show them the statistics
of traffic on the roads so that they could make real-time and future decisions as discussed in
section III. Figure shows the statistical traffic data i.e. number of vehicles passed in a
particular time span at a particular road. The bar graph is representing real-time traffic data.
Different bar graphs based on historical and real-time data are being drawn in this application
which is helpful for traffic department and other related authorities for i) managing traffic
congestions on roads ii) and future planning.
Smart traffic system implementation needs connectivity among the different devices
without distrubing the device users, redundant data removal access point or gateway nodes.
It includes the security of the device which connect for data collection.Data storage
unit for huge amount collect data in real time and overwritting policies. Maintenance of
local data centers are at high cost and also risk there might be a chance of data
breaches.Some blind spot where sensors couldn’t install,so the traffic lead to
congestion.Difficulties in missing input data.high speed vehicles are difficult to identified
and also in exchanging large amount of data. CCTV Camera used to detect and has the
drawback of poor-quality image and difficult to trace the vehicle count chances of less
accuracy level in prediction.Using some edge devices like road side unit lead to high end
cost of investing cellular towers near by roadside. Difficulties for placing Radio
frequency identification tags in each vehicle to detect the traffic level. Traffic patterns
recognized by previous data set like morning and evening peak hours which make poor
stability.Autonomous vehicle is the self-drivingautomobiles which receives the virtual
traffic signals.Solutionis to prevent traffic congestion deduction andreductionis smart
traffic by using machine learning algorithm is performing for predicting accurate
result.The main aim is to prevent the upcoming vehicle by diverting or redirecting in
shortest way inorder to remove the traffic in urban area.By using sensor andinput data are
highly secured in cloud database. Detecting and analyzing the input data from cloud platform.
More number of predictions will give more accuracy .
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 centralized server communicates the nearest rescue
department in case of an emergency situation which provides timely human safety. Moreover,
a user can ask about future traffic level at particular road hence avoiding wastage of time in
traffic jams. The system also provides useful information to higher authorities that can be
used in road planning which helps in optimal usage of resources.
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.
1W. S. Associate, "Transportation and Economy Report," MDOT
State LongRange Transportation Plan, Karachi, 2007.
2K. S. D. M. R. B. Patan Rizwan, "Real-Time Smart Traffic
Management System for Smart Cities by Using Internet of Things and Big
Data," in International Conference on Emerging Technological Trends
[ICETT], Kollam, 2016.
3C. S. D. L. T. Authority, "Annual Vehicle Statistics," Annual
Vehicle Statistics 2015, Karachi, 2015.
4M. P. a. B. B. Sivasankar, "IoT Based Traffic Monitoring using
Raspberry Pi," Internation Journal of Research in Engineering, Science
and Technology (IJRESTs), vol. 1, no. 7, pp. 2454-664x, 2016.
5 A. Lone, "Karachi’s crime malaise," Tribune.com.pk, 18 August
2011.
[Online]. Available: https://blogs.tribune.com.pk/story/7540/karachiscrime-malaise/.
[Accessed 20 September 2017].
6S. Sharief, "Road Accidents in Pakistan Reach Alarming High:
Who’s Responsible," Pakwheels.com, 2016. [Online]. Available:
https://www.pakwheels.com/blog/alarming-increase-of-road-accidentsin-pakistan/. [Accessed
2017].