Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Verannie Q. Alcantara
I. INTRODUCTION
One of the parking etiquettes is to park straight in a parking
space. When parking, the driver must always leave enough
space on each side of the parking space to be able to open the
doors without hitting the cars beside it. Taking up a greater
space on one side will crowd the drive who will park next to it
which may inevitable lead to paint scratches. It will also be
hard for the driver parking next to it if the car is not parked in
the middle. Moreover, it must be ensured that the car is pulled
into the space far enough so the rear of the car is in line with
other cars in order to give a wide driving lane in the parking lot
and to avoid having the rear of your car bumped by another car.
It is essential to observe proper etiquettes in parking and to be
considerate to other drivers.
There are people who aren't good with driving especially
beginners. Others are just too lazy to park properly. Selfparking cars have been a trend in the automobile world. Some
self-parking have a parking assist system. Some are being
developed to have a full control system from finding a suitable
space to steering the wheel and parking the car properly. A selfparking system can park the car properly even in the narrowest
space possible.
The main goal of this project is to design a prototype which
will help the car park properly in a forward manner through the
III. METHODOLOGY
A. Materials
The materials used in this activity were three US-100 sonar
sensors, an Arduino uno, a breadboard, wires and a mobot.
Pin No.
1
2
ID
VCC
Trigger
3
4
5
Echo
GND
GND
Description
5V Power input
Trigger input
active HIGH
Pulse output
Ground
Ground
Self-Parking Systems
In 2004, Toyota Motor Corporation developed the first
automatic parking system, known as the Intelligent Parking
Assist (IPA) system. Cars with this system have a sonar
warning system that consists of ultrasonic wave sensors built
into the corners of a cars bumper to detect the distance of
surrounding objects. The system also utilizes two additional
sensors on the front side fenders. These sensors provide enough
information for a computer to calculate optimal parking angles.
The IPA system uses computer processors that are tied to the
cars built-in sensors and integrated with a rear-facing camera
to provide even more parking information for the driver.
Automobile manufacturers such as Toyota, Lexus, Volvo,
and Ford offer some car models that include self-parking
systems. Currently, self-parking cars are not completely
autonomous. The driver still controls the speed of the cars
brake pedal when necessary. [6]
B. Procedure
The researchers inputted the code given below in the IDE.
//1 = front
//2 = right
//3 = left
const int trigger1 = 6;
const int echo1 = 7;
const int trigger2 = 4;
const int echo2 = 5;
const int trigger3 = 2;
const int echo3 = 3;
int front;
int right;
int left;
int i;
int run1 = 9; // 0 to 255, 255 = max, 0 = stop
int run2 = 10;
int dir1 = 8;
int dir2 = 11;
void setup() {
Serial.begin(9600);
pinMode(trigger1, OUTPUT);
pinMode(echo1, INPUT);
pinMode(trigger2, OUTPUT);
pinMode(echo2, INPUT);
pinMode(trigger3, OUTPUT);
pinMode(echo3, INPUT);
for (i = 8; i <= 11; i = i + 1) {
pinMode(i, OUTPUT); //motor control
}
delay(10);
//stop motors
for (i = 8; i <= 11; i = i + 1) {
digitalWrite(i, LOW);
}
}
void loop() {
Sonar1();
Sonar2();
Sonar3();
if (right - left > 2 && front > 18) {
forwardright();
stop ();
}
else if (right - left > 2 && front < 18) {
backward();
forwardright ();
stop();
}
else if (left - right > 2 && front > 18) {
forwardleft ();
stop();
}
else if (left - right > 2 && front < 18) {
backward();
forwardleft();
stop();
}
else {
if (front>15){
forward();
stop();
}
}
}
void Sonar1() {
//Sonar 1
// Trigger US-100 to start measurement
// Set up trigger
digitalWrite(trigger1, LOW);
delayMicroseconds(5);
// Start Measurement
digitalWrite(trigger1, HIGH);
delayMicroseconds(10);
digitalWrite(trigger1, LOW);
// Acquire and convert to mtrs
front = pulseIn(echo1, HIGH);
front = front * 0.01657;
// send result to UART
Serial.println(front);
delay(0);
}
void Sonar2 () {
//Sonar 2
// Trigger US-100 to start measurement
// Set up trigger
digitalWrite(trigger2, LOW);
delayMicroseconds(5);
// Start Measurement
digitalWrite(trigger2, HIGH);
delayMicroseconds(10);
digitalWrite(trigger2, LOW);
// Acquire and convert to mtrs
right = pulseIn(echo2, HIGH);
right = right * 0.01657;
// send result to UART
Serial.println(right);
delay(0);
}
void Sonar3 () {
//Sonar 3
// Trigger US-100 to start measurement
// Set up trigger
digitalWrite(trigger3, LOW);
delayMicroseconds(5);
// Start Measurement
digitalWrite(trigger3, HIGH);
delayMicroseconds(10);
digitalWrite(trigger3, LOW);
// Acquire and convert to mtrs
left = pulseIn(echo3, HIGH);
left = left * 0.01657;
left = left / 1;
// send result to UART
Serial.println(left);
delay(0);
}
void forward () {
cmd1(200, 1, 250, 1); //forward
delay(300);
}
void backward () {
cmd1 (150, 0, 230, 0); //backward
delay(700);
}
void stop () {
cmd1 (0, 0, 0, 0); //stop
delay(400);
}
both sides were equal and the mobot was pulled far enough in
front. Figure 3 shows the schematic diagram of the system.
void forwardright() {
cmd1 (90, 1, 50, 1); //right
delay (700);
cmd1 (50, 1, 140, 1); //half left
delay (600);
}
void forwardleft() {
cmd1 (50, 1, 100, 1); //left
delay (700);
cmd1 (100, 1, 50, 1); //half right
delay (710);
}
[7] K.