SmartPark v5 is a comprehensive IoT-enabled parking management solution designed to optimize urban mobility. By integrating edge computing hardware (ESP32/Raspberry Pi) with a sophisticated web platform, the system delivers real-time occupancy monitoring, seamless capability for advance slot booking, and intelligent navigation assistance.
The platform features a Dynamic Floor Plan offering immediate visual feedback on slot availability, utilizing advanced pathfinding algorithms to guide users efficiently to their designated spots.
The architecture of SmartPark v5 is designed for modularity, scalability, and real-time performance. It consists of three primary layers:
-
Presentation Layer (Frontend):
- Built with React.js and Vite for high-performance rendering.
- Visualizes the parking floor plan dynamically.
- Communicates with the backend via RESTful APIs to fetch slot status and manage bookings.
-
Logic & Data Layer (Backend):
- Powered by FastAPI (Python), ensuring low-latency request handling.
- Manages the state of all parking slots, processing data from hardware sensors and user interactions.
- Implements complex logic for pathfinding (A* algorithm), conflict resolution for bookings, and user authentication.
-
Physical Layer (Hardware & Edge Computing):
- Raspberry Pi 4: Acts as the central gateway and controls local sensors for Mall 1. It hosts the backend server.
- ESP32 Node: A wireless sensor node for Mall 2 that transmits ultrasonic sensor data to the main server over WiFi. It also controls local LED indicators for booking visualization.
- Real-Time Occupancy Detection: Precision monitoring using HC-SR04 ultrasonic sensors.
- Advanced Booking Engine:
- Flexible scheduling for Today and Tomorrow.
- Multi-slot reservation capability.
- Automated conflict resolution logic.
- Intelligent Navigation:
- Interactive Floor Plan: Dynamic visualization of slot states (Free, Occupied, Booked, My Booking).
- A Pathfinding*: Optimal route calculation from entry to slot.
- Load Balancing: Automated redirection to alternative levels when capacity is reached.
- Accessibility Focus:
- Reserved zones for Disabled and Elderly users.
- Profile-based access control ensuring restricted slots are only bookable by authorized users.
- Hardware Feedback Loop:
- Physical LED indicators sync with digital booking state in real-time.
- Frontend: React.js, Vite, Canvas API, GSAP.
- Backend: FastAPI (Python), Uvicorn, Pydantic.
- Data Persistence: In-memory structure (Performance-optimized for demonstration).
- Protocols: REST API, HTTP/JSON.
- Central Unit: Raspberry Pi 4.
- Sensor Nodes: ESP32 (WiFi-enabled Microcontroller).
- Sensors: HC-SR04 Ultrasonic modules.
- Actuators: Status LEDs.
- Python 3.9+
- Node.js & npm
- Raspberry Pi (Generic Linux environment supported)
- ESP32 Development Board
git clone https://github.com/YourRepo/SmartPark.git
cd SmartPark/smartparkv5The backend server manages logic and hardware communication.
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r backend/requirements.txtThe React-based user interface.
cd frontend
npm install
cd ..A unified script is provided for development convenience.
chmod +x run_dev.sh
./run_dev.sh- Backend API:
http://localhost:8000 - User Interface:
http://localhost:5173
Directly GPIO-connected sensors.
- Slot 1: Trig
GPIO 23, EchoGPIO 24 - Slot 2: Trig
GPIO 27, EchoGPIO 22 - Slot 3: Trig
GPIO 5, EchoGPIO 6 - Slot 4: Trig
GPIO 13, EchoGPIO 19
Operates as a remote client sending data to the Main Server.
- WiFi Configuration: Update credentials in
firmware/smartpark_esp32/smartpark_esp32.ino. - Sensor Map:
- S1: Trig
13, Echo33 - S2: Trig
12, Echo32 - S3: Trig
14, Echo35 - S4: Trig
27, Echo34
- S1: Trig
- Indicators:
- S1 LED: Pin
25 - S2 LED: Pin
26
- S1 LED: Pin
- Load
firmware/smartpark_esp32/smartpark_esp32.inoin Arduino IDE. - Target Board: AI Thinker ESP32-CAM or DOIT ESP32 DEVKIT V1.
- Verify
serverUrlmatches the backend host IP. - Flash firmware.
- Dashboard Access: Launch the web interface and select a target facility (Mall 1 or Mall 2).
- Slot Reservation: Tap any available Green slot. Choose the booking date ("Today" or "Tomorrow") and confirm.
- Route Guidance: Select "Navigate" on your booked slot to visualize the path.
- Smart Redirection: Use "Navigate to Closest" for automated assignment of the best available parking spot.
Maintained by Pratham Yadav and Kalepu Yashvardhan
