An embedded system that uses ultrasonic sensing to detect vehicle presence in parking slots and communicates slot availability in real time through a traffic-light LED indicator — no human management required.
This smart parking system eliminates the need for parking attendants by automatically detecting whether a parking slot is occupied or free. The ESP32 microcontroller reads distance data from an HC-SR04 ultrasonic sensor and maps it to a three-state traffic light output — green (free), yellow (entering/leaving), and red (occupied).
The system can be scaled to monitor multiple slots simultaneously and can be extended with Wi-Fi reporting to a central dashboard for larger parking facilities.
The firmware is written in bare-metal Embedded C for the ESP32. The main loop polls the ultrasonic sensor at 10Hz, applies a moving average filter to reduce noise, and compares the result against configurable near/far thresholds to determine slot state. A hysteresis band around each threshold prevents flickering between states.