Arduino Smart Parking System with IR Sensors and LCD: Ultimate Guide
Published on January 1, 2025 | By ArduinoUnoProjex
Create a cutting-edge Arduino smart parking system using IR sensors and a 16x2 LCD display! This beginner-friendly project detects parking space availability, displays statuses on an LCD, and alerts with an LED when spaces are full. Perfect for learning Arduino IR sensor projects and embedded systems, this guide covers components, wiring, code, and testing. Start building with our recommended products!
Note: Amazon product links are included for convenience (not ours, just recommendations). ELEGOO boards are not Arduino but are compatible with Arduino IDE and much more affordable.
Why Build an Arduino Smart Parking System?
What is an Arduino smart parking system? This project uses IR sensors to detect vehicle presence in two parking spots, displays “Free” or “Full” on a 16x2 LCD, and lights an LED when both spots are occupied. It’s ideal for mastering Arduino LCD projects and sensor integration.
Benefits: Teaches sensor interfacing, LCD control, and real-world applications like parking management.

The ultimate Raspberry Pi 5 starter kit—perfect for advanced DIY projects, programming, and STEM education. Includes 8GB RAM, 128GB storage, and quality components. Ideal for makers, students, and educators!

Best value Arduino Mega compatible board for complex robotics, 3D printing, and automation projects. Massive I/O, robust ATmega2560 microcontroller, and seamless compatibility with Arduino IDE.

Explore 37 different sensors and modules—ideal for learning coding, IoT, robotics, and all levels of Arduino experimentation. Includes tutorials and code samples.

Quality jumper wires for all breadboard and prototyping needs. Durable, flexible, and color-coded—essential for every electronics toolkit.

Connect your microcontrollers to your computer fast! CH340 USB to Serial modules are ideal for flashing, debugging, and uploading code to Arduino, ESP32, and more.
Components Needed
To build this Arduino smart parking system, gather these components:
- ✅Arduino Uno or ELEGOO Uno R3 (Arduino IDE-compatible)
- ✅16x2 LCD Display (with I2C module for simpler wiring)
- ✅IR Sensors (x2, e.g., TCRT5000 or Sharp GP2Y0A21)
- ✅LED (with 220Ω resistor)
- ✅Breadboard & Jumper Wires
- ✅USB Cable for Arduino
Optional: USB-to-Serial module (e.g., CH340) for debugging.
Wiring the Smart Parking System
How do I wire an Arduino smart parking system? Follow these schematics and instructions to connect the IR sensors, LCD, and LED.
Connection Table
Component | Arduino Pin | Details |
---|---|---|
LCD (RS, E, D4-D7) | 2, 3, 4, 5, 11, 12 | Or use I2C: SDA to A4, SCL to A5 |
IR Sensor 1 | 6 | Output to pin 6, VCC to 5V, GND to GND |
IR Sensor 2 | 0 | Output to pin 0, VCC to 5V, GND to GND |
LED | 13 | Anode to pin 13 via 220Ω resistor, cathode to GND |
Wiring Instructions
Connect LCD: Wire RS, E, D4-D7 to pins 2, 3, 4, 5, 11, 12. Alternatively, use an I2C module (SDA to A4, SCL to A5) for fewer wires.
Connect IR Sensors: Attach sensor 1 output to pin 6, sensor 2 to pin 0. Connect VCC to 5V and GND to GND for both.
Connect LED: Wire the LED anode to pin 13 via a 220Ω resistor, cathode to GND.
Power Arduino: Connect the Arduino to your computer via a USB cable.
💡Tip: If using an I2C LCD, install the LiquidCrystal_I2C
library and adjust the code accordingly.
Arduino Code for Smart Parking System
What code runs an Arduino smart parking system? This code uses IR sensors to detect parking status, updates an LCD, and controls an LED alert.
#include
#include
// LCD pin connections
LiquidCrystal lcd(2, 3, 4, 5, 11, 12);
// Sensor pins
const int p1 = 6; // Parking spot 1 sensor
const int p2 = 0; // Parking spot 2 sensor
int pl1, pl2; // Sensor states
void setup() {
pinMode(13, OUTPUT); // LED pin
pinMode(p1, INPUT); // Sensor 1
pinMode(p2, INPUT); // Sensor 2
lcd.begin(16, 2); // Initialize 16x2 LCD
Serial.begin(9600); // Start serial for debugging
}
void loop() {
// Read sensor states
pl1 = digitalRead(p1);
pl2 = digitalRead(p2);
// Update LCD for parking spot 1
lcd.setCursor(0, 0);
if (pl1 == LOW) {
lcd.print("P1 Free");
} else {
lcd.print("P1 Full");
}
// Update LCD for parking spot 2
lcd.setCursor(0, 1);
if (pl2 == LOW) {
lcd.print("P2 Free");
} else {
lcd.print("P2 Full");
}
// LED alert if both spots are full
if (pl1 * pl2 == 1) {
digitalWrite(13, HIGH);
} else {
digitalWrite(13, LOW);
}
delay(500); // Avoid flickering
}
Code Breakdown
- Libraries:
Wire.h
for I2C (optional),LiquidCrystal.h
for LCD control. - Pins: LCD on pins 2-5, 11-12; IR sensors on 6, 0; LED on 13.
- Setup: Configures pins, initializes LCD (16x2), and starts Serial for debugging.
- Loop: Reads IR sensor states, updates LCD with “Free” or “Full,” and lights LED if both spots are full.
Keywords: Arduino smart parking system code, IR sensor Arduino project, LCD display Arduino tutorial, smart parking logic.
Testing the Smart Parking System
How do I test an Arduino smart parking system? Follow these steps to verify functionality.
Upload Code: Connect Arduino to your computer and upload the code via Arduino IDE.
Check Wiring: Ensure IR sensors, LCD, and LED are correctly connected.
Test Sensors: Place objects in front of IR sensors to simulate vehicles. The LCD should display “P1 Full” or “P2 Full” when sensors detect objects, and “Free” when clear.
Test LED: Block both sensors; the LED on pin 13 should light up.
Expected Result: LCD shows real-time parking status, and LED activates when both spots are occupied.
💡Tip: If the LCD is blank, adjust the contrast potentiometer or verify pin connections.
Recommended Products
Start your Arduino smart parking system with these high-quality components from Amazon (affiliate links). ELEGOO boards are Arduino IDE-compatible and budget-friendly.
Understanding IR Sensors and LCD Displays
How do IR sensors and LCDs work in Arduino projects?
- IR Sensors: Emit infrared light and detect reflections to sense objects (e.g., vehicles). Output
HIGH
when an object is detected,LOW
when clear. - 16x2 LCD: Displays 16 characters across 2 rows, controlled via the
LiquidCrystal
library or I2C for simpler wiring.
Advantage: IR sensors are cost-effective and reliable for proximity detection; LCDs provide clear visual feedback.
Troubleshooting Tips
- ⚠️LCD Blank: Adjust contrast potentiometer or verify pin connections (2-5, 11-12 or I2C).
- ⚠️Sensors Not Detecting: Check IR sensor wiring, ensure VCC is 5V, and test with Serial monitor.
- ⚠️LED Not Lighting: Verify pin 13 connection and ensure both sensors output
HIGH
when blocked. - ⚠️Flickering Display: Increase
delay(500)
or optimize sensor readings.
Advanced Project Ideas
- 🚀Add more IR sensors for additional parking spaces.
- 🚀Integrate an ESP8266 for Wi-Fi connectivity to send status to a smartphone app.
- 🚀Use a 20x4 LCD to display total free spots or additional data.
- 🚀Add a buzzer to alert when parking is full.
Frequently Asked Questions
How do I build an Arduino smart parking system with IR sensors?
Wire IR sensors to pins 6 and 0, an LCD to pins 2-5, 11-12 (or I2C), and an LED to pin 13. Upload the provided code to display parking status and control the LED.
Why is my LCD not displaying text in the Arduino parking project?
Adjust the LCD contrast potentiometer, verify pin connections (2-5, 11-12 or I2C), and ensure the LiquidCrystal
library is installed.
Can I use ELEGOO boards for a smart parking system?
Yes, ELEGOO boards like Uno R3 or MEGA R3 are fully compatible with Arduino IDE and work perfectly for this project.
Conclusion
This Arduino smart parking system is a fantastic project to master IR sensors, LCD displays, and embedded systems. You’ve learned to wire components, program real-time status updates, and build a practical solution. Download the project files here, use our recommended products, and explore our Arduino tutorials for more ideas. Share your parking system creations in the comments and inspire the maker community! 🚗
0 Comments