0% found this document useful (0 votes)
21 views31 pages

My Document

This document outlines the design and implementation of an obstacle avoidance robotic vehicle using an ultrasonic sensor and Arduino controller. The robot autonomously detects obstacles and navigates around them by controlling its motors based on input from the ultrasonic sensor. The project includes acknowledgments, hardware requirements, working principles, applications, and experimental results demonstrating the robot's functionality.

Uploaded by

cskchintu47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views31 pages

My Document

This document outlines the design and implementation of an obstacle avoidance robotic vehicle using an ultrasonic sensor and Arduino controller. The robot autonomously detects obstacles and navigates around them by controlling its motors based on input from the ultrasonic sensor. The project includes acknowledgments, hardware requirements, working principles, applications, and experimental results demonstrating the robot's functionality.

Uploaded by

cskchintu47
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 31

OBSTACLE AVOIDANCE

ROBOTIC VEHICLE
using
ULTRASONIC SENSOR
and
ARDUINO
CONTROLLER

V
ABSTRACT

Obstacle avoidance is one of the most important aspects of mobile


robotics. Without it, robot movement would be very restrictive and fragile.
This project proposes robotic vehicle that has an intelligence built in it such that
it directs itself whenever an obstacle comes in its path. So, to protect the robot
from any physical damages.

This can be design to build an obstacle avoidance robotic vehicle using


ultrasonic sensors for its movement. A micro-controller(AT mega 328P) is used
to achieve the desired operation.
An ultrasonic sensor is used to detect any obstacle ahead of it and sends a
command to the microcontroller. Depending on the input signal received, the
micro-controller redirects the robot to move in an alternate direction by
actuating the motors which are interfaced to it through a motor driver.

VI
ACKNOWLEDGEMENT

It is my proud privilege and duty to acknowledge the kind of help and guidance
received from several people in preparation of this report. Apart from my own,
the success of this report depends largely on the encouragement and guidelines of
many others. It would have not been possible to prepare this report in this form
without their valuable help, co- operation and guidance.

I would like to express my deep sense of gratitude to our Principal Dr. Sanjay
Jain, CMR Institute of Technology College, Bangalore for his motivation and for
creating an inspiring atmosphere in college by providing state of the art facilities
for preparation and delivery of this report.

My sincere thanks to Dr. K. CHITRA, Head of Department of Mechanical


Engineering, for his whole-hearted support in completion of the

project.

I am highly indebted to my report guide Assistant Prof. PARVATHY THAMPI


M.S for guiding and giving timely advice and suggestions in the successful
completionof this project.

Last but not least, I would like to put forward my heartfelt acknowledgement to
all my project mates who have directly or indirectly provided their overwhelming
support during my project work and the development of this report.

Jeevan M

1CR17EE025

VII
CONTENTS
Chapter 1:
Introduction 1

Chapter 2:
Literature Review 3

Chapter 3:
Design & Hardware 5

Chapter 4:
Block Diagram 7

Chapter 5:
Working 11 - 16

Chapter 6:
Circuit Diagram 17

Chapter 7:
Applications 19

Chapter 8:
Experimental Results 21

Chapter 9:
Program 23 - 25

Chapter 10:
Conclusion 27

Chapter 11:
Reference 30
CHAPTER NO: 1
INTRODUCTION
INTRODUCTION

Robotics is part of today’s communication. In today’s world ROBOTICS is fast


growing and interesting field. It is simplest way for latest technology modification. Now a
days communication is part of advancement of technology, so we decided to work on
ROBOTICS field, and design something which will make human life simpler in day today
aspect. Thus we are supporting this cause.

An obstacle avoiding robot is an intelligent device, which can automatically sense


and overcome obstacles on its path. Obstacle Avoidance is a robotic discipline with the
objective of moving vehicles on the basis of the sensorial information. The use of these
methods front to classic methods (path planning) is a natural alternative when the scenario is
dynamic with an unpredictable behaviour. In these cases, the surroundings do not remain
invariable, and thus the sensory information is used to detect the changes consequently
adapting moving. It will automatically scan the surrounding for further path.

This project is basic stage of any automatic robot.This ROBOT has sufficient
intelligence to cover the maximum area of provided space. It has a ultrasonic sensor which
are used to sense the obstacles coming in between the path of ROBOT. It will move in a
particular direction and avoid the obstacle which is coming in its path. We have used two D.C
motors to give motion to the ROBOT. The construction of the ROBOT circuit is easy and
small .The electronics parts used in the ROBOT circuits are easily available and cheap too.
CHAPTER NO :2
LITERATURE REVIEW
LITERATURE REVIEW:

We reviewed different obstacle detecting robot mechanisms that have been


built by a lot of students and other practitioners that are in existence. For an
autonomous mobile robot performing a navigation-based task in a vague
environment, to detect and to avoid encountered obstacles is an important
issue and a key function for the robot body safety as well as for the task
continuity. Obstacle detection and avoidance in a real world environment that
appears so easy to humans is a rather difficult task for autonomous mobile
robots and is still a well- researched topic in robotics. In many previous works,
a wide range of sensors and various methods for detecting and avoiding
obstacles for mobile robot purpose have been proposed. Good references
related to the developed sensor systems and proposed detection and avoidance
algorithms can be found. Based on these developed sensor systems, various
approaches related to this work can be grouped

Robots need miscellaneous of sensors to obtain information about the world around
them. Sensors will help detect position, velocity, acceleration and range for the
object in the robot's workspace. There is a variety of sensors used to detect the range
of an object. One of the most common range finders is the ultrasonic transducer.
Vision systems are also used to greatly improve the robot’s versatility, speed and
accuracy for its complex and difficult task. Electronic signals are sent to a mobile
robot’s motor controllers and auditory signals can guide the blind traveller around
the obstacles the developed robot uses ultrasonic range finder for detection and
mapping to avoid collision with the unexpected obstacles.

“Obstacle-avoiding robot with IR motion Sensors” has been designed and developed
,robot platform was not designed for specific task but as a general wheeled
autonomous platform. It can therefore be used for educational, research or industrial
implementation. Students can use it to learn the microcontroller programming using
C++, Arduino Uno compiler, IR sensors characteristics, motor driving circuit and
signal condition circuit design. Research on obstacle avoidance robot at the
polytechnic level can help students to develop communication, technical skills and
teamwork. The design of such robot is very flexible and various methods can be
adapted for another implementation. It shows that PIR sensors are more sensitive
compared to IR sensors while detecting human being
CHAPTER NO: 3
DESIGN & HARDWARE
REQUIREMENTS
Design:

Hardware:

 Arduino UNO
 Ultrasonic sensor
 DC Motors
 Motor driver IC (L293D)
 Battery (9V)
 Jumper Wires
 Chassis
 Wheels
CHAPTER NO:4
BLOCK DIAGRAM
BLOCK DIAGRAM

The basic block diagram of the obstacle avoiding car is shown in above figure. Mainly this
block diagram consists of the following essential blocks.

1. Arduino uno
2. Ultrasonic sensor
3. Motor driver(L293D)

1) Arduino uno -

Arduino Uno is an ATmega 328p Microcontroller based prototyping board. It is an open


source electronic prototyping platform that can be used with various sensors and
actuators.It is used for controlling all the operation and assign task to each device.

2) Ultrasonic sensor -

It is an Ultrasonic Range Finder Sensor. It is a non-contact based distance measurement


system and can measure distance of 2cm to 4m.Ultrasonic sensor is mainly use to detect
the obstacle

3) Motor driver -

It is a motor driver which can provide bi-directional drive current for two motors.
CHAPTER NO:5
WORKING
Working Principle:

The obstacle avoidance robotic vehicle uses ultrasonic sensors for its movements. Arduino is
used to achieve the desired operation. The motors are connected through motor driver IC to
Arduino. The ultrasonic sensor is attached in front of the robot.

Whenever the robot is going on the desired path the ultrasonic sensor transmits the ultrasonic
waves continuously from its sensor head. Whenever an obstacle comes ahead of it the
ultrasonic waves are reflected back from an object and that information is passed to the
arduino. The arduino controls the motors left, right, back, front, based on ultrasonic signals.
In order to control the speed of each motor pulse width modulation is used (PWM).

When ultrasonic sensor detect the object which is kept inside the path it will send the signal
toward the arduino uno and according to that it will it will rotate the motor M3 & M4 in
forward direction and rotate the motor M1 & M2 in reverse direction such way that the car
get moving in left direction .

Similarly in every time when ever an obstacle in found to be in path of car it will detect it and
rotate the car in left direction to avoid the obstacle.
ARDUINO UNO:

Arduino/Genuino Uno is a microcontroller board based on the ATmega328P. It has 14 digital


input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz
quartz crystal, a USB connection, a power jack, an ICSP header and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a
USB cable or power it with a AC-to-DC adapter or battery to get started.. You can tinker with
your UNO without worring too much about doing something wrong, worst case scenario you
can replace the chip for a few dollars and start over again. "Uno" means one in Italian and
was chosen to mark the release of Arduino Software (IDE) 1.0. The Uno board and version
of Arduino Software (IDE) were the reference versions of Arduino, now evolved to newer
releases. The Uno board is the first in a series of USB Arduino boards, and the reference
model for the Arduino platform; for an extensive list of current, past or outdated boards see
the Arduino index of boards.
Motor Drivers (L293D IC)

 Motor drivers take a low current control signal but provide a higher current signal,
thus acting as a current amplifier. The higher current signal drives the motors. L293D
is a motor driver that allows direct current (DC) motor to drive on either direction. It
contains two inbuilt H-bridge driver circuits . To rotate the motor in clockwise or
anticlockwise direction, voltage need to change its direction. H-bridge is a circuit that
allows voltage to be flown in either direction. Hence H-bridge IC are ideal for driving
a DC motor .
 Here are 4 input pins for L293d, pin 2,7 on the left and pin 15 ,10 on the right as
shown on the pin diagram. Left input pins will regulate the rotation of motor
connected across left side and right input for motor on the right hand side. The motors
are rotated on the basis of the inputs provided across the input pins as LOGIC 0 or
LOGIC 1. For rotating the motor in clockwise direction the input pins has to be
provided with Logic 1 and Logic 0.Enable pins 1 and 9 (corresponding to the two
motors) must be high for motors to start operating. When an enable input is high, the
associated driver gets enabled. As a result, the outputs become active and work in
phase with their inputs. Similarly, when the enable input is low, that driver is disabled,
and their outputs are off and in the high-impedance state.
Motor (100rpm/ 12V DC Motor)

 The obstacle detection and avoiding robot uses two 200rpm and 12V DC geared
motors. The motor used has a 6mm shaft diameter with internal holes. The internal
holes are for easy mounting of the wheels by using screws. It is an easy to use low-
cost motor for robotics application
 An Electric DC motor is a machine which converts electric energy into mechanical
energy. The working of DC motor is based on the principle that when a current-
carrying conductor is placed in a magnetic field, it experiences a mechanical force.

The direction of mechanical force is given by Fleming’s Left-hand Rule and its
magnitude is given by F = BIL Newton.
 DC motors are seldom used in ordinary applications because all electric supply
companies furnish alternating current.
ULTRASONIC SENSOR

 An Ultrasonic sensor is a device that can measure the distance to an object by using
sound waves. It measures distance by sending out a sound wave at a specific
frequency and listening for that sound wave to bounce back. By recording the elapsed
time between the sound wave being generated and the sound wave bouncing back, it
is possible to calculate the distance between the sonar sensor and the object.
 It emits an ultrasound at 40 000 Hz which travels through the air and if there is an
object or obstacle on its path It will bounce back to the module. Considering the travel
time and the speed of the sound you can calculate the distance.

 The HC-SR04 Ultrasonic Module has 4 pins, Ground, VCC, Trig and Echo. The
Ground and the VCC pins of the module needs to be connected to the Ground and the
5 volts pins on the Arduino Board respectively and the trig and echo pins to any
Digital I/O pin on the Arduino Board.
 In order to generate the ultrasound you need to set the Trig on a High State for 10 µs.
That will send out an 8 cycle sonic burst which will travel at the speed sound and it
will be received in the Echo pin. The Echo pin will output the time in microseconds
the sound wave traveled.
CHAPTER NO:6
CIRCUIT DIAGRAM
CIRCUIT DIAGRAM
CHAPTER NO:7
APPLICATIONS
APPLICATIONS

This device has application in surveying different landscapes and mapping


them. It can also be used in commercial devices like

 Automated lawn mover


 Smart room cleaner etc
 Obstacle avoiding robots can be used in almost all mobile robot navigation
systems.
 They can also be used in dangerous environments, where human
penetration could be fatal.
 Unmanned vehicle driving
 Mining Vehicle that uses Obstacle Detection
CHAPTER NO:8
EXPERIMENTAL RESULTS
EXPERIMENTAL RESULT

The result is obtained for obstacle avoidance robot using Arduino, if the robot moves
forward if any obstacle detect it check for other directions and moves where there is no
obstacles it moves in forward direction, to sense the obstacle ultrasonic sensor is used.
We used servo motor to rotate the ultrasonic sensor.

The working principle of the robot is transmitting sensed signal to the microcontroller to control the
DC motors for obstacle avoidance. The direction of the motors to move either clockwise or anti-
clockwise directions as provided by the microcontroller. Ultrasonic sensor detect a moving object
while IR sensor does not detect any object, the robot will move backward (motor 1 and motor 2
counter clockwise).

The sensor also detects object, the robot will stop (motor 1 and motor 2 OFF). After 50 ms, motor 1
will move clockwise and the robot will turn left. After 500 ms, the robot will move forward (motor 1
and motor 2 clockwise) and after 1000ms, both motors will stop. From the flow chart in Figure 10, it
shows that the IR sensors are very effective in sensing signals in their path for the obstacle avoiding
robots to evade obstacles in its path.
CHAPTER NO: 9
PROGRAM
// OBSTACLE AVOIDING CAR:

First define trig and echo pin of HC-SR04 in the program.

int trigPin = 9; // trig pin of HC-SR04


int echoPin = 10; // Echo pin of HC-SR04

Define pins for input of LM298N Motor Driver Module.


The LM298N has 4 data input pins used to control the direction of motor connected to it.

int revleft4 = 4; //REVerse motion of Left motor


int fwdleft5 = 5; //ForWarD motion of Left motor
int revright6 = 6; //REVerse motion of Right motor
int fwdright7 = 7; //ForWarD motion of Right motor

LM298N Motor Driver Module


In setup() function, define the data direction of utilized GPIO pins.
The four Motor pins and Trig pin is set as OUTPUT and Echo Pin is set as Input.

pinMode(revleft4, OUTPUT); // set Motor pins as output


pinMode(fwdleft5, OUTPUT);
pinMode(revright6, OUTPUT);
pinMode(fwdright7, OUTPUT);
pinMode(trigPin, OUTPUT); // set trig pin as output
pinMode(echoPin, INPUT); //set echo pin as input to capture reflected

In loop() function, get the distance from HC-SR04 and based on the distance move the motor
direction.
The distance will show the object distance coming in front of the robot.
The Distance is taken by bursting a beam of ultrasonic up to 10 us and receiving it after 10us.

digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH); // send waves for 10 us
delayMicroseconds(10);
duration = pulseIn(echoPin, HIGH); // receive reflected waves
distance = duration / 58.2; // convert to distance
delay(10);

If the distance is greater than the defined distance means there is not obstacle in its path and it will
moving in forward direction.

if (distance > 19)


{
digitalWrite(fwdright7, HIGH); // move forward
digitalWrite(revright6, LOW);
digitalWrite(fwdleft5, HIGH);
digitalWrite(revleft4, LOW);
}
If the distance is less than the defined distance to avoid obstacle means
there is some obstacle ahead.
So in this situation robot will stop for a while and move backwards after that again
stop for a while
and then take turn to another direction.

if (distance < 18)


{
digitalWrite(fwdright7, LOW); //Stop
digitalWrite(revright6, LOW);
digitalWrite(fwdleft5, LOW);
digitalWrite(revleft4, LOW);
delay(500);
digitalWrite(fwdright7, LOW); //movebackword
digitalWrite(revright6, HIGH);
digitalWrite(fwdleft5, LOW);
digitalWrite(revleft4, HIGH);
delay(500);
digitalWrite(fwdright7, LOW); //Stop
digitalWrite(revright6, LOW);
digitalWrite(fwdleft5, LOW);
digitalWrite(revleft4, LOW);
delay(100);
digitalWrite(fwdright7, HIGH);
digitalWrite(revright6, LOW);
digitalWrite(revleft4, LOW);
digitalWrite(fwdleft5, LOW);
delay(500);
}
CHAPTER NO: 10
CONCLUSION
CONCLUSION

The goal of our project is to create a autonomous robot which intelligently detects the
obstacle in his path and navigate according to the actions we set for it.

The above Arduino controller and ultrasonic sensor were studied and the HcSR-04 ultrasonic
sensor was selected, as the controlling result are satisfying for its use in the automobile
prototype system bring developed. It was used to sense the obstacle and avoidance them.
On successful implementation of obstacle avoidance algorithm was successfully carried out
too with minimal errors, by coding the algorithm in python. Obstacle avoidance is a very
good application to be used in vehicle preventing many accidents and loss of life.

This project developed an obstacle avoiding robot to detect and avoid obstacles in its path.
The robot is built on the Arduino platform for data processing and its software counterpart
helped to communicate with the robot to send parameters for guiding movement. For
obstacle detection, three ultrasonic distance sensors were used that provided a wider field of
detection. The robot is fully autonomous and after the initial loading of the code, it requires
no user intervention during its operation.

When placed in unknown environment with obstacles, it moved while avoiding all obstacles
with considerable accuracy. In order to optimize the movement of the robot, we have many
considerations for improvement. However, most of these ideas will cost more money and
time as well. In future cameras can be used to detect the obstacle however, it is better to get
CCD or industrial use ones to get clear and fast pictures. Even the ones we mentioned in the
camera holder part will be better because of the special software.
CHAPTER NO: 11
REFERENCES
REFERENCES

[1] Amir attar, aadilansari, abhishek desai, shahid khan, dip ashrisonawale “line follower and
obstacle avoidance bot using arduino” International Journal of Advanced Computational
Engineering and Networking, vol. 2, pp. 740-741, August 1987.

[2] Aniket D. Adhvaryu et al “Obstacle-avoiding robot with IR and PIR motionSensors” IOP
Conference Series: Materials Science and Engineering, vol. A247, pp. 529-551, April 2005.

[3] Vaghela Ankit1, Patel Jigar2, Vaghela Savan3 “Obstacle Avoidance Robotic Vehicle Using
Ultrasonic Sensor, Android And Bluetooth For Obstacle Detection” International Research Journal
of Engineering and Technology (IRJET), vol. A247, pp. 29-32, 2005.

[4] Paul Kinsky,Quan Zhou “Obstacle Avoidance Robot” Worcester polytechnic institute.

[5] FaizaTabassum, SusmitaLopa, Muhammad MasudTarek& Dr. Bilkis Jamal Ferdosi “obstacle
avoidance car”Global Journal of Researches in Engineering: HRobotics & Nano-Tech.

[6] Bhagya shree S R , Manoj kollam “Zigbee Wireless Sensor Network For Better Interactive
Indus

WEBSITES:
 https://www.ijcaonline.org/archives/volume56/number5/8885-2882
 https://ieeexplore.ieee.org/document/4725791
 https://www.sciencedirect.com/science/article/pii/S1877050917302107
 http://www.datasheetcatalog.com
 http://www.instructabal.com
 http://en.wikipedia.org/wiki/Artificial_intelligence
 http://science.howstuffworks.com/robot2.htm
 http://arduino.cc/en/Main/arduinoBoardUno

Magazines:

 Electronics for you


 Electronic Hub

You might also like