0% found this document useful (0 votes)
20 views9 pages

Design_of_a_Robotic_Vehicle_to_Avoid_Obstacle_Usin

This article presents a project on designing a robotic vehicle that uses an Arduino microcontroller and ultrasonic sensors for obstacle avoidance. The vehicle detects obstacles using ultrasonic sensors mounted on its front and sides, allowing it to navigate around impediments by adjusting its direction based on sensor data. The paper details the hardware and software requirements, the design process, and the algorithm for the robot's operation.

Uploaded by

phantomapex0904
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)
20 views9 pages

Design_of_a_Robotic_Vehicle_to_Avoid_Obstacle_Usin

This article presents a project on designing a robotic vehicle that uses an Arduino microcontroller and ultrasonic sensors for obstacle avoidance. The vehicle detects obstacles using ultrasonic sensors mounted on its front and sides, allowing it to navigate around impediments by adjusting its direction based on sensor data. The paper details the hardware and software requirements, the design process, and the algorithm for the robot's operation.

Uploaded by

phantomapex0904
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/ 9

1002 Applied Mathematics, Modeling and Computer Simulation

C.-H. Chen et al. (Eds.)


© 2023 The Authors.
This article is published online with Open Access by IOS Press and distributed under the terms
of the Creative Commons Attribution Non-Commercial License 4.0 (CC BY-NC 4.0).
doi:10.3233/ATDE231041

Design of a Robotic Vehicle to Avoid


Obstacle Using Arduino Microcontroller
and Ultrasonic Sensor
Shankha Shubhra GOSWAMI a,1, Sushil Kumar SAHOO b
a
Abacus Institute of Engineering and Management, Hooghly, West Bengal, India,
712148
b
Indira Gandhi institute of Technology, Sarang, Odisha, India, 759146

Abstract. This project depicts an obstacle-evasion robot vehicle restricted by an


ultrasonic sensor. The Arduino microcontroller drives the robot prototype car,
which employs an ultrasonic sensor for obstacle detection. This sensor is mounted
on the vehicle's front and two sides. The sensor receives data from the robot's
attached sensors once the encircling zone begins. The sensor detects the
impediment and proceeds to choose an impediment-free path. The sensor will
convey the command to the controller and is distinguished from the controller by
selecting the appropriate motion for the robot wheel. The vehicle wheel's
advancement and direction will now be determined by the identification of the
ultrasonic sensor and the use of a wheel encoder. This vehicle is used to detect
obstructions and avoid their effects.

Keywords. Robot, Arduino, Ultrasonic sensor, Microcontroller, Circuit,


Algorithm

1. Introduction

Many businesses and manufacturing sectors are now implementing robots because of
their high level of execution, consistent consistency, and ability to help people [1]. The
block evading mechanical technology is applied for recognizing the obstruction
arrangement as demonstrated by their work performance [2]. Knock sensors, infrared
sensors, ultrasonic sensors, and other detecting instruments are used to identify
impediments [3]. The ultrasonic sensor is widely intended to detect huddles due to its
easy use and has a long running time. The mechanical vehicle is intended to initially
follow and evade any sort of deterrents that comes it's direction [4]. The vehicle
accomplishes this shrewd usefulness with the assistance of ultrasonic sensors combined
with microprocessor and motors. The whole framework joined gives the vehicle a
shrewd item recognition and interference avoidance plot.
This framework permits the vehicle to manage itself in the event that it experiences
any obstruction [5]. The hindrance recognition is finished utilizing the ultrasonic
sensor. This is distinguished and a sign is given to the microcontroller. This signal
guides the vehicle to change towards other direction by actuating the motors through

1 Corresponding Author, Shankha Shubhra GOSWAMI, Abacus Institute of Engineering and


Management, Hooghly, West Bengal, India, 712148; E-mail: [email protected]
S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle 1003

the motor driver IC [6]. The aim of this paper is to create a prototype model for an
obstacle avoider robot vehicle on the basis of sensorial information. The robot is
intelligent enough to cover maximum space as provided. By sending signals to a
microcontroller, ultrasonic and infrared sensors detect obstacles in the robot's way [7].
The small regulator diverts the robot to move a substitute way by stirring the motors in
request to maintain a strategic distance from the distinguished hurdle.

2. Hardware and Software Requirements

The bill of materials (BOM) listed in table 1 include all the essential components
required for a robotic vehicle that avoids obstacles using an Arduino microcontroller
and an ultrasonic sensor.
Table 1. BOM for robot vehicle
Hardware Software
Sl.
Component Cost
No. Quantity Component name Quantity Cost (Rs)
name (Rs)
1 Motor 04 400.00
2 Wheel 04 100.00
Free
HCSR04 One time
3 03 300.00 Arduino IDE (Open
ultrasonic sensor installation
source)
4 Motor driver 01 140.00
5 Arduino UNO 01 450.00
6 Chassis 01 180.00
7 Castor 01 40.00 USB cable for
8 Nut & bolt 1 SET 50.00 programming and 01 50.00
9 Jumper wires 1 SET 100.00 power supply
10 Tape 01 40.00
Total 1800.00 Total 50.00
(Source: Author’s own interpretation)

3. Design and Modeling of Robot Vehicle

The advancement of a robot model arrangement is for the upgrade of a robot or


mechanical framework and is known as automated plan. The prospects of Mobile
Robots are quickly growing and their intricacies are expanding because of different
applications. Reduced robot course strategies incorporate way planning, self-limit, and
guide deciphering, among others. An obstacle keeping a strategic distance from the
robot is a self-supervising versatile robot that prevents sway with abrupt impediments.
By definition, obstacle avoidance is a profitable feature that should be introduced as
soon as possible without interfering with the structure’s overall efficiency. Now let’s
discuss about some of the major equipment’s of the robot model, microcontroller,
Arduino UNO, Ultrasonic sensor and Motor driver IC (L293D).

3.1. Microcontroller

Microcontroller comprises of various components in a single chip to execute specific


tasks. Figure 1 shows both input, output, and peripherals components contained on a
1004 S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle

single silicon chip known as microcontroller [8]. The followings are the required
features of a single microcontroller.
a) Units of arithmetic and logic
b) Memory for programme storage
c) Nonvolatile and high-capacity registers using EEPROM
d) Ports for input and output
e) A converter to convert Analog to digital
f) Electronic circuits
g) Serial communication terminals, as well as a slew of other options

Figure 1. Microcontroller assembly components


(Source: Author’s own interpretation; Macfos Limited)

3.2. Arduino UNO

The Arduino Uno shown in figure 2 retains numerous features, some of them are listed
below.
a) Voltage regulator: It includes a 5V voltage regulator, allowing it to be powered
from various sources, including a USB connection or an external power supply (7-12V
DC).
b) USB interface: The board can be connected to a computer via USB, which not
only powers the board but also allows you to upload your Arduino sketches (programs)
to it.
c) Reset button: There is a reset button on the board that allows you to reset the
microcontroller, restarting your program.
d) Clock crystal: The board includes a 16 MHz crystal oscillator, providing precise
timing for the microcontroller.
e) LEDs: There are built-in LEDs on the board. One (L) is connected to digital pin
13, and another (TX) is connected to the transmit (TX) pin. These LEDs can be used
for simple debugging.
S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle 1005

Figure 2. Arduino UNO board


(Source: Sheikh, 2017)

3.3. Ultrasonic Sensor

The main purpose of an ultrasonic sensor is to detect obstacles as depicted in figure 3.


Sound waves are used by an ultrasonic sensor to determine distance. It emits a 40000
Hz ultrasound that travels through the air, and if it encounters an obstacle along the
way, it returns to the module. It calculates the distance based on the sound's speed and
movement time. To generate the ultrasound, the Trigona high state must be set for 10
seconds [10].

3.4. Motor Drivers

Motor drivers use a low momentum control flag but send out a higher ebb and flow
signal, essentially acting as a momentum intensifier. The motor is powered by the
higher current symbol. The L293D is a popular motor driver IC (Integrated Circuit)
shown in figure 4 commonly used for controlling DC motors and bipolar stepper
motors in various electronics projects, including robotics and automation [11]. It’s
direction and speed are controlled using a microcontroller or other control logic [12].
Assemble all the hardware components following the circuit diagram shown in figure
5. Here are the key features and connections of the L293D motor driver.
a) Dual H-bridge: The L293D contains two H-bridge circuits, which can control
the direction (forward and reverse) and speed of two DC motors independently.
b) Voltage compatibility: It can work with a wide range of motor voltage ratings
(usually up to 36V) and logic voltage levels (usually 3.3V or 5V).
c) Current handling: The L293D can handle moderate current loads (typically up to
600mA per channel continuously, with peak currents up to 1.2A).
d) Built-in diodes: It has built-in fly back diodes (also called freewheeling diodes)
to protect against back EMF generated by the motor. The associated driver is activated
when the activate input is high. As a consequence, the outputs become interactive and
interact with their information sources in real time. Similarly, when the empower input
is poor, the driver is rendered ineffective, and their yields suffer.
1006 S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle

Figure 3. Ultrasonic sensor


(Source: Pandit, 2019)

Figure 4. Motor driver IC (L293D)


(Source: Sun Robotics)

4. Algorithm and Working Principle

Below are the step to step guide to create a robotic vehicle that can avoid obstacles
using an Arduino microcontroller and an ultrasonic sensor.
a) Step 1: Assemble the hardware components to create the robotic vehicle.
Connect the motors to the motor driver, followed by the Arduino. Mount all the three
sensors facing in three different directions. Make sure everything is securely connected.
b) Step 2: Install the Arduino IDE on your computer.
c) Step 3: Write the Arduino code to control the robot’s movements and make it
avoid obstacles. A sample code is provided in the sub-section 4.3. In this code, we use
the NewPing library to interface with the ultrasonic sensor. The robot will move
forward until it detects an obstacle within 15 cm. When an obstacle is detected, it stops,
turns right for 1 second, and then continues moving forward.
d) Step 4: Upload the code.
e) Step 5: Finally test the robot. Place obstacles in front of the robot and observe
how it reacts. It should stop and turn right when an obstacle is detected.
An Atmega family microcontroller is used to complete the ideal operation. The
motors are connected to the microcontroller via the engine driver IC. Before the robot,
the ultrasonic sensor is attached. Whenever the android vehicle is travelling in the best
possible direction, the ultrasonic sensor sends waves on a continuous basis. The
ultrasonic waves are mirrored from an article if a hurdle occurs in front of it, and the
data is transferred to the microcontroller.
S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle 1007

At first when we switch ON the system the vehicle will be started moving in
forward direction and whenever the forward sensor means the first sensor will be
sensing an obstacle within the range of 15 cm then the first sensor will be stopped and
the other 2 sensor will start sensing the distance of the obstacle in the left and the right
directions and if the left distance is more as compared to the right direction then the
robot will be moving in the left direction and vice versa and all the above mention task
will be performed by a microcontroller and can be performed in fraction of seconds.
From the outset when we switch ON the framework the vehicle will start to move
forward way and at whatever point the forward sensor implies the principal sensor will
detect an obstruction within the scope of 15 cm then the main sensor will be halted and
the other 2 sensor will begin detecting the distance of the obstacle in the left as well as
right side and the correct headings provides the direction of motion for the robot. The
robot will move in the direction which have more distance compared with other side.
The decision will be take care by microcontroller and can be acted in part of seconds.

4.1. Algorithm for Robot Vehicle Motion

Step 1: Start the vehicle by powering on


Step 2: The vehicle will start in forward direction until it discovers an obstacle
Step 3: When the vehicle will discover the obstacle then the forward sensor will
stop working and the other 2 sensors will be working and calculating the distances.
Step 4: The distance which will be lesser the robot will be moving in that direction
Step 5: And hence in which direction in which the distance will be lesser the robot
will be moving in that direction.

Figure 5. Circuit diagram of the hardware components


(Source: SriTu Hobby)

4.2. Programme Code to Function the Robot Vehicle

#include <NewPing.h> if (distance > 0 && distance < 15) {


// Obstacle detected, stop and turn
#define TRIG_PIN 9 stopMotors();
#define ECHO_PIN 10 delay(1000);
#define MAX_DISTANCE 200 // Turn right
turnRight();
NewPing sonar(TRIG_PIN, ECHO_PIN, MAX_DISTANCE); delay(1000);
1008 S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle

} else {
#define motor1A 2 // No obstacle, move forward
#define motor1B 3 moveForward();
#define motor2A 4 }
#define motor2B 5 }

void setup() { void moveForward() {


pinMode(TRIG_PIN, OUTPUT); digitalWrite(motor1A, HIGH);
pinMode(ECHO_PIN, INPUT); digitalWrite(motor1B, LOW);
pinMode(motor1A, OUTPUT); digitalWrite(motor2A, HIGH);
pinMode(motor1B, OUTPUT); digitalWrite(motor2B, LOW);
pinMode(motor2A, OUTPUT); }
pinMode(motor2B, OUTPUT);
} void stopMotors() {
digitalWrite(motor1A, LOW);
void loop() { digitalWrite(motor1B, LOW);
// Measure the distance from the ultrasonic sensor digitalWrite(motor2A, LOW);
unsigned int distance = sonar.ping_cm(); digitalWrite(motor2B, LOW);
}

void turnRight() {
digitalWrite(motor1A, HIGH);
digitalWrite(motor1B, LOW);
digitalWrite(motor2A, LOW);
digitalWrite(motor2B, HIGH);
}

4.3. Working Principle

Ultrasonic sensors are used in the construction of the impediment-avoiding mechanical


vehicle. To complete the ideal operation, Arduino is used. The required motors are
connected to the Arduino by motor driver IC. Before the robot, the ultrasonic sensor is
attached. Whenever the robot is moving in the best possible direction, the ultrasonic
sensor transmits ultrasonic waves continuously in the front direction.. Ultrasonic waves
are reflected back from an object if an impediment is in front of it, and this data is
transmitted to the Arduino [13]. In response to ultrasonic signals, the Arduino controls
the engines on the left, right, back, and front. The beat width tweak is used to regulate
the speed of each motor (PWM). When the ultrasonic sensor detects an object that is
held within the way, it will communicate a signal to the Arduino UNO and as a result,
it will turn the motors S3 and S4 forward and pivot the motors S1 and S2 in an invert
bearing, allowing the vehicle to roll to the left or right depending on the available
distance shown in figure 6. Similarly, if a deterrent is discovered to be in the way of a
car, it will identify it and turn the vehicle in the appropriate direction to avoid the
impediment. figure 7 depicts the running prototype model of the robot and 20 sample
experiments have been conducted measuring the right and left distances illustrated in
table 2.
S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle 1009

(a) (b)
Figure 6. Mechanism of robot movement
(Source: Author’s own interpretation; Autodesk Instructables)

Figure 7. Running prototype model


(Source: Author’s own interpretation; Autodesk Instructables)

Table 2. Experiment data and status of movement for robot vehicle

Experiments Left side distance (cm) Right side distance (cm) Status
Exp. 1 7.53 8.15 Vehicle moves toward right
Exp. 2 8.32 7.26 Vehicle moves toward left
Exp. 3 7.79 8.44 Vehicle moves toward right
Exp. 4 8.45 9.18 Vehicle moves toward right
Exp. 5 8.36 7.45 Vehicle moves toward left
Exp. 6 9.29 8.28 Vehicle moves toward left
Exp. 7 8.21 8.89 Vehicle moves toward right
Exp. 8 8.63 8.09 Vehicle moves toward left
Exp. 9 7.99 8.97 Vehicle moves toward right
Exp. 10 9.33 8.23 Vehicle moves toward left
(Source: Author’s own interpretation)
1010 S.S. Goswami and S.K. Sahoo / Design of a Robotic Vehicle to Avoid Obstacle

5. Conclusion

Many companies are now using robots due to comfortable execution and safety that is a
huge help to humans. The advanced mechanics of obstruction evasion are used to
recognize the deterrent and avoid the effect. This is a robot that can control itself. The
design of an obstruction-shirking robot necessitates the coordination of various sensors
according to their functions. The detection of obstacles is a must for this self-contained
robot. Through installed sensors on the robot, the robot obtains data from the
surrounding territory. The aim of the work is to create an obstacle avoidance automated
vehicle that uses ultrasonic sensors as part of it. To complete the ideal operation, an
Arduino UNO is used. The vehicle can rotate and drive away from the obstacle to the
maximum distance possible. Obstruction staying away from robots can be utilized in
practically all portable robot route frameworks. It was utilized to detect the deterrent
and evasion them. The aim of this prototype model is to build an autonomous robot that
can detect obstacles in its path and navigate according to predetermined actions.

References

[1] Daniyan, I., Balogun, V., Adeodu, A., Oladapo, B., Peter, J. K., & Mpofu, K. (2020). Development
and performance evaluation of a robot for lawn mowing. Procedia Manufacturing, 49, 42-48.
https://doi.org/10.1016/j.promfg.2020.06.009
[2] Oltean, S. E. (2019). Mobile robot platform with arduino uno and raspberry pi for autonomous
navigation. Procedia Manufacturing, 32, 572-577. https://doi.org/10.1016/j.promfg.2019.02.254
[3] Goswami, S. S., Behera, D. K., Afzal, A., Razak Kaladgi, A., Khan, S. A., Rajendran, P., Subbhiah,
Ram., & Asif, M. (2021). Analysis of a robot selection problem using two newly developed hybrid
MCDM models of TOPSIS-ARAS and COPRAS-ARAS. Symmetry, 13(8), 1331.
https://doi.org/10.3390/sym13081331
[4] Budiharto, W. (2015). Intelligent surveillance robot with obstacle avoidance capabilities using neural
network. Computational intelligence and neuroscience, 2015, 52-52.
https://doi.org/10.1155/2015/745823
[5] Balakrishna, K., & Rajesh, N. (2022). Design of remote monitored solar powered grasscutter robot
with obstacle avoidance using IoT. Global Transitions Proceedings, 3(1), 109-113.
https://doi.org/10.1016/j.gltp.2022.04.023
[6] Mohammed, A. A., Abdullahi, A., & Ibrahim, A. (2021). Development of a prototype autonomous
electric vehicle. Journal of Robotics and Control (JRC), 2(6), 559-564.
https://doi.org/10.18196/jrc.26137
[7] Goswami, S. S., & Behera, D. K. (2023). Developing fuzzy-AHP-integrated hybrid MCDM system of
COPRAS-ARAS for solving an industrial robot selection problem. International Journal of Decision
Support System Technology, 15(1), 1-38. http://doi.org/10.4018/IJDSST.324599
[8] Robu.in (April 22, 2020). What is a microcontroller? Macfos Limited. Retrieved from
https://robu.in/what-is-a-microcontroller/ (Accessed on September 30, 2023)
[9] Sheikh, F. (June 15, 2017). Arduino UNO board – Full description. EEE Project. Retrieved from
https://eeeproject.com/arduino-uno-board/ (Accessed on September 30, 2023)
[10] Pandit, A. (March 12, 2019). Obstacle avoiding robot using arduino and ultrasonic sensor. Circuit
Digest. Retrieved from https://circuitdigest.com/microcontroller-projects/arduino-obstacle-avoding-
robot (Accessed on September 30, 2023)
[11] Sun Robotics (2023). L293D motor driver shield for Arduino. Retrieved from
https://www.sunrobotics.in/shop/1629-l293d-motor-driver-shield-for-arduino-588#attr= (Accessed on
September 30, 2023)
[12] SriTu Hobby (2023). How to make an obstacle avoiding robot with three ultrasonic sensors. Retrieved
from https://srituhobby.com/how-to-make-an-obstacle-avoiding-robot-with-three-ultrasonic-sensors/
(Accessed on September 30, 2023)
[13] Pradhan, S. (2023). Obstacle avoiding robot using 3 ultrasonic sensor. Autodesk Instructables.
Retrieved from https://www.instructables.com/OBSTACLE-AVOIDING-ROBOT-USING-3-
ULTRASONIC-SENSOR/ (Accessed on September 30, 2023)

You might also like