Arduino Smart Parking

Recommended
Why Buy?
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!
Mega Power
Why Buy?
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.
Sensor Kit
Why Buy?
Explore 37 different sensors and modules—ideal for learning coding, IoT, robotics, and all levels of Arduino experimentation. Includes tutorials and code samples.
Must-Have
Why Buy?
Quality jumper wires for all breadboard and prototyping needs. Durable, flexible, and color-coded—essential for every electronics toolkit.
USB to Serial
Why Buy?
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.
Smart Parking Management System Using Arduino and 74HC165 Shift Register
As urban areas grow and parking spaces become increasingly limited, efficient parking management systems have become essential. This project demonstrates a Smart Parking Management System that monitors the status of 8 parking spots, controls entry and exit gates using servo motors, and provides real-time feedback via an LCD and LEDs. By leveraging a 74HC165 shift register, the system efficiently manages multiple parking spots while minimizing the number of Arduino pins required.

Project Overview

Global schematic


The Smart Parking Management System integrates the following features:

  1. Parking Spot Monitoring:

    • Monitors up to 8 parking spots using sensors.
    • Displays parking statuses (X for occupied, Y for free) on a 16x2 LCD screen.
  2. Gate Control:

    • Opens the entry gate when a car is detected at the entry sensor and a parking spot is available.
    • Opens the exit gate when a car is detected at the exit sensor.
  3. LED Feedback:

    • A green LED lights up when the entry gate opens.
    • A red LED lights up when the parking lot is full, indicating no entry is allowed.
  4. Shift Register Integration:

    • The 74HC165 shift register efficiently reads the states of the 8 parking spots using just 3 Arduino pins.

System Workflow

  1. Parking Spot Monitoring:

    • Each parking spot is equipped with a sensor connected to the shift register.
    • The shift register converts the parallel sensor inputs into serialized data, which is sent to the Arduino.
    • The Arduino processes this data to determine which spots are occupied or free.
  2. Entry Control:

    • When a car is detected at the entry IR sensor:
      • If a spot is available, the green LED turns on, and the entry gate opens.
      • If all spots are full, the red LED lights up, and the gate remains closed.
  3. Exit Control:

    • When a car is detected at the exit IR sensor, the exit gate opens to allow the car to leave.
  4. Real-Time Feedback:

    • The 16x2 LCD displays:
      • Row 1: Labels for the 8 parking spots (1|2|3|4|5|6|7|8).
      • Row 2: Current statuses of the spots (X|Y|X|Y|...).
    • LEDs provide additional visual feedback for gate operations.

Hardware Requirements

ComponentQuantityDescription
Arduino Uno1Main microcontroller board
16x2 LCD Display1Displays parking status
74HC165 Shift Register1Reads parking spot statuses
IR Sensors2Detects car entry and exit
Servo Motors2Controls entry and exit gates
Green LED1Indicates gate is opening
Red LED1Indicates parking is full
Parking Spot Sensors8Monitors occupancy of each parking spot
Resistors8Pull-down resistors for parking sensors
Jumper WiresAs neededFor connecting components
Breadboard1For prototyping and connections

Hardware Connections

Shift Register (74HC165)
  • SH/LD (Shift/Load): Connect to Arduino pin A1.
  • CLK (Clock): Connect to Arduino pin 3.
  • SO (Serial Output): Connect to Arduino pin 2.
  • D0-D7 (Parallel Inputs): Connect to sensors monitoring the parking spots.
  • VCC: Connect to Arduino 5V.
  • GND: Connect to Arduino GND.
IR Sensors
  • Entry IR Sensor:
    • VCC: Connect to Arduino 5V.
    • GND: Connect to Arduino GND.
    • OUT: Connect to Arduino pin 4.
  • Exit IR Sensor:
    • VCC: Connect to Arduino 5V.
    • GND: Connect to Arduino GND.
    • OUT: Connect to Arduino pin 5.
Servo Motors
  • Entry Gate Servo:
    • Signal: Connect to Arduino pin A2.
    • VCC: Connect to Arduino 5V.
    • GND: Connect to Arduino GND.
  • Exit Gate Servo:
    • Signal: Connect to Arduino pin A3.
    • VCC: Connect to Arduino 5V.
    • GND: Connect to Arduino GND.
LEDs
  • Green LED:
    • Anode: Connect to Arduino pin 7 (with a 220Ω resistor).
    • Cathode: Connect to GND.
  • Red LED:
    • Anode: Connect to Arduino pin 6 (with a 220Ω resistor).
    • Cathode: Connect to GND.
16x2 LCD
  • RS: Connect to Arduino pin 13.
  • E: Connect to Arduino pin 12.
  • D4-D7: Connect to Arduino pins 11, 10, 9, 8.
  • VSS: Connect to GND.
  • VDD: Connect to 5V.
  • VO: Connect to the middle pin of a potentiometer (contrast control).

Software Functionality

Code:


  1. Initialization (setup):

    • Configures the pins for the LCD, servos, shift register, IR sensors, and LEDs.
    • Initializes the LCD to display parking information.
  2. Parking Spot Monitoring:

    • The readShiftRegister function reads the state of 8 parking spot sensors via the shift register.
    • The statuses are stored in the spots[] array.
  3. Entry Gate Control:

    • If a car is detected at the entry IR sensor:
      • If there’s a free spot:
        • The green LED turns on.
        • The entry gate servo opens for 500ms and then closes.
      • If all spots are full:
        • The red LED turns on briefly to indicate the parking is full.
  4. Exit Gate Control:

    • If a car is detected at the exit IR sensor, the exit gate servo opens for 500ms and then closes.
  5. Real-Time Display:

    • The LCD displays:
      • Row 1: Labels for all 8 parking spots.
      • Row 2: Current status of each spot (X for occupied, Y for free).

Expected Output
example of passing car and parking

LCD Example Output:

  • When parking has free spots:

    1|2|3|4|5|6|7|8| Y|X|Y|X|Y|Y|Y|X|
  • When parking is full:

    1|2|3|4|5|6|7|8| X|X|X|X|X|X|X|X|

LED Behavior:

  • Green LED: Lights up when the entry gate opens.
  • Red LED: Lights up when parking is full.

Applications

  1. Parking Facilities:
    • Ideal for managing entry and exit in parking lots.
  2. Smart City Projects:
    • Can be integrated into IoT systems for remote parking management.
  3. Scalable Parking Solutions:
    • Supports expansion by daisy-chaining additional shift registers for more spots.
Recommended
Why Buy?
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!
Mega Power
Why Buy?
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.
Sensor Kit
Why Buy?
Explore 37 different sensors and modules—ideal for learning coding, IoT, robotics, and all levels of Arduino experimentation. Includes tutorials and code samples.
Must-Have
Why Buy?
Quality jumper wires for all breadboard and prototyping needs. Durable, flexible, and color-coded—essential for every electronics toolkit.
USB to Serial
Why Buy?
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.

Post a Comment

0 Comments