Fixed-time traffic signals cannot respond to changing vehicle demand or to the urgent movement of emergency vehicles, and ambulances in particular can lose critical minutes at congested intersections. This paper proposes an AI-enabled Intelligent Traffic Control with Emergency Vehicle Detection framework that uses YOLOv8 to detect ambulances, fire trucks, and police vehicles from camera video, estimates lane-wise traffic demand, and requests priority for the emergency vehicle’s lane through a controlled signal transition. Detection results travel through an ESP32 communication unit to an STM32 controller that runs a finite-state signal machine. At the same time, a MERN-stack dashboard shows live counts, signal states, alerts, and detection history. We review an earlier IoT-based base paper and related studies, define the design problem, and describe the architecture, decision logic, message format, safety rules, and fallback behaviour. The work is at the design stage, so no measured results are claimed. Instead, we set out an evaluation plan covering detection quality, response latency, waiting time, communication reliability, and signal safety. The framework is a starting point for an LED-signal prototype, not for use on public roads.
Introduction
The paper proposes an AI-Based Smart Traffic Signal Control System with Emergency Vehicle Priority to reduce traffic congestion and provide faster passage for emergency vehicles such as ambulances, fire trucks and police vehicles.
Traditional traffic signals use fixed green-light timings, which may cause unnecessary waiting when one road has less traffic while another has long queues. This problem becomes more serious when emergency vehicles need to cross an intersection quickly.
The proposed system uses a camera and YOLOv8 object detection to identify vehicles, estimate traffic density and detect emergency vehicles. It uses ESP32 and STM32 microcontrollers to communicate and control traffic signals, while a MERN-stack dashboard displays real-time system information.
1. Literature Survey
Previous research has explored IoT-based emergency traffic management, voice/RF-based ambulance detection, image processing and YOLO-based vehicle recognition.
The base paper proposes ambulance detection using RF, sound and camera sensors with Arduino or Raspberry Pi.
YOLO-based systems detect vehicles and provide emergency priority through traffic signal controllers.
Other approaches use RFID, GPS, image processing and fuzzy logic for traffic management.
However, existing systems have limitations, including poor detection in bad weather, dependence on special equipment, communication delays, fixed-duration emergency green signals and limited fault tolerance.
2. Problem Statement and Research Gap
Fixed-time traffic signals cannot efficiently handle changing traffic conditions or provide immediate priority to emergency vehicles.
The proposed system aims to address these problems through:
Real-time vehicle detection using cameras.
Automatic traffic density estimation.
Detection of ambulances, fire trucks and police vehicles.
Controlled emergency green-signal priority.
Safe signal transitions and communication-failure handling.
A live dashboard for monitoring traffic conditions.
3. Proposed System Architecture
The system consists of five main layers:
Video Acquisition: A camera captures live traffic footage.
AI Detection: YOLOv8 with Python and OpenCV detects vehicles and estimates traffic density.
Communication: ESP32 transfers detection information to the STM32 controller.
Signal Control: STM32 manages traffic lights using a predefined signal state machine.
Dashboard Monitoring: A MERN-stack application displays live traffic information and system status.
The MERN stack includes:
MongoDB – Stores traffic and system records.
Express.js – Handles backend APIs.
React.js – Provides the dashboard interface.
Node.js – Runs the backend environment.
4. Vehicle Detection and Traffic Estimation
YOLOv8 is used to detect different vehicle categories, including:
Cars and motorcycles.
Buses and trucks.
Ambulances.
Fire trucks.
Police vehicles.
The camera divides the road into different regions corresponding to each traffic approach. The system estimates the number of vehicles and queue length to determine which road requires green-signal priority.
Low-confidence detections are not allowed to trigger emergency signal changes independently.
5. Adaptive Traffic Signal Control
The system calculates a traffic demand score for each road based on three factors:
Number of vehicles.
Estimated queue length.
Waiting time since the last green signal.
The road with the highest eligible demand receives the green signal, subject to minimum and maximum green times.
Yellow and all-red intervals are included to ensure safe transitions between traffic signals.
6. Emergency Vehicle Prioritization
When an ambulance, fire truck or police vehicle is detected with sufficient confidence over multiple consecutive frames, the system generates an emergency request.
The controller then:
Identifies the road on which the emergency vehicle is approaching.
Safely terminates the current green phase.
Activates the yellow signal.
Provides an all-red clearance interval.
Activates the green signal for the emergency vehicle's road.
Monitors whether the emergency vehicle has passed.
Returns to normal adaptive traffic control.
Conclusion
This paper presented a design-stage framework for AIenabled Intelligent Traffic Control with Emergency Vehicle Detection. The design joins YOLOv8 detection, ESP32 communication, STM32 signal control, LED prototype outputs, and a MERN monitoring dashboard. It defines a demand-based decision rule, a confidence-gated emergency workflow with clearance-checked release, and rules for message validation, timeouts, and safe phase changes. Because nothing has been implemented or measured yet, the contribution is architectural and methodological. Building the prototype and testing it against a fixed-time baseline are needed before any performance claim can be made.
References
[1] Nithyashree R, Manoj HK, Huzaif Ahmad, Mohammed Haris, and Manohar M, “Smart IoT-Based Traffic Signal Control System with Emergency Vehicle Detection,” International Journal of Innovative Research in Technology (IJIRT), vol. 12, issue 2, Jul. 2025.
[2] Abhinand Mohan, Akash V, Asiya Shafi, and Farsana AS, “Smart Traffic Signal System using AI-Based Vehicle Detection and Emergency Prioritization,” International Journal of Engineering Research & Technology (IJERT), vol. 15, issue 03, Mar. 2026.
[3] H. O. Aworinde, O. O. Osunmakinde, and T. L. Afolabi, “Development of a Prioritized Traffic Light Control System for Emergency Vehicles,” IJERT, vol. 8, no. 4, pp. 237–241, Apr. 2019.
[4] B. Chong, M. B. Mustaffa, A. W. A. Wahab, and N. A. Rahim, “Smart Traffic Light Control System Using Image Processing,” in Proc. IEEE Int. Conf. on System Engineering and Technology (ICSET), 2016, pp. 8–12.
[5] S. Djahel, R. Doolan, G. Muntean, and J. Murphy, “A Communications-Oriented Perspective on Traffic Management Systems for Smart Cities: Challenges and Innovative Approaches,” IEEE Communications Surveys & Tutorials, vol. 17, no. 1, pp. 125–151, 2015.
[6] R. Jimenez-Moreno et al., “Ambulance Detection for Smart Traffic Light Applications with Fuzzy Controller,” Journal of Ambient Intelligence and Humanized Computing, vol. 11, no. 10, pp. 4307–4318, Oct. 2020.
[7] A. Zerroug, A. Guermazi, and H. H. Ben Ghezala, “Adaptive and Dynamic Smart Traffic Light System for Efficient Management of Regular and Emergency Vehicles at City Intersection,” Procedia Computer Science, vol. 170, pp. 708– 713, 2020.
[8] R. Vani and B. S. Aithal, “Intelligent Traffic Control System with Priority to Emergency Vehicles,” International Journal of Computer Applications, vol. 116, no. 23, pp. 7–12, Apr. 2015.
[9] J. A. Omina, “An Intelligent Traffic Light Control System Based on Fuzzy Logic Algorithm,” International Journal of Computer Applications, vol. 179, no. 27, pp. 25–30, Mar. 2018.
[10] J. Redmon, S. Divvala, R. Girshick, and A. Farhadi, “You Only Look Once: Unified, Real-Time Object Detection,” in Proc. IEEE Conf. on Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779–788.
[11] G. Bradski, “The OpenCV Library,” Dr. Dobb’s Journal of Software Tools, 2000.