Collision Avoidance System Project
Collision Avoidance System Project
Collision Avoidance System Project
Arduino Uno
S MEHARAJ
M DINESH BABU
1
CONTENTS
1. ABSTRACT
2. INTRODUCTION
3. METHODOLOGY
4. COMPONENTS REQUIRED
5. CIRCUIT DESIGN AND CONNECTIONS
6. SOURCE CODE
7. WORKING OF THE CIRCUIT (BASED ON THE SOURCE CODE)
8. OUTPUT (USING PROTEUS SIMULATION)
9. CONCLUSION
2
ABSTRACT
o If the driver doesn't keep the minimum safety distance with front object,
it will warn driver to slow down the speed of car to avoid collision. And
if driver doesn't slow down vehicle this system will automatically slow
down and stop the car before collision could occur.
3
INTRODUCTION
4
METHODOLOGY
o If driver slow down the vehicle and increase the distance between
front object and driving vehicle then it is okay. But if driver doesn’t
take any action within (1.5 sec) after the alarm is indicated, then the
system will automatically slow down the vehicle until the distance
between these two is over the minimum safety distance and if not then
will completely stop the vehicle.
5
COMPONENTS REQUIRED
5. Three Resistors(1k)
6. DC Motor
8. Breadboard
6
CIRCUIT DESIGN AND CONNECTIONS
CIRCUIT DESIGN:
7
CIRCUIT CONNECTIONS:
LED connections: It has two pins Anode (longer leg) and Cathode (shorter
leg).
• Green LED: Connect anode to resistor and then to 13th pin of Arduino.
Connect cathode to GND of Arduino.
• Yellow LED: Connect anode to resistor and then to 12th pin of Arduino.
Connect cathode to GND of Arduino.
• Red LED: Connect anode to resistor and then to 2nd pin of Arduino.
Connect cathode to GND of Arduino.
Buzzer
DC Motor
Connect one terminal to pin-6 on Arduino and another one to GND of Arduino.
8
SOURCE CODE
long duration;
int distance;
void setup ()
void loop ()
delayMicroseconds (2);
delayMicroseconds (10);
distance= duration*0.034/2;
else
else
delay (400);
delay (400);
else
delay (600);
12
digitalWrite (2, LOW);
delay (600);
delay (400);
noTone(buzz);
delay (100);
delay (400);
noTone(buzz);
delay (50);
delay (400);
noTone(buzz);
13
delay (50);
delay (400);
noTone(buzz);
delay (50);
}
else
14
WORKING OF THE CIRCUIT (BASED ON THE
SOURCE CODE)
Make those necessary circuit connection and upload the given code to the
Arduino using Arduino IDE. Now let's see about the working of our circuit.
Zone 1:
When the distance between the object in front of the Ultrasonic sensor is
greater than 100cm then no warning will be provided. Only green colour LED will
glow and motor will run, indicating that object is at a safe distance.
Zone 2:
If the distance between the object in front of the sensor is between 100-50cm,
then yellow colour LED will start blinking. This indicates that "Object is
approaching". Motor will continue to run.
15
Zone 3:
If the distance gets reduced between 50-20cm, then red colour LED will start
blinking. In addition to that a beep sound is also provided by the buzzer. Driver
needs to respond in this situation. In spite of the warning, the motor will continue
to run.
Zone 4:
This is the last zone. Here, if the distance between the object is even get
reduced to less than 20cm, then the motor will automatically stop functioning.
16
OUTPUT
Whenever a green led blinks it results that the vehicle is at a greater distance
about (100cm) this means that the distance between the vehicle and the nearing
object remains in a safe distance from each other.
17
Whenever a yellow led blinks it indicates that the distance between the object
in front of the sensor is between (100-50cm), This indicates that "Object is
approaching". Motor will continue to run.
18
Whenever a red led blinks, it indicates that the distance gets reduced between
(50-20cm). In addition to that a beep sound is also provided by the buzzer. Driver
needs to respond in this situation. In spite of the warning, the motor will continue
to run.
19
CONCLUSION
o Though the vehicles of today are not equipped with this system, through
this project we have detected distance between two vehicle and
calculated the safety distance, by which warning is given to the driver
and taken actions depending upon driver’s reaction by which collision
avoidance is achieved successfully using the system.
o And also, its main concept is created to ensure the driver safety as the
foremost priority.
20