list of products from Amazon (Not mine, i just link them!) Scroll Down For Article! Note: Elegoo boards are not Arduino, but they are compatible with Arduino IDE and are mutch more affordable!
Project Description: Smart Parking Management System
This project implements a smart parking system capable of monitoring parking spots, controlling entry and exit gates using servo motors, and providing visual feedback using LEDs and an LCD. The system leverages the 74HC165 shift register to efficiently monitor the status of 4 parking spots while using minimal Arduino pins.
Key Features
Real-Time Parking Monitoring:
- Monitors up to 4 parking spots using sensors connected to a 74HC165 shift register.
- Displays the status of parking spots on a 16x2 LCD:
X
: Spot is occupied.Y
: Spot is free.
Entry and Exit Control:
- Entry IR Sensor: Detects incoming cars and opens the entry gate if a spot is free.
- Exit IR Sensor: Detects outgoing cars and opens the exit gate.
LED Feedback:
- Green LED: Lights up when the gate opens for an incoming car.
- Red LED: Lights up if the parking lot is full and the entry gate cannot open.
Servo Motor Control:
- Entry Gate Servo: Opens and closes the entry gate.
- Exit Gate Servo: Opens and closes the exit gate.
Efficient Resource Usage:
- Uses a 74HC165 shift register to minimize the number of pins required to monitor parking spots.
Schematic
System Workflow
Parking Spot Monitoring:
- Sensors connected to the shift register detect whether a spot is occupied.
- The status of all spots is displayed on the 16x2 LCD.
Entry Detection:
- When a car is detected at the entry IR sensor:
- If there’s at least one free spot:
- The green LED turns on.
- The entry gate servo opens for 500 ms, allowing the car to enter.
- If all spots are full:
- The red LED turns on for 500 ms, and the gate remains closed.
- If there’s at least one free spot:
- When a car is detected at the entry IR sensor:
Exit Detection:
- When a car is detected at the exit IR sensor, the exit gate servo opens for 500 ms to allow the car to exit.
Real-Time Display:
- The LCD continuously displays the status of all parking spots.
Hardware connections
Software Explanation
Initialization:
- Initializes the LCD, servos, and shift register.
- Configures the IR sensors and LEDs as inputs/outputs.
Parking Spot Monitoring:
- Reads the statuses of parking spots from the 74HC165 shift register.
- Updates the
spots[]
array and calculates the number of free spots.
Entry Control:
- If the entry IR sensor detects a car:
- The entry gate opens if there are free spots.
- If all spots are full, the red LED turns on to signal a full parking lot.
- If the entry IR sensor detects a car:
Exit Control:
- If the exit IR sensor detects a car, the exit gate opens to allow the car to leave.
LCD Update:
- Continuously displays the statuses of all parking spots on the LCD.
Shift Register Reading:
- Reads data from the 74HC165 using clock pulses to determine the occupancy of parking spots.
Full Code
Applications
- Smart Parking Lots:
- Ideal for managing entry and exit gates in a parking facility.
- IoT Integration:
- Can be expanded to send real-time parking data to an online platform.
- Scalable Parking Solutions:
- Easily expandable to handle more parking spots using additional 74HC165 shift registers.
list of products from Amazon (Not mine, i just link them!)
Please NOTE that ELEGOO is not Arduino but it is compatible with Arduino IDE, and mutch cheaper!
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
0 Comments