Summary
Finding a vacant parking space can be frustrating, especially in busy commercial areas, office buildings, and residential complexes. This is one of the reasons smart parking systems have become a key component of modern smart city infrastructure. By using sensors and automation, these systems can detect parking occupancy and provide real-time information about available spaces. In this tutorial, you'll learn how to build a smart parking Arduino India project using an Arduino Uno and ultrasonic sensors. The system will detect whether a parking slot is occupied and display its status using LEDs. Along the way, you'll learn sensor interfacing, distance measurement, and basic automation concepts that can be expanded into larger IoT-based parking solutions.

What Is a Smart Parking System?
A smart parking system automatically monitors parking spaces and determines whether they are occupied or available.
Instead of manually checking every parking slot, sensors continuously monitor vehicle presence and provide status updates.
Benefits include:
-
Reduced time spent searching for parking
-
Better space utilization
-
Improved traffic flow
-
Foundation for smart city applications
-
Real-time parking availability monitoring
Commercial parking systems often use cameras, RFID systems, or wireless sensors. For this project, we'll use an ultrasonic sensor to keep the implementation simple and affordable.
Components and Supplies
How the System Works
The project uses an ultrasonic sensor to measure the distance between the sensor and the object below it.
The process works as follows:
-
The ultrasonic sensor continuously measures distance.
-
Arduino receives the distance reading.
-
If a vehicle is detected within a predefined range, the slot is marked as occupied.
-
The red LED turns ON.
-
If no vehicle is present, the slot is marked as available.
-
The green LED turns ON.
This simple logic forms the basis of many smart parking systems.

Components Required
To build this project, you'll need:
-
220Ω Resistors
-
USB Cable
Component Overview
Arduino Uno
Acts as the controller that processes sensor readings and determines parking status.
Ultrasonic Sensor
Measures the distance between the sensor and nearby objects using ultrasonic waves.
LEDs
Provide a visual indication of whether the parking slot is occupied or available.
Circuit Connections
Ultrasonic Sensor Connections
-
VCC → Arduino 5V
-
GND → Arduino GND
-
TRIG → Arduino D9
-
ECHO → Arduino D10
Green LED Connections
-
Positive terminal → Arduino D3 through a 220Ω resistor
-
Negative terminal → Arduino GND
Red LED Connections
-
Positive terminal → Arduino D4 through a 220Ω resistor
-
Negative terminal → Arduino GND
Building the Circuit
Step 1: Mount the Components
Place the Arduino Uno and breadboard on your workspace.
Insert the ultrasonic sensor and LEDs into the breadboard.
Step 2: Connect the Ultrasonic Sensor
Wire the VCC, GND, TRIG, and ECHO pins according to the connection guide.
Step 3: Connect the LEDs
Connect the green and red LEDs with current-limiting resistors.
Step 4: Verify Wiring
Double-check every connection before powering the circuit.
Arduino Code
const int trigPin = 9;
const int echoPin = 10;
const int greenLED = 3;
const int redLED = 4;
long duration;
float distance;
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(greenLED, OUTPUT);
pinMode(redLED, OUTPUT);
Serial.begin(9600);
}
void loop() {
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = duration * 0.034 / 2;
Serial.print("Distance: ");
Serial.println(distance);
if(distance < 15) {
digitalWrite(redLED, HIGH);
digitalWrite(greenLED, LOW);
Serial.println("Parking Slot Occupied");
}
else {
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
Serial.println("Parking Slot Available");
}
delay(500);
}
Understanding the Code
Step 1: Measure Distance
The ultrasonic sensor sends a sound pulse and waits for the reflected signal.
Arduino calculates distance using the echo return time.
Step 2: Compare Distance
The measured distance is compared against a threshold value.
if(distance < 15)
This means a vehicle is assumed to be present if the measured distance is less than 15 cm.
Step 3: Update Parking Status
If a vehicle is detected:
-
Red LED turns ON
-
Green LED turns OFF
If the slot is empty:
-
Green LED turns ON
-
Red LED turns OFF
Testing the Smart Parking System
Step 1
Upload the code to the Arduino Uno.
Step 2
Open the Serial Monitor.
Step 3
- Place an object below the ultrasonic sensor.
- The Serial Monitor should display:
Parking Slot Occupied- The red LED should illuminate.
Step 4
- Remove the object.
- The Serial Monitor should display:
Parking Slot Available- The green LED should illuminate.

Possible Upgrades
The basic project works well for learning, but it can be expanded significantly.
-
Add multiple Ultrasonic Sensor Modules to monitor several parking spaces.
-
Use a 16x2 LCD Display Module to show available parking slots.
-
Control a Servo Motor to simulate an automated parking gate.
-
Upgrade to an ESP32 Development Board and send parking data to a cloud dashboard.
-
Allow users to check parking availability remotely through a mobile application.
Applications of Smart Parking Systems
This project can be adapted for:
-
Shopping malls
-
Residential complexes
-
Office buildings
-
Educational institutions
-
Smart city projects
-
Parking management research
Many modern parking systems use the same fundamental principle of occupancy detection combined with networking and analytics.
Common Issues and Solutions
Incorrect Distance Readings
Check:
-
Sensor alignment
-
Wiring connections
-
Power supply stability
LEDs Not Responding
Verify:
-
LED polarity
-
Resistor connections
-
Pin assignments in the code
False Occupancy Detection
Adjust the threshold value according to the actual installation height of the sensor.
Related Projects to Try Next
Once you've completed this project, consider exploring:
-
Home Automation Projects
-
IoT Projects Using ESP32
-
Smart Irrigation Systems
-
Ultrasonic Sensor Projects
-
Arduino Robotics Projects
These projects build on many of the same concepts used in parking automation systems.
Final Thoughts
A smart parking system is an excellent example of how sensors and automation can solve everyday problems. While this project uses a simple ultrasonic sensor and LEDs, the same concepts can be expanded into larger systems that provide real-time parking management across entire facilities.
For students, hobbyists, and makers looking for a practical smart parking Arduino India project, this build offers a hands-on introduction to distance sensing, occupancy detection, and automation logic. More importantly, it provides a strong foundation for exploring IoT, smart city technologies, and intelligent transportation systems in future projects.







