Mohammad Hafiz Bin Saipul Bahri Universiti Tun Hussein Onn Malaysia (UTHM)
Traffic congestion at road intersections often causes significant delays for emergency
vehicles, particularly ambulances, which can negatively impact response time and patient
outcomes. This project presents the design and development of an IoT-based smart traffic
light system with AI-assisted ambulance detection to prioritize emergency vehicles at
signalized intersections. The system utilizes an ESP32-CAM module to capture real-time
traffic images and applies an AI object detection model trained using the Roboflow 3.0
Object Detection framework to identify ambulances accurately.
Upon detecting an ambulance, the ESP32 microcontroller automatically overrides the
normal traffic signal sequence and provides a green light to the corresponding lane while
switching other lanes to red, ensuring a safe and unobstructed path. A safe transition
mechanism using a yellow-light phase is implemented to enhance road user safety. The
system is integrated with the Blynk IoT platform for real-time monitoring, status
visualization, and manual override capability.
Experimental results indicate that the proposed system operates reliably in real-time
conditions, successfully detecting ambulances and dynamically controlling traffic signals.
This approach demonstrates a cost-effective and scalable solution for intelligent traffic
management systems and has strong potential for deployment in smart city applications.
Keywords; Smart Traffic Light, Ambulance Detection, ESP32-CAM, Internet of Things (IoT),
Roboflow Object Detection, Emergency Vehicle Priority