Machine Learning based traffic light system
Original price was: ₹500.00.₹499.00Current price is: ₹499.00.
- The Machine Learning Based Traffic Light System uses computer vision and an ESP32 controller to detect vehicle density in real time and adjust signal timings automatically. This dynamic control reduces congestion, improves safety, lowers emissions, and enhances overall traffic efficiency.
Description
The MLBTLS project integrates a Python-based vehicle detection application with an ESP32 microcontroller to create a smart traffic management system. Cameras installed at intersections capture live video feeds, which are processed using the OpenCV library and trained ML models to detect and count vehicles. Based on real-time traffic density—especially on Side-1—the system calculates updated signal durations. For every detected vehicle, the green-light time increases by one second, up to a maximum predefined limit. These timings are then transmitted either through serial communication (UART) or wirelessly via MQTT, ensuring flexible and reliable data exchange.
On the hardware side, the ESP32 receives this information and updates both the traffic signal LEDs and a graphical TFT display. It operates through multiple parallel tasks—including an HTTP server for configuration, a graphical interface for real-time monitoring, and communication modules for serial and MQTT data handling. Even if internet connectivity fails, the system seamlessly switches to serial communication, ensuring uninterrupted operation.
By adjusting signal timings based on real-time conditions, the MLBTLS significantly reduces congestion, minimizes abrupt stops, lowers emissions, and improves overall safety. The project demonstrates how AI, IoT, and embedded systems can merge to create a smarter, more efficient urban traffic management solution—one that is scalable, adaptive, and beneficial for modern smart cities.





