The Smart Traffic Light Control System is an intelligent traffic management solution designed to minimize waiting times and reduce congestion at intersections.
Using computer vision (OpenCV) and Arduino, the system detects real-time vehicle density and dynamically adjusts signal durations based on traffic flow.
This project was developed as part of a 6-member team to explore the application of AI and embedded systems in smart city development.
Conventional traffic lights operate on fixed timing cycles regardless of traffic conditions. This leads to inefficiency:
- Long waiting times at low-traffic periods
- Congestion during peak hours
- Increased fuel consumption and pollution
Goal: Create a system that adapts traffic signals dynamically based on real-time traffic data to reduce waiting times and improve intersection efficiency.
This project implements a Smart Traffic Light Control System using computer vision (OpenCV) and Arduino:
- Real-time vehicle detection using camera feeds and contour analysis in Python
- Dynamic signal timing with a custom algorithm that calculates green-light durations based on vehicle density
- Arduino-controlled LEDs to simulate real traffic lights
- Integration and testing to measure improvement in traffic flow
The system reduced average waiting time by 23% during testing, demonstrating the effectiveness of adaptive traffic management.
- Real-time vehicle detection using OpenCV-Python.
- Dynamic signal timing adjustment using a custom control algorithm.
- Arduino microcontroller used to manage LED-based traffic signals.
- Achieved a 23% reduction in average vehicle waiting time during testing.
- Modular code structure for easy updates and scalability.
- Programming Languages: Python, C++ (Arduino)
- Libraries: OpenCV, NumPy
- Hardware: Arduino Uno, LEDs, USB Camera
- Tools: Serial Communication, Python IDE
- Camera Module → Captures live traffic feed.
- Vehicle Detection Module (Python + OpenCV) → Counts vehicles using contour detection.
- Control Logic (Python) → Calculates optimal green signal duration.
- Arduino Module → Receives updated timing via serial communication and controls the lights.
- Choice: Computer vision using OpenCV
- Gain: Low-cost, non-intrusive, flexible for multiple lanes
- Trade-off: Sensitive to lighting/weather conditions; may require calibration
- Choice: Adaptive timing based on vehicle counts
- Gain: Reduced waiting time and congestion
- Trade-off: Slightly more complex control logic; requires robust testing to prevent errors
- Choice: Arduino handles hardware control, Python handles detection & algorithm
- Gain: Easy to prototype and test; modular
- Trade-off: Slight latency due to serial communication; not a production-ready embedded solution
- Choice: Only single intersection implemented
- Trade-off: City-wide optimization would need IoT integration and more complex coordination
Performance was evaluated by comparing the adaptive system to a fixed-timing traffic light:
| Metric | Fixed Timing | Adaptive System | Improvement |
|---|---|---|---|
| Average Vehicle Waiting Time | 60 seconds | 46 seconds | 23% |
| Signal Idle Time | High | Reduced | yes |
| Traffic Flow Efficiency | Low | Improved | yes |
The reduction in waiting time indicates the system can respond effectively to real-time traffic conditions.
- Integrate IoT-based sensors for more accurate traffic measurement.
- Create a dashboard for real-time monitoring and data analytics.
- Implement a city-wide coordination mechanism between intersections.
This project is for educational and demonstration purposes only.
Developed as part of an academic initiative under the Vellore Institute of Technology, Andhra Pradesh.
Team Size: 6 Members
My Role: Algorithm Design, Integration & Testing
- Designed the signal-switching algorithm to adjust light durations dynamically.
- Integrated real-time vehicle detection with Arduino signal control.
- Conducted testing and documented results on performance improvement.