AMT
Back to Projects

FlowSync

IoT smart traffic light system for single-lane roads with dual ESP32-CAM control

Nov 2025 - Dec 2025Full-Stack Developer
ArduinoESP32PHP

Problem

Narrow or single-lane roads, where vehicles from opposite directions cannot pass simultaneously.

Goals

  • Integrate IoT technology and a camera for real-time traffic monitoring
  • Provide a web-based interface for remote traffic light control
  • Ensure safe, efficient, and alternating traffic flow
  • Provide robust user management and control functionalities

Approach

Edge Processing

Programmed ESP32-CAM modules to capture and send real-time visual data directly to a central controller

Web Interface

Built a PHP-based web interface to monitor real-time traffic status and provide remote manual override for operators

Decisions

ESP32-CAM

Why: Selected for its cost-effectiveness, built-in WiFi, and integrated camera for edge-based traffic monitoring

Tradeoff: Limited processing power compared to more expensive alternatives

PHP for Web Dashboard

Why: Chosen for its lightweight footprint and ease of deployment

Tradeoff: Less modern ecosystem, but sufficient for the task

Challenges

Real-time Data Transmission

Ensuring low-latency and stable delivery of live feed data from the ESP32-CAMs to the central controller was addressed by optimizing image compression and packet size

Fail-Safe Logic

Designing fallback logic to guarantee that both ends of the single lane would never simultaneously show a green light was implemented safely

Outcomes

Dynamic Flow

Performance

Delivered a functional prototype that dynamically adjusted light timings based on real-time vehicle queues

Success

Integration

Successfully integrated hardware embedded systems with a web-based user interface for remote administration

Learnings

Edge Processing & Constraints

Learning how to optimize image compression and packet size when working with low-power devices like the ESP32-CAM.

Fail-Safe Systems & Hardware Logic

The mindset shift of writing code where failure isn't just a bug, but a safety hazard (e.g., ensuring both ends of the lane never turn green at the same time).

Full-Stack Hardware Integration

Bridging the gap between embedded C++ (Arduino) and a web frontend (PHP) to create a cohesive remote monitoring dashboard.