Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

ICE Innovation Lab IEEE IU SB

Obstacle Avoiding Robot

Introduction:
Obstacle detection and avoidance can be considered as the central issue
in designing mobile robots. This technology provides the robots with
senses which it can use to traverse in unfamiliar environments without
damaging itself. In this paper an Obstacle Avoiding Robot is designed
which can detect obstacles in its path and maneuver around them without
making any collision.
It is a robot vehicle that works on Arduino Microcontroller and employs
three ultrasonic distance sensors to detect obstacles. The Arduino board
was selected as the microcontroller platform and its software counterpart,
Arduino Software, was used to carry out the programming. The integration
of three ultrasonic distance sensors provides higher accuracy in detecting
surrounding obstacles.
Being a fully autonomous robot, it successfully maneuvered in unknown
environments without any collision. The hardware used in this project is
widely available and inexpensive which makes the robot easily replicable.

The robot developed in this project is expected to fulfill the following


objectives:
● The robot would have the capacity to detect obstacles in its path
based on a predetermined threshold distance.
● After obstacle detection, the robot would change its course to a
relatively open path by making autonomous decision.
● It would require no external control during its operation.
● It can measure the distance between itself and the surrounding
objects in real-time. • It would be able to operate effectively in
unknown environment.

Component Needed:

1
ICE Innovation Lab IEEE IU SB

1. WD Smart Robot Car Kit

2. Arduino Uno R3

2
ICE Innovation Lab IEEE IU SB

3. Ultrasonic Sonar
Sensor SR04

4. SG90 Micro Servo Motor

3
ICE Innovation Lab IEEE IU SB

5. L298N Stepper Motor Driver


(Green)

6. Male to Male Jumper

7. Male to Female Jumper

4
ICE Innovation Lab IEEE IU SB

8. Mini switch 6A 250V AC

9. Battery Case

10. 4200mAh 3.7V Rechargeable


Batteries

5
ICE Innovation Lab IEEE IU SB

Structure / Chassis

The structure consists of physical components. A robot has one or more 


physical components that move in some way to perform the task.In our 
case the Chassis and wheels are the structure of the robot.

Actuator

6
ICE Innovation Lab IEEE IU SB

An “actuator” can be defined as a device that converts energy (in robotics, 


that energy tends to be electrical) into physical motion. Most of the 
actuators produce either rotational or linear motion. 

In our case the actuator is DC gear motor.It is basically a DC motor 


combined with a gearbox that works to decrease the motor’s speed and 
increase the torque.

Controller

Now the robot chassis and actuator are added but controller is 
missing.Chassis without controller means nothing will happen. Your robot 
will sit in one place. It’s just like a human without life. 

So a controller ( brain ) is needed to move the robot from one place to 
another.It is a computing device capable of executing a program and is 

7
ICE Innovation Lab IEEE IU SB

responsible for all computations, decision making, and communications.In 


our case, we are using an Arduino Nano microcontroller as a Controller. 

The controller takes input ( sensors, Remote etc ) , process it and then 
gives a command to the actuator ( motor ) to do the desired task. 

If you take a battery hook the positive side to one side of your DC motor. 
Then you connect the negative side of the battery to the other motor lead. 
The motor spins forward. If you swap the battery leads the motor spins in 
reverse. You can use your microcontroller to rotate the motor in one 
direction.But if you want to be able to control the motor in both forward 
and reverse with your microcontroller, you will need more circuitry. You will 
need an H-Bridge. 

H Bridge ( LM 298 Module )

What is H- Bridge ? 

The term H bridge is derived from the typical graphical representation of 
such a circuit .It is a circuit which can drive a DC motor in forward and 
reverse direction. 

8
ICE Innovation Lab IEEE IU SB

Working : ​See the above picture for understanding the working of the H 
bridge.It is consists of 4 electronics switches S1,S2,S3 and S4 ( Transistors 
/ MOSFETs/ IGBTS ). 

When the switches S1 and S4 are closed (and S2 and S3 are open) a 
positive voltage will be applied across the motor.So it rotates in the 
forward direction.Similarly when S2 and S3 are closed and S1 and S4 are 
opened a reverse voltage is applied across the motor, so rotates in reverse 
direction. 

Note : T
​ he switches in the same arm ( either S1,S2 or S3,S4) are never 
closed at a same time, it will make a dead short circuit. 

H bridges are available as integrated circuits, or you can build your own by 
using 4 transistors or MOSFETs. 

In our case we are using LM298 H-bridge IC that can allows to control the 
speed and direction of the motors. 

Pin Description : 

Out 1: DC motor 1 "+" or stepper motor A+ 

Out 2: DC motor 1 "-" or stepper motor A- 

Out 3: DC motor 2 "+" or stepper motor B+ 

Out 4: Motor B lead out 

12v :12V input but you can use 7 to 35V 

GND: Ground 

5v: 5V output if 12V jumper in place, ideal for powering your Arduino 
(etc) 

9
ICE Innovation Lab IEEE IU SB

EnA: Enables PWM signal for Motor A (Please see the "Arduino Sketch 
Considerations" section) 

IN1: Enable Motor A 

IN2: Enable MotorA 

IN3: Enable MotorB 

IN4: Enable MotorB 

Input / Sensors
 

Unlike humans, robots are not limited to just sight, sound, touch, smell and 
taste. Robots use different sensors to 

interact with the external world. 

10
ICE Innovation Lab IEEE IU SB

A sensor is a device that detects and responds to some type of input from 
the physical environment. The specific input could be light, heat, motion, 
moisture, pressure, or any one of a great number of other environmental 
phenomena. 

The inputs may be from sensors,Remote or Smartphone. 

In this basic tutorial I am using Smartphone as a input device to control the 


Rover. 

Power Source

A robot needs a power source to drive the actuators ( motors ) and the 
controller. Most of the robots are powered by a battery.When we talk 
about battery, there are lot of options 

11
ICE Innovation Lab IEEE IU SB

1. AA Alkaline Battery ( Non Rechargeable ) 

2. AA NiMh or NiCd Battery ( Rechargeable ) 

3. Li Ion Battery 

4. LiPo Battery 

So according to the requirement choose the suitable one.In my opinion, 


always choose a rechargeable and sufficient capacity battery.I used  

2nos of 2600mAh Li-Ion Battery ( 18650 Samsung Brand ).If you need 
more power for autonomy you can choose a large battery pack like 5A 
turnigy. 

Battery Holder : 

The battery holder that I am using is ordered from china.It is not suitable 
for flat top battery like Samsung. So I attached two neodymium magnets 
on the positive terminal of the battery to fit perfectly. 

Circuit Design 

 
 

12
ICE Innovation Lab IEEE IU SB

For wiring you need some jumper wires. 

Connect the red wires of two motors ( on each side )together and black 
wires together.So finally you have two terminals in each side. 

MOTORA is in charge of two right side motors, correspondingly two left 


side motors are connected to MOTORB 

Follow the instruction below to connect everything. 

Motors Connection: 

Out1 -> Left Side Motor Red Wire (+ ) 

Out2 -> Left Side Motor Black Wire ( - ) 

Out3 -> Right Side Motor Red Wire ( + ) 

Out4 -> Right Side Motor Black Wire ( - ) 

LM298 - > Arduino 

IN1 -> 12 

IN2-> 11 

IN2 ->6 

13
ICE Innovation Lab IEEE IU SB

IN2-> 5 

Servo->Arduino 

Yellow Pin- 9 

Ultrasonic Sensor-> Arduino 

Trig Pin-A4 

Echo Pin-A5 

Power 

12V - > Connect Battery Red Wire 

GND -> Connect Battery Black wire and Arduino GND pin 

5V -> Connect to Arduino 5V pin 

Code:

Code will be provided By Hand.

14
ICE Innovation Lab IEEE IU SB

Final View:

Thank You.

Organized By
ICE Innovation Lab
Department of ICE
Islamic University, Kushtia.

Sponsored By
IEEE Islamic University Student Branch

15

You might also like