DIY Arduino Smart Parking Garage With Elevator
by ArtusIndus in Circuits > Arduino
48 Views, 0 Favorites, 0 Comments
DIY Arduino Smart Parking Garage With Elevator
In this project, I built a fully functional Arduino-based parking garage system with multiple features found in real-world parking structures.
The system automatically detects incoming and outgoing vehicles, controls a barrier gate using a servo motor, and keeps track of available parking spaces in real time. A 4-digit display shows the number of free spots and indicates when the parking garage is full.
Additionally, the project includes a working elevator system powered by a stepper motor, allowing cars to move between two levels.
This project is a great combination of electronics, programming, and mechanical design. It is perfect for learning about sensors, motor control, and automation with Arduino.
Whether you're a beginner looking for a challenging build or an experienced maker searching for inspiration, this smart parking garage is a fun and educational project.
For the complete code and future updates, check out my GitHub repository:
Supplies
Here are all the components required to build this project:
Electronics:
- 1× Arduino board (e.g., Arduino Uno)
- 1× Servo motor (e.g., SG90)
- 1× Stepper motor (28BYJ-48) with ULN2003 driver
- 1× TM1637 4-digit display
- 3× Light-dependent resistors (LDR)
- 3× Resistors (for voltage divider, e.g., 10kΩ)
- 2× Push buttons
- Jumper wires
- Breadboard
- External power supply (recommended for motors)
Mechanical Parts:
- Cardboard or foam board (for structure)
- Glue or hot glue gun
- Tape
- Small sticks or plastic pieces (for barrier arm)
- String or guiding mechanism for elevator
Tools:
- Cutter or scissors
- Ruler
- Pencil
- Hot glue gun (recommended)
Optional:
- Toy cars (for testing)
- Paint or markers (for decoration)
Building the Base Structure
Start by building the base of the parking garage using cardboard or foam board.
Cut out a large rectangular base plate and create a ramp leading to the main parking level. Make sure the ramp angle is smooth enough for small model cars to drive up.
Add side walls to guide the cars and prevent them from falling off. You can also draw arrows or lane markings to make it look more realistic.
At the entrance, leave space for the barrier system and sensors.
Installing the Barrier System
Mount the servo motor at the entrance of the parking garage.
Attach a small arm (made from cardboard or plastic) to the servo horn to act as the barrier. The barrier should be able to rotate between a closed (horizontal) and open (vertical or angled) position.
Secure the servo firmly so it does not move when operating. Test the movement using a simple Arduino servo test sketch before continuing.
Placing the Sensors
Install three light-dependent resistors (LDRs) to detect vehicles:
- Sensor 1 (A1): Detects a car approaching the entrance
- Sensor 2 (A2): Confirms the car has passed the barrier
- Sensor 3 (A3): Detects cars leaving the parking garage
Position the sensors so that a car passing over them clearly changes the light level (e.g., by casting a shadow).
Use resistors to create voltage dividers and connect each sensor to an analog input on the Arduino.
Tip: Avoid placing sensors in direct sunlight, as this may affect accuracy.
Building the Elevator Mechanism
Construct a simple elevator platform using cardboard.
Mount the stepper motor (28BYJ-48) vertically and connect it to a mechanism that can raise and lower the platform (for example, using a spool and string or a sliding guide system).
Ensure the platform moves smoothly between two levels. Add simple guide rails if necessary.
Install a limit switch at the bottom position to act as the "home" position for the elevator.
Adding Control Switch
Install a switch buttons to control the elevator:
- Position 1: Move elevator to ground floor
- Position 2: Move elevator to upper floor
Connect the switch to digital pins and use the internal pull-up resistors of the Arduino.
Mount the switch in an accessible position on the model.
Wiring Everything
Connect all components according to the following configuration:
- Servo motor → Pin D3
- Stepper motor → Pins D8, D9, D10, D11
- TM1637 Display → CLK (D13), DIO (D12)
- Elevator home switch → D5
- Position 1 → D6
- Position 2 → D7
- LDR Sensors → A1, A2, A3
Make sure all components share a common ground.
It is recommended to use an external power supply for the motors to ensure stable operation.
Installing the Display
Mount the TM1637 4-digit display at the front of the parking garage.
This display will show the number of available parking spaces in real time.
Make sure it is clearly visible and securely attached.
Uploading the Code
Open the Arduino IDE and install the required libraries:
- TM1637
- Servo (built-in)
- Stepper (built-in)
Copy and upload the provided code to your Arduino board.
After uploading, the system will automatically calibrate the sensors and initialize all components.
Downloads
Testing the System
Test the full system step by step:
- Move a car over the first sensor → the barrier should open
- Pass the second sensor → the barrier should close
- Check if the display decreases the number of free spaces
- Trigger the exit sensor → the number should increase
- Test the elevator using the buttons
If something does not work correctly, check wiring and sensor calibration values.
Final Adjustments
Adjust sensor thresholds in the code to match your lighting conditions.
Improve the structure by reinforcing weak parts or aligning moving components.
Optionally, decorate the parking garage with paint, markings, or miniature cars to make it more realistic.