Smart parking slot finder
Students and staff circle the campus parking at 9 am looking for a slot. Sensors on each slot and a display at the gate show which slots are free.
- Parts
- ₹2,120
- Build
- 10 weeks
- Board
- ESP32
- Objectives
- 6
Block diagram
- IR sensor per slotDetects a parked vehicle
- CameraCaptures a photo when the event happens+
- ESP32Counts free slots
- Gate displayShows free slots and where
- Servo barrierOpens only when a slot is free
- Cloud dashboardStores readings, plots trends and sends alerts+
Objectives
- To detect vehicles in each slot reliably (debounced, shaded from direct sun).
- To show free slots at the entrance.
- To open the barrier only when a slot is free.
- To measure detection errors over 100 parking events.
- To publish readings over MQTT and show them on a live dashboard with threshold alerts.
- To capture and store an image automatically when an event is detected.
Parts and specifications
- ESP32 DevKit V1Dual-core 240 MHz, 520 KB SRAM, Wi-Fi + Bluetooth, 3.3 V logic, 12-bit ADC (use ADC1 pins when Wi-Fi is on)₹450Buy
- IR obstacle sensor moduleReflective IR pair with LM393, 2 to 30 cm set by trimmer, digital out, sunlight can false-trigger₹240Buy
- 16×2 LCD with I²C backpackHD44780, PCF8574 at 0x27 or 0x3F, 5 V, contrast trimmer on the back₹220Buy
- Model board, wires and cardboard₹300
- ESP32-CAM with OV2640ESP32 + 4 MB PSRAM + 2 MP OV2640 camera, microSD slot, needs 5 V 500 mA for stable Wi-Fi₹550Buy
Total about ₹2,120 at typical online prices. Tap a part for its pinout and datasheet notes.
Design calculations
A car passing by blocks a sensor for under 2 s; mark a slot occupied only after 3 s steady, and free after 5 s clear.
50 Hz, 1.0 ms = 0°, 2.0 ms = 180°. Barrier down at 0°, up at 90° = 1.5 ms.
Six IR modules × 20 mA + LCD 30 mA + ESP32 150 mA ≈ 300 mA, plus the servo up to 650 mA when moving: use a 5 V 2 A supply.
Pin map
| Signal | Pin or connection |
|---|---|
| IR sensors slots 1 to 6 | GPIO 32, 33, 25, 26, 27, 14 |
| Entry IR sensor | GPIO 13 |
| Servo signal | GPIO 18 (servo on its own 5 V) |
| LCD SDA / SCL | GPIO 21 / 22 |
Firmware outline
- Read each slot sensor every 100 ms and debounce with timers.
- Count free slots and list their numbers.
- When the entry sensor sees a car: if a slot is free, raise the barrier and close it 5 s after the car passes; else show 'FULL'.
- Show 'Free: 3 (2, 4, 6)' on the LCD and serve a JSON for a web or app map.
Test plan
| Test | Expected result |
|---|---|
| Model car placed in a slot | Slot marked occupied after 3 s |
| All slots full, car at entry | Barrier stays down, 'FULL' |
| Car passing the slot without parking | No change |
| 100 parking events | Errors counted, sunlight shaded and unshaded |
These rows start your results table when you plan the project.
Viva practice
Say your answer out loud first, then check. The first 2 answers are free; Maker opens all 5.
Make it yours
One or two upgrades for a mini project, two to four for a major one.
Build these first
Datasheets and sources to cite
- FC-51 IR obstacle sensor notes
- TowerPro SG90 datasheet
- Espressif ESP32 datasheet
About this project
How much does the smart parking slot finder project cost?
About ₹1,420 for the parts in the base list: ESP32 DevKit V1, IR obstacle sensor module × 6, SG90 micro servo, 16×2 LCD with I²C backpack, Breadboard 830 points, Model board, wires and cardboard.
How long does it take?
About 6 weeks for the base project, built on an ESP32. Each upgrade adds time.
Which branches is it suitable for?
Electronics and Communication, Computer Science / IT (IoT, AI), Diploma (any electronics branch), as a mini or major project.
Which pins and design calculations does it use?
IR sensors slots 1 to 6 on GPIO 32, 33, 25, 26, 27, 14; Entry IR sensor on GPIO 13; Servo signal on GPIO 18 (servo on its own 5 V). Worked calculations on this page: debounce time, servo pulse, supply current.
How do I test it?
Model car placed in a slot: Slot marked occupied after 3 s. All slots full, car at entry: Barrier stays down, 'FULL'. Car passing the slot without parking: No change. 100 parking events: Errors counted, sunlight shaded and unshaded.
What are the objectives?
To detect vehicles in each slot reliably (debounced, shaded from direct sun). To show free slots at the entrance. To open the barrier only when a slot is free. To measure detection errors over 100 parking events.
