Professional Documents
Culture Documents
1. Introduction :
The objective of this report is to propose a smart self control system for automated car
parking which will help the user in the process of car parking and will safeguard the user’s
automobile from any mishap or bumping in any other object such as wall or any other things
which could cause any damage to the vehicle.
2. Requirements :
For the proposed system of automated car parking assistance system we will need
following hardware:
❏ Jumper wire:- Jumper cables is a smaller and more bendable corrugated cable which is
used to connect antennas and other components to network cabling.
❏ Power supply cable:- A cable used for connecting the arduino borad to power source.
In addition to the above hardware requirements we will also need Arduino IDE for the coding.
3. Connections details :-
Connect the Red LED to pin D2, Yellow LED to D3 and the Green LED to D4 of the
Arduino by putting in a 220ohm resistor between the Arduino board and the LEDs. Now lets
connect the Buzzer to analogue pin A0. Next, connect the Trig pin of the Ultrasonic Sensor to D5
and the Echo pin to D6 of the Arduino. Once all the modules are connected to the Arduino board,
its time for us to connect all the positive and negative pins . Ground all the negative terminals.
4. Working Principle:- The system has three condition to work with which are as follows
A. Waiting for the car, In this condition the device keeps looking for a moving object
within the sensors proximity. If an object enters the proximity then one of the three LEDs turns
on based on how far the moving object is. If the object is way too close, then a noise is made to
make the moving object aware of the distance.
B. No car in the garage If there is no object in the proximity then turn off all the
LEDs.
C. The car has stopped moving (Parked in the right spot) If the object has stopped
moving and is still in the proximity wait for a few seconds and then turn off the LEDs.
int trigPin = 5;
int echoPin = 6;
int redLED = 2;
int yellowLED = 3;
int greenLED = 4;
long TempDistance = 0;
int counter = 0; // Counter value to check if the object has stopped moving
void setup() {
Serial.begin(9600);
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(redLED, OUTPUT);
pinMode(greenLED, OUTPUT);
pinMode(yellowLED, OUTPUT);
pinMode(buzzer, OUTPUT);
void loop() {
digitalWrite(trigPin, LOW);
delay(200);
digitalWrite(trigPin, HIGH);
delay(500);
digitalWrite(trigPin, LOW);
{turnThemAllOff();}
digitalWrite(greenLED, HIGH);
digitalWrite(yellowLED, LOW);
digitalWrite(redLED, LOW);
noTone(buzzer);
digitalWrite(yellowLED, HIGH);
digitalWrite(redLED, LOW);
digitalWrite(greenLED,LOW);
noTone(buzzer);
digitalWrite(redLED, HIGH);
digitalWrite(greenLED,LOW);
digitalWrite(yellowLED, LOW);
noTone(buzzer);
if (Distance < 8) {
tone(buzzer, 500);
turnThemAllOff();
else
{counter++;}
else{counter = 0;}
TempDistance = Distance;
Serial.print(Distance);
Serial.println(" inches");
Serial.print("Counter : ");
Serial.println(counter); delay(500);
void turnThemAllOff(){
digitalWrite(redLED, LOW);
digitalWrite(greenLED,LOW);
digitalWrite(yellowLED, LOW);
noTone(buzzer);