ESP32 Smart Car Parking System

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.

PlatformESP32
SensorHC-SR04 Ultrasonic
LanguageEmbedded C
StatusCompleted
ESP32 Smart Car Parking System

Project Overview

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.

Key Features

  • HC-SR04 ultrasonic sensor with ±3mm distance accuracy
  • Three-state LED indicator: Green / Yellow / Red
  • Debounced state transitions to avoid false triggers
  • Configurable detection threshold distance
  • Wi-Fi capability ready for network expansion
  • Low power consumption — suitable for battery-backed deployments

Firmware Design

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.

Start a Similar Project