. AI Smart Parking System with Number Plate Recognition ~ SmartElectronicsDIY

AI Smart Parking System with Number Plate Recognition

 

PROJECT TITLE

AI-Based Smart Parking System with Automatic Number Plate Recognition Using Arduino and OpenCV




2️⃣ ABSTRACT

The rapid growth of vehicles has created serious parking management problems in urban areas. This project proposes an AI-based Smart Parking System that automatically detects vehicle number plates, manages parking slots, and controls entry/exit gates. The system uses OpenCV and OCR for number plate recognition and Arduino with sensors for slot detection and gate automation. Parking data is stored on a cloud server for real-time monitoring. This system reduces human effort, prevents unauthorized parking, and supports smart city infrastructure.


3️⃣ OBJECTIVES

  • To automatically recognize vehicle number plates

  • To detect parking slot availability

  • To control parking gate automatically

  • To store entry and exit data in the cloud

  • To reduce traffic congestion and manual work


4️⃣ HARDWARE REQUIREMENTS

ComponentQuantity
Arduino UNO / ESP321
ESP32-CAM / USB Camera1
IR Sensors4
Servo Motor (Gate)1
16×2 LCD1
Buzzer1
Breadboard & Jumper WiresAs required
Power Supply (5V)1

5️⃣ SOFTWARE REQUIREMENTS

  • Arduino IDE

  • Python 3

  • OpenCV

  • Tesseract OCR

  • Firebase / ThingSpeak (optional)


6️⃣ SYSTEM BLOCK DIAGRAM (TEXT)

Vehicle ↓ Camera → OpenCV + OCR (AI) ↓ Recognized Number Plate ↓ Arduino Controller ↓ IR Sensors → Slot Status ↓ Servo Motor (Gate) ↓ LCD Display + Cloud Server

7️⃣ CIRCUIT CONNECTIONS

IR Sensors

  • IR1 → Arduino D2

  • IR2 → Arduino D3

  • IR3 → Arduino D4

  • IR4 → Arduino D5

Servo Motor

  • Signal → D9

  • VCC → 5V

  • GND → GND

LCD (16×2)

  • RS → D7

  • EN → D8

  • D4–D7 → D10–D13

Buzzer

  • Positive → D6

  • Negative → GND


8️⃣ WORKING PRINCIPLE

  1. Vehicle arrives at parking gate

  2. Camera captures vehicle image

  3. AI processes image using OpenCV

  4. OCR extracts number plate text

  5. Arduino checks parking slot availability

  6. If slot available → gate opens

  7. If full → buzzer alert + LCD message

  8. Entry data stored in cloud


9️⃣ AI NUMBER PLATE RECOGNITION STEPS

  • Image capture

  • Grayscale conversion

  • Noise removal

  • Edge detection

  • Contour detection

  • Character segmentation

  • OCR text extraction


🔟 ARDUINO CODE (GATE + SLOT CONTROL)

#include <Servo.h> #include <LiquidCrystal.h> Servo gate; LiquidCrystal lcd(7,8,10,11,12,13); int ir1 = 2; int ir2 = 3; int ir3 = 4; int ir4 = 5; int buzzer = 6; void setup() { gate.attach(9); lcd.begin(16,2); pinMode(ir1, INPUT); pinMode(ir2, INPUT); pinMode(ir3, INPUT); pinMode(ir4, INPUT); pinMode(buzzer, OUTPUT); gate.write(0); lcd.print("Smart Parking"); } void loop() { int slots = digitalRead(ir1)+digitalRead(ir2)+ digitalRead(ir3)+digitalRead(ir4); lcd.setCursor(0,1); lcd.print("Free Slots:"); lcd.print(slots); if(slots > 0) { gate.write(90); digitalWrite(buzzer, LOW); } else { gate.write(0); digitalWrite(buzzer, HIGH); lcd.clear(); lcd.print("Parking Full"); delay(2000); } }

🔟 PYTHON AI CODE (NUMBER PLATE RECOGNITION)

import cv2 import pytesseract pytesseract.pytesseract.tesseract_cmd = r'C:\Program Files\Tesseract-OCR\tesseract.exe' img = cv2.imread("car.jpg") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) plate_text = pytesseract.image_to_string(gray, config='--psm 8') print("Vehicle Number:", plate_text) cv2.imshow("Image", gray) cv2.waitKey(0)

11️⃣ FLOWCHART (TEXT)

Start

Vehicle Detected

Capture Image

Recognize Number Plate

Check Slot Availability

Slot Available?
→ Yes → Open Gate
→ No → Display FULL

Store Data

Stop


12️⃣ ADVANTAGES

  • Fully automatic system

  • Reduces manpower

  • Accurate parking management

  • Smart city compatible

  • Scalable and secure


13️⃣ APPLICATIONS

  • Shopping malls

  • Airports

  • Hospitals

  • Offices

  • Smart cities


14️⃣ FUTURE SCOPE

  • Mobile app integration

  • Payment gateway

  • Face recognition

  • EV charging slot detection

  • Cloud analytics


15️⃣ CONCLUSION

The AI Smart Parking System efficiently manages parking spaces using artificial intelligence and IoT technology. The system reduces traffic congestion, improves security, and provides a smart solution for modern parking problems.

0 comments:

Post a Comment