How to Make Automatic Parking Gate!

by jass23 in Circuits > Arduino

28 Views, 0 Favorites, 0 Comments

How to Make Automatic Parking Gate!

IMG_3158.jpg

Parking management is an important problem in modern cities due to limited space and increasing numbers of vehicles. This project is a miniature automated parking system designed to simulate a real-world smart parking solution.

My name is Jassahib Singh I am a Student in grade 12 and my project uses an Arduino microcontroller, ultrasonic sensing, a servo-controlled barrier gate, an LCD display, and a push-button exit system. It automatically detects vehicles entering the parking lot, controls access, tracks available spaces, and updates the user through a display.

This project demonstrates mechanical systems, electronics, programming logic, and automation principles.

Supplies

New Project (3).jpg

Electronics:

  1. Arduino Uno
  2. HC-SR04 Ultrasonic Sensor
  3. SG90 Servo Motor
  4. 16x2 I2C LCD Display
  5. Push Button
  6. Breadboard
  7. Jumper Wires
  8. USB Cable

Software:

  1. Arduino IDE

Connections!

IMG_3158 (1).jpg


Ultrasonic Sensor (HC-SR04)

  1. TRIG → Pin 4
  2. ECHO → Pin 3
  3. VCC → 5V
  4. GND → GND

Servo Motor

  1. Signal → Pin 9
  2. VCC → 5V
  3. GND → GND

Exit Button

  1. Signal → Pin 10
  2. One side → GND
  3. (Uses Arduino internal pull-up resistor)

LCD Display (I2C)

  1. SDA → A4
  2. SCL → A5
  3. VCC → 5V
  4. GND → GND

Power Connections

  1. Arduino 5V → Breadboard power rail
  2. Arduino GND → Breadboard ground rail


Create the Gate Mechanism

IMG_3268.JPG

A lightweight barrier was attached to the servo arm to simulate a parking gate.

Upload Program

Screenshot 2026-06-18 174106.png

The Arduino code was uploaded through Arduino IDE.


The Code Was Taken From the Website Sunfounder but than was Modified by me to change the Ir Obstacle sensor too a Button. I changed everything into its own Indivual loop rather being all in one loop so it is easier too fix any problems in the code! I also used the skills i learnt about switch case's and etc in grade 12 Computer Science too improve the code

The Source where the inspriation code was taken from: https://docs.sunfounder.com/projects/summary-of-fun-projects/en/latest/arduino/parking_lot4.0.html

Functions and Testing

My Circuit was tested under different conditions.

Test 1: Vehicle Entry

Input:

Object placed near ultrasonic sensor.

Result:

  1. Gate opened
  2. Parking spaces decreased
  3. LCD updated

Successful ✅

Test 2: Vehicle Exit

Input:

Exit button pressed.

Result:

  1. Gate opened
  2. Parking spaces increased

Successful ✅

Test 3: Full Parking Lot

Input:

Attempted entry when spaces = 0.

Result:

Gate remained closed.

Successful ✅


After these tests i was able to Showcase My teacher my project

Conclusion

The automated parking system successfully demonstrates how engineering principles can be applied to solve real-world problems. The combination of sensors, programming, and mechanical control created a functional smart parking prototype.

This project improved understanding of automation, and the engineering design process.