Back to Advanced Projects

🅿️ RFID Smart Car Parking System

Automate vehicle entry and capacity logging using RFID authorization and IR sensors.

📋 Overview

Urban parking solutions are increasingly dependent on automation. This project designs a smart parking entry barrier with RFID authentication, exit tracking, and a dynamic space indicator.

What you'll learn: Integrating SPI-based RC522 RFID readers, driving servo motors as physical barriers, IR obstacle sensor thresholds, and multi-state LCD displays.

Estimated time: 2-3 hours. Difficulty: ⭐⭐⭐ Intermediate.

🧩 Components Needed

ComponentSpecificationQtyNotes
Arduino Uno R35V Logic1Core controller
RC522 RFID ModuleSPI Interface, 3.3V1Authenticates cardholders
IR Obstacle SensorsDigital output2Detects entry & exit
SG90 Servo Motor5V Standard1Lifts the barrier gate
16x2 LCDI2C Interface (PCF8574)1Displays free spots

📖 Step-by-Step Tutorial

1

SPI RFID Wiring

Connect RC522 to SPI pins: MISO (Pin 12), MOSI (Pin 11), SCK (Pin 13), SDA/SS (Pin 10), and RST (Pin 9). Supply 3.3V.
2

Gate & LCD Integration

Connect the servo signal wire to Arduino Pin 5. Wire the I2C LCD to SDA (A4) and SCL (A5).
3

Mount IR Sensors

Place one IR sensor before the gate (entry detection) and one after the gate (exit detection). Connect outputs to Pins 2 and 3.
4

Implement Slot Counting

Write logic that starts with a set capacity (e.g., 5 spots) and decrements when a vehicle exits, or increments when entering.
5

Verify Authentication

Code authorization cards. Only verified RFID scans should trigger the servo to sweep 90 degrees and open the gate.
💡
Set up software debouncing or basic delays for the IR sensors so that a single car passing doesn't trigger multiple count changes as it rolls through.

💻 Code / Configuration

smart_parking.ino
INO
// Smart Parking System - Volt X
#include <SPI.h>
#include <MFRC522.h>
#include <Servo.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

#define SS_PIN 10
#define RST_PIN 9
MFRC522 rfid(SS_PIN, RST_PIN);
Servo gateServo;
LiquidCrystal_I2C lcd(0x27, 16, 2);

int freeSlots = 5;
const int entrySensor = 2;
const int exitSensor = 3;

void setup() {
  Serial.begin(9600);
  SPI.begin();
  rfid.PCD_Init();
  gateServo.attach(5);
  gateServo.write(0); // Gate closed
  
  pinMode(entrySensor, INPUT);

Reviews & Ratings

0 reviews
5★
0
4★
0
3★
0
2★
0
1★
0
...

Loading reviews...