Arduino Automated Car Parking System.

Introduction: Arduino Automated Car Parking System.

About: A Computer Science and Engineering student and a Hobbyist. love to make robots,electric devices,diy things and Programming them by Myself. My youtube channel https://www.youtube.com/fussebatti Follow me on gi…

An Arduino Automated Car Parking System that is too easy and too fun to make. When a car arrives it shows the number of empty slots (if available) and then opens the gate. if there is not any empty slot then the gate does not open. Amazing thing is that the whole project can just be POWERED using a POWER BANK!!

Watch the video for the full tutorial.

Note: you can use display instead of my hand made led sign display.

Now lets get started.

Step 1: Parts

  • Arduino - any board
  • Infrared proximmity sensor (pic 2 & 3 - both are functional)
  • 330r resistor
  • some LED's
  • Servo motor - any model or size you wish.

Buy electronic components at utsource.net

Step 2: Making the LED Display

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.

Step 3: Making the Parking Garage

To make this I have used a card board box then cut it to make a nice slope. Then added a piece of cardboard on to the servo motor and hot glued it. Added one sensor on the entrance and another on each SLOT. Then hot glued two chopsticks with the display we have made and glue it to the box. And of course as we will use the usb cable of arduino to power the whole project cut some area of the box to access to that port.

Don't forget to paint it a little bit.

Step 4: The Circuit

It looks a bit mess for the LED's but tell you what, this is really very much simple circuit.

NOTE: Proximity sensors use 5v to operate so you can just connect them to 5v source of arduino.

But what theee!! whay has he connected servo to VIN!! Let me explain you. Power banks usually supplies 5v 1Amp current which is input to arduino via the usb cable, now there is a voltage regulator on arduino which gives .5Amp to the board. By connecting to VIN we are actually accessing the power from the power bank without an breadboard. This works and safe.

Step 5: The Code

Upload the following code to the arduino

download code https://github.com/ashraf-minhaj/Automated-Parking...

or copy from below

/*Automated Parking Garage by Ashraf Minhaj. www.youtube.com/c/fusebatti
* for any query please mail me at ashraf_minhaj@yahoo.com*/

#include //adding Servo library Servo gate; //you may open or close gate using a Servo motor int slot1 = 5; //Connect IR sensor on digital pin5 for sLOT 1 int slot2 = 4; //sLot2 pin on digital 4 int gateSensor = 3; //IR sensor on gate to arduino pin 3 int slot1_l = 13; int slot2_l = 12; int gate_grn = 11; int gate_red = 10;

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);

gate.write(75); //gate will open after the dealy of 1 second

}

if( !(digitalRead(gateSensor)) && !(digitalRead(slot1)) && digitalRead(slot2)) //car on slot1,slot2 free { Serial.println("Welcome, Available: sLOT2"); // slo2 available digitalWrite(slot1_l,LOW); digitalWrite(slot2_l,HIGH); delay(1000); digitalWrite(gate_grn,HIGH); gate.write(75); //gate will open after the dealy of 1 second } if( !(digitalRead(gateSensor)) && digitalRead(slot1) && !(digitalRead(slot2))) //car on slot2,slot1 free { Serial.println("Welcome, Available: sLOT1"); // slo1 available digitalWrite(slot1_l,HIGH); digitalWrite(slot2_l,LOW); delay(1000); digitalWrite(gate_grn,HIGH); gate.write(75); delay(100); //gate will open after the dealy of 1 second }

if( !(digitalRead(gateSensor)) && !(digitalRead(slot1)) && !(digitalRead(slot2))) { Serial.println("Welcome, Parking Full");// No slot available digitalWrite(slot1_l,LOW); digitalWrite(slot2_l,LOW); delay(1000); digitalWrite(gate_red,HIGH); delay(100); digitalWrite(gate_red,LOW); delay(100); digitalWrite(gate_red,HIGH); delay(100); digitalWrite(gate_red,LOW); } 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); } }

Step 6: Finished

Now power the project using a USB cable to arduino and have fun.

Let me know how you are thinking to upgrade this and why.

Thank you.

Creative Misuse Contest

Participated in the
Creative Misuse Contest

Be the First to Share

    Recommendations

    • Cheese Challenge

      Cheese Challenge
    • Halloween Contest

      Halloween Contest
    • Plywood Contest

      Plywood Contest

    24 Comments

    0
    komalmeena327
    komalmeena327

    Question 1 year ago

    Hii
    I want to what sensors and actuators you have used here.
    I hope you reply asap

    0
    miginstruments
    miginstruments

    Answer 11 months ago

    Hi, maybe a little too late but still. He is using IR Sensor Module. You can use any of those that are available online.

    0
    genshacc99
    genshacc99

    Reply 11 months ago

    hi is there anyway for me to know how make a lock diagram for this?

    0
    miginstruments
    miginstruments

    Reply 11 months ago

    Hey, if you mean Block Diagram then you can use Microsoft Visio Software or simple you can use draw.io its a browser based application.

    0
    genshacc99
    genshacc99

    Reply 11 months ago

    im sorry for bothering again. but can i know what's the input and output in this project?
    thank you very much :D

    0
    miginstruments
    miginstruments

    Reply 11 months ago

    Hi. In this project 2-3 IR sensors are used. Two are used to detected weather any vehicle (obstacle) is present in front of the sensor or not. One more is used to operate the Servo motor. If there is an obstacle in front of the third sensor, then the Servo motor rotates which opens the gate. If there is a vehicle in front of the first sensor then they first Green LED becomes Off, else is is On. Also the status is updated over Serial Monitor. If there is a vehicle in front of both the sensors then both of the green Leds becomes Off and the Red LED becomes On. If there are no vehicles in front of both the sensors then both the green Leds are On.

    0
    gaurikardile171
    gaurikardile171

    3 years ago on Step 6

    I have some issues with my mechatronics related project. Need your help. Plz revert back asap.
    Waiting for your reply.

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 2 years ago

    Hi, I guess I'm too late

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 2 years ago

    I guess I'm late...

    0
    rushabh12
    rushabh12

    2 years ago

    how can one ground wire of led can be connected to three different spots??

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 2 years ago

    It's called Common Ground, this is necessary

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 2 years ago

    Ground wires are common in any circuit. No matter how many batteries you use (of same or different voltage and ampH) you still have to common the Ground. Basic Electronics.

    0
    JaR18
    JaR18

    2 years ago

    How to use the display in this project.?

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 3 years ago

    This is not supposed to be showed. Do not copy the code. Pleas download from github.

    0
    abhi-jyo_1205
    abhi-jyo_1205

    Question 3 years ago on Step 5

    Hello sir,
    The code had worked for everything but the servo motor is rotating continuously. Can you please tell us why is it so ?
    0
    Ashraf Minhaj
    Ashraf Minhaj

    Answer 3 years ago

    Moving continuously means? Does it go back and forth over and over again? Then it means there is a POWER issue. Use different power source for the servo motor then.

    0
    abhi-jyo_1205
    abhi-jyo_1205

    Reply 3 years ago

    gate.write(5) -> how gate will close by this code can you please tell us??

    0
    Ashraf Minhaj
    Ashraf Minhaj

    Reply 3 years ago

    write(5) means write the servo to 5 degree, I placed the servo in a way so that it remains closed at 5 degree.