Parking With Arduino
Parking With Arduino
Parking With Arduino
by Ashraf Minhaj
An Arduino Automated Car Parking System that is Watch the video for the full tutorial.
too easy and too fun to make. When a car arrives it
shows the number of empty slots (if available) and Note: you can use display instead of my hand made
then opens the gate. if there is not any empty slot led sign display.
then the gate does not open. Amazing thing is that
the whole project can just be POWERED using a Now lets get started.
POWER BANK!!
https://www.youtube.com/watch?v=PvrpTBga60s&t=16s
Step 1: Parts
To make this LED display I have used a piece of bredboard then soldered the LED's and the 330r resistor. Then
just added a ribbon cable for nice finish.
NOTE: I soldered the resistors on back so that they cant be seen from front to make the display .
It would be better if you use LCD display or cheap OLED display instead of this. I had not any,so I made this.
To make this I have used a card board box then cut it course as we will use the usb cable of arduino to
to make a nice slope. Then added a piece of power the whole project cut some area of the box to
cardboard on to the servo motor and hot glued it. access to that port.
Added one sensor on the entrance and another on
each SLOT. Then hot glued two chopsticks with the Don't forget to paint it a little bit.
display we have made and glue it to the box. And of
It looks a bit mess for the LED's but tell you what, this supplies 5v 1Amp current which is input to arduino
is really very much simple circuit. via the usb cable, now there is a voltage regulator on
arduino which gives .5Amp to the board. By
NOTE: Proximity sensors use 5v to operate so you connecting to VIN we are actually accessing the
can just connect them to 5v source of arduino. power from the power bank without an breadboard.
This works and safe.
But what theee!! whay has he connected servo to
VIN!! Let me explain you. Power banks usually
void setup()
{
gate.attach(7); //connecting the gate servo on pin 5
pinMode(slot1,INPUT); //setting slot pins & gate IR sensor as input to arduino
pinMode(slot2,INPUT);
pinMode(gateSensor,INPUT);
pinMode(slot1_l,OUTPUT);
pinMode(slot2_l,OUTPUT);
pinMode(gate_grn,OUTPUT);
pinMode(gate_red,OUTPUT);
Serial.begin(9600); //initialzing Serial monitor
void loop()
{
//the car arrives and sensor goes LOW
if( !(digitalRead(gateSensor)) && digitalRead(slot1) && digitalRead(slot2)) //slot1 & slot2 empty
{
Serial.println("Welcome, Available: sLOT1, sLOT2"); //print slot1 and slo2 available
digitalWrite(slot1_l,HIGH);
digitalWrite(slot2_l,HIGH);
delay(1000);
digitalWrite(gate_grn,HIGH);
if( digitalRead(gateSensor))
{ Serial.println("Welcome"); // slo2 available
gate.write(5); //gate close
digitalWrite(slot1_l,LOW);
digitalWrite(slot2_l,LOW);
digitalWrite(gate_red,LOW);
digitalWrite(gate_grn,HIGH);
delay(100);
digitalWrite(gate_grn,LOW);
delay(100);
Thank you.
//www.youtube.com/embed/PvrpTBga60s