Final-year projects / Smart city

Number plate recognition gate for campus vehicles

Security guards at college gates write vehicle numbers in a register by hand. A camera that reads Indian number plates, opens the barrier for registered vehicles and logs visitors saves time and keeps a searchable record.

Raspberry Pi 5Major projectCSE, ECE
Pi 5IRCAMERA71°Featured
Parts
₹10,900
Build
14 weeks
Board
Raspberry Pi 5
Objectives
4

Block diagram

Inputs
  • IR
    IR vehicle sensorWakes the camera when a vehicle arrives
  • CAMERA
    Camera Module 3Photographs the plate
Controller
  • Pi 5
    Raspberry Pi 5Finds the plate and reads it
Outputs
  • 71°
    Servo barrierOpens for registered vehicles
  • 23.4°CGATE
    Gate displayShows the number read

Objectives

  1. To locate the plate in an image with a trained detector.
  2. To read Indian plate characters with OCR and validate the format (for example TN 09 AB 1234).
  3. To open the barrier for registered vehicles and log every vehicle with a photo.
  4. To measure plate read accuracy on 100 photos in day and night light.

Parts and specifications

Total about ₹10,900 at typical online prices. Tap a part for its pinout and datasheet notes.

Design calculations

Plate pixels

A 50 cm plate at 3 m with a 66° lens at 1920 px width (frame ≈ 3.9 m) is about 250 px wide, so characters are about 20 px tall: enough for OCR.

Shutter speed

At 10 km/h (2.8 m/s) a 1/1000 s exposure moves the plate 2.8 mm, sharp enough. Use a short exposure with extra light at night.

Plate format check

Regex: ^[A-Z]{2}[0-9]{1,2}[A-Z]{0,3}[0-9]{4}$ catches most OCR errors (for example O read as 0).

Pin map

SignalPin or connection
CameraCSI connector
IR vehicle sensorGPIO 23
Servo signalGPIO 18 (hardware PWM), servo on 6 V buck
LCD SDA / SCLGPIO 2 / 3

Firmware outline

  1. Wait for the IR sensor; take a burst of 3 photos.
  2. Run a YOLO plate detector (trained on Indian plates) and crop the best box.
  3. Clean the crop: grayscale, resize, threshold; run OCR (EasyOCR or Tesseract).
  4. Fix common confusions by position (letters vs digits) and check the regex.
  5. If the number is in the registered list, open the barrier; log number, time and photo to SQLite.

Test plan

TestExpected result
100 printed plates, day lightRead accuracy
Same at night with lampRead accuracy
Unregistered numberBarrier stays closed, visitor logged
Two-wheeler plates (two lines)Read and combined

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.

1. Why detect first, then read?
2. What is YOLO?
3. Why are Indian plates hard?
4. How do you handle night?
5. What data do you keep?

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

  • Raspberry Pi Camera Module 3 datasheet
  • Central Motor Vehicles Rules 1989, rule 50 (plate format)
  • Ultralytics YOLO documentation

About this project

How much does the number plate recognition gate for campus vehicles project cost?

About ₹10,900 for the parts in the base list: Raspberry Pi 5 (4 GB), Raspberry Pi Camera Module 3, Raspberry Pi 5 27 W USB-C supply, 32 GB microSD card, IR obstacle sensor module, MG996R metal gear servo, 16×2 LCD with I²C backpack, LM2596 buck (servo 6 V), Model gate and printed plates.

How long does it take?

About 14 weeks for the base project, built on a Raspberry Pi 5. Each upgrade adds time.

Which branches is it suitable for?

Computer Science / IT (IoT, AI), Electronics and Communication, as a major project.

Which pins and design calculations does it use?

Camera on CSI connector; IR vehicle sensor on GPIO 23; Servo signal on GPIO 18 (hardware PWM), servo on 6 V buck. Worked calculations on this page: plate pixels, shutter speed, plate format check.

How do I test it?

100 printed plates, day light: Read accuracy. Same at night with lamp: Read accuracy. Unregistered number: Barrier stays closed, visitor logged. Two-wheeler plates (two lines): Read and combined.

What are the objectives?

To locate the plate in an image with a trained detector. To read Indian plate characters with OCR and validate the format (for example TN 09 AB 1234). To open the barrier for registered vehicles and log every vehicle with a photo. To measure plate read accuracy on 100 photos in day and night light.