TL;DR
The Automated Parking System is a comprehensive mechatronics solution designed to mitigate urban congestion and eliminate manual oversight in parking facilities. By integrating ESP32-powered hardware, YOLOv11-driven computer vision, and a multi-functional web dashboard, the system automates the entire vehicle lifecycle: from entry detection and license plate recognition (LPR) to dynamic LED-guided navigation and automated fee calculation.
Problem
Urban infrastructure faces significant challenges in managing limited parking capacity, often resulting in traffic congestion and inefficient land utilization. Traditional management systems frequently suffer from:
- Manual Supervision: High labor costs and the potential for human error in gate operation.
- Processing Latency: Delays in identifying vehicle status and available spots.
- Fragmented Integration: Disconnected systems for payment processing, location tracking, and entry control.
The objective was to engineer a unified, cost-effective architecture that replaces manual intervention with automated logic, leveraging high-speed vision processing and real-time IoT communication.
Solution
The proposed solution is a fully automated parking management system that integrates:
- Servo-Actuated Gates: Controlled via MQTT to manage entry and exit based on verified vehicle status.
- LED Navigation Array: Dynamically guides drivers to the nearest available parking slot, reducing search time and congestion.
- Management Dashboard: A web-based interface for administrators and users to monitor occupancy, manage subscriptions, and process payments in real-time.
- Clients Dashboard: A user-facing portal that allows drivers to view their parking history, manage subscriptions, and locate their vehicles using license plate recognition.
Design Iterations
A critical phase of the engineering process involved refining physical enclosures and mechanical mountings to accommodate structural tolerances and electrical wiring requirements.
1. ESP32-CAM Housing
The initial 3D-printed enclosure failed to lock the camera PCB securely, leading to module vibration and misaligned camera perspectives. The second iteration introduced a snap-fit locking front cover and enlarged wire notches to reduce physical strain on power and serial connection lines.
๐ Click to expand
๐ Click to expand
2. Servo Mounting Horns
Standard mounting horns presented fitment tolerance issues when coupling the SG90 servo shaft to the rotating camera base. Redesigning the horn geometry and expanding the inner coupling diameter by 0.2 mm compensated for 3D printer material shrinkage, securing a precision fit for smooth 180-degree scanning.
๐ Click to expand
๐ Click to expand
Software & Hardware Architecture
The system operates across three interconnected layers: physical hardware execution, wireless communication protocols, and central software logic.
-
Main ESP32 Controller: Acts as the local execution hub, driving the SG90 servo motors for gate barriers and managing pin outputs for the 12-LED navigation strip.
-
Vision Nodes: Two ESP32-CAM modules are deployed: one is fixed at the entry/exit point to capture license plates; the other is mounted on a rotating servo to scan the entire lot, effectively reducing the number of required static cameras. The worst part of using the ESP32-CAM is that it required flashing the firmware using a serial adapter, which was a tedious process. However, once flashed, the modules performed reliably for real-time image capture and streaming.
๐ Click to expand
๐ Click to expand
๐ Click to expand
- Communication Protocols:
- MQTT: Handles low-latency messaging between the main ESP32 controller and backend server across four main topics:
esp32/entry,esp32/exit,esp32/LED, andesp32/main. - HTTP: Streams snapshot feeds from both ESP32-CAM IP addresses directly to the host processing server.
- MQTT: Handles low-latency messaging between the main ESP32 controller and backend server across four main topics:
Backend & Image Processing
1. Automated Parking & Guidance Logic
When a vehicle approaches the entry lane, the system checks database availability. If valid, the backend publishes an OPEN signal to esp32/entry. Concurrently, a pathfinding function calculates the physical distance from the entry gate to the target vacant slot and issues a command to esp32/LED to illuminate the corresponding number of LEDs along the track.
2. YOLOv11 License Plate Recognition
Initial OCR iterations struggled to accurately parse bilingual Egyptian license plates. The vision pipeline was upgraded to a fine-tuned YOLOv11 model (ACLPR) capable of detecting plate bounding boxes and performing character recognition on Arabic and English alpha-numerics simultaneously.
3. OpenCV Occupancy Detection
The scanning camera divides incoming video frames into pre-mapped bounding boxes corresponding to physical parking slots. An OpenCV image classification routine checks each slotโs region of interest (ROI) to classify state as occupied or vacant, dynamically updating the database.
4. Database Schema & Web Dashboards
The system uses a relational SQLite database organized into six interconnected tables:
CARS: Stores unique plate strings and subscription flags.PARKING_SLOTS: Stores slot IDs, vacancy states, and gate distance metrics.IN_PARKING: Tracks active vehicles and entrance timestamps.PARKED: Maps vehicles to their assigned slot IDs.SUBSCRIPTIONS: Manages member plans, start dates, and expiry dates.TRANSACTIONS: Logs billing records, hourly rates, duration, and revenue.
Management Portal
Provides managers with live facility capacity metrics, revenue breakdowns, slot map visualization, and manual vehicle lookup tools.
๐ Click to expand
๐ Click to expand
๐ Click to expand
๐ Click to expand
Customer Portal
Allows drivers to locate their vehicle by typing their plate number, review accrued parking fees based on duration, and purchase monthly/yearly membership subscriptions.
๐ Click to expand
๐ Click to expand
๐ Click to expand
๐ Click to expand
๐ Click to expand
Technical Challenges & Troubleshooting
- Power & Line Resistance: Long wire runs from the main breadboard to the entry camera caused voltage drops, dropping the camera offline. Re-routing power rails and utilizing dedicated supply buses resolved signal instability.
- Network Isolation: University Wi-Fi client isolation blocked direct MQTT communication between the ESP32 microcontrollers and the FastAPI local server. The deployment of a dedicated local router re-established internal MQTT/HTTP traffic.
Final Prototype
The completed prototype features a custom MDF physical base plate () supporting entry/exit gate towers, ground-embedded LEDs, central wire routing underneath the board, and a rotating camera module monitoring 10 numbered parking slots.
๐ Click to expand
๐ Click to expand
๐ Click to expand