Lab Based Project Report On: Obstacle Avoiding Robot
Lab Based Project Report On: Obstacle Avoiding Robot
Lab Based Project Report On: Obstacle Avoiding Robot
BY
ECIL , Secunderabad
Page | 1
CONTENTS
1. ABSTRACT 2
2. INTRODUCTION 4-13
5. RESULT 24
6. CONCLUSION 25
7. FUTURE SCOPE 25
8. REFERENCES 26-28
Page | 2
ABSTRACT
In today’s world ROBOTICS is a fast growing and interesting field. ROBOT has
sufficient intelligence to cover the maximum area of provided space. It has
an infrared 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. Autonomous Intelligent Robots are
robots that can perform desired tasks in unstructured environments without
continuous human guidance. The minimum number of gearmotor allows the
walking robot to minimize the power consumption while construct a
program that can produce coordination of multi-degree of freedom for the
movement of the robot. It is found that two gearmotors are sufficient to
produce the basic walking robot and one voltage regulators are needed to
control the load where it is capable of supplying enough current to drive two
gearmotors for each wheel.
Page | 3
INTRODUCTION :
Now a day’s Robotics is part of today’s communication & communication is part of
advancement of technology, so we decided to work on ROBOTICS field, and design
something which will make human life today’s aspect. There are different types of
mobile robots which can be divided into several categories consists of wheeled robot,
crawling robot and legged robot. This project deals with a wheeled autonomous ROBOT.
It is the part of Automation; Robot has sufficient intelligence to cover the maximum
area. This robot uses infrared sensor to detect the obstacle in between the path and
then avoid them to completes its objective. The IR transmitter continuously generate
an Infrared signal of 38KHz,when an obstacle comes in the path the infrared signal
reflected back from the object and is received by the IR sensor TSOP1738 and then
generate a positive high signal with the help of the receiver circuit that is there is an
obstacle in the path. In such a way the robot is able to detect obstacles of provided
space and able to avoid obstacles coming in between the path of ROBOT with the help
microcontroller board and complete its journey.
The main motto of designing such type of Robot or the technology is that this
technology can be used in today’s very fast transportation to avoid the accident
generally happen in congested or the Metro Politian Areas by applying emergency
break. If we use this technology in the car or any vehicle, it will automatically sense the
obstacles then it will take a side to the available free space. An obstacle may be a living
things or any object. Autonomous Intelligent Robots are robots that can perform
desired tasks in unstructured environments without continuous human guidance. Thus
by using this technology in vehicles we make the drive safe.
Page | 4
Fig – Arduino UNO
Arduino UNO
Page | 5
Arduino Uno
PIN DESCRIPTION :-
Power Vin, 3.3V, 5V, Vin: Input voltage to Arduino when using an
GND external power source.
Page | 6
Analog Pins A0 – A5 Used to provide analog input in the range of 0-5V
Serial 0(Rx), 1(Tx) Used to receive and transmit TTL serial data.
Operating Voltage 5V
Page | 7
Input Voltage Limits 6-20V
SRAM 2 KB
EEPROM 1 KB
Arduino Nano, Arduino Pro Mini, Arduino Mega, Arduino Due, Arduino Leonardo
Overview
The 14 digital input/output pins can be used as input or output pins by using pinMode(),
digitalRead() and digitalWrite() functions in arduino programming. Each pin operate at
Page | 8
5V and can provide or receive a maximum of 40mA current, and has an internal pull-up
resistor of 20-50 KOhms which are disconnected by default. Out of these 14 pins, some
pins have specific functions as listed below:
Serial Pins 0 (Rx) and 1 (Tx): Rx and Tx pins are used to receive and transmit TTL
serial data. They are connected with the corresponding ATmega328P USB to TTL
serial chip.
External Interrupt Pins 2 and 3: These pins can be configured to trigger an
interrupt on a low value, a rising or falling edge, or a change in value.
PWM Pins 3, 5, 6, 9 and 11: These pins provide an 8-bit PWM output by using
analogWrite() function.
SPI Pins 10 (SS), 11 (MOSI), 12 (MISO) and 13 (SCK): These pins are used for
SPI communication.
In-built LED Pin 13: This pin is connected with an built-in LED, when pin 13 is
HIGH – LED is on and when pin 13 is LOW, its off.
Along with 14 Digital pins, there are 6 analog input pins, each of which provide 10 bits
of resolution, i.e. 1024 different values. They measure from 0 to 5 volts but this limit can
be increased by using AREF pin with analog Reference() function.
Analog pin 4 (SDA) and pin 5 (SCA) also used for TWI communication using Wire
library.
AREF: Used to provide reference voltage for analog inputs with analogReference()
function.
Reset Pin: Making this pin LOW, resets the microcontroller.
Communication
Arduino can be used to communicate with a computer, another Arduino board or other
microcontrollers. The ATmega328P microcontroller provides UART TTL (5V) serial
communication which can be done using digital pin 0 (Rx) and digital pin 1 (Tx). An
Page | 9
ATmega16U2 on the board channels this serial communication over USB and appears as
a virtual com port to software on the computer. The ATmega16U2 firmware uses the
standard USB COM drivers, and no external driver is needed. However, on Windows, a
.inf file is required. The Arduino software includes a serial monitor which allows simple
textual data to be sent to and from the Arduino board. There are two RX and TX LEDs
on the arduino board which will flash when data is being transmitted via the USB-to-
serial chip and USB connection to the computer (not for serial communication on pins 0
and 1). A SoftwareSerial library allows for serial communication on any of the Uno's
digital pins. The ATmega328P also supports I2C (TWI) and SPI communication. The
Arduino software includes a Wire library to simplify use of the I2C bus.
When ATmega328 chip is used in place of Arduino Uno, or vice versa, the image below
shows the pin mapping between the two.
Page | 10
Fig - Pin Mapping of Arduino UNO to ATmega328
Software
Programming Arduino
Once arduino IDE is installed on the computer, connect the board with computer using
USB cable. Now open the arduino IDE and choose the correct board by selecting
Tools>Boards>Arduino/Genuino Uno, and choose the correct Port by selecting
Tools>Port. Arduino Uno is programmed using Arduino programming language based
on Wiring. To get it started with Arduino Uno board and blink the built-in LED, load the
example code by selecting Files>Examples>Basics>Blink. Once the example code (also
shown below) is loaded into your IDE, click on the ‘upload’ button given on the top bar.
Once the upload is finished, you should see the Arduino’s built-in LED blinking. Below
is the example code for blinking:
Page | 11
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
void loop() {
Applications
Page | 12
Arduino UNO 2D Model :
Page | 13
HARDWARE & SOFTWARE REQUIRED :
1. ARDUINO UNO
2. BREAD BOARD
3. L298N H-bridge
4. HC-SR04 sensor
5. SG90 Servo
6. DC Motors and Wheels
7. Front Wheel 360
8. Male to Male & Female to Female jumper wires
9. 9v Battery * 2
10.9v Battery power cable
ARDUINO UNO :
Arduino is a single-board microcontroller meant to make
the application more accessible which are interactive objects and its
surroundings. The hardware features with an open-source hardware board
designed around an 8-bit Atmel AVR microcontroller or a 32-bit Atmel ARM.
Current models consists a USB interface, 6 analog input pins and 14 digital
I/O pins that allows the user to attach various extension boards.
BREADBOARD:
A thin plastic board used to hold electronic components
(transistors, resistors, chips, etc.) that are wired together. Used to develop
prototypes of electronic circuits, the boards can be reused for future jobs.
Breadboards can also be used to create one-of-a-kind systems, although
commercial products placed on printed circuit boards are typically much
more robust and can handle greater frequencies.
Page | 14
L298N H-bridge :
This allows you to control the speed and direction of two
DC motors, or control one bipolar stepper motor with ease. The L298N H-
bridge module can be used with motors that have a voltage of between 5
and 35V DC.
HC-SR04 sensor :
HC-SR04 is an ultrasonic ranging module that provides 2
cm to 400 cm non-contact measurement function. The ranging accuracy can
reach to 3mm and effectual angle is < 15°. It can be powered from a 5V
power supply.
SG90 Servo :
Tiny and lightweight with high output power. Servo can rotate
approximately 180 degrees (90 in each direction), and works just like the
standard kinds but smaller. You can use any servo code, hardware or library
to control these servos. Good for beginners who want to make stuff move
without building a motor controller with feedback & gear box, especially
since it will fit in small places. It comes with a 3 horns (arms) and hardware.
DC Motors :
A DC motor is any of a class of rotary electrical machines that
converts direct current electrical energy into mechanical energy. The most
common types rely on the forces produced by magnetic fields.
Page | 15
BLOCK DIAGRAM
LEFT
MOTOR
HC-
L298N H- ARDUINO SR04
bridge
sensor
RIGHT
MOTOR
1. Mechanical design
2. Circuit design.
MECHANICAL DESIGN
Page | 16
CIRCUIT DESIGN
a) Sensor part:-
The sensors used in this robot are Infrared sensor,
consisting two part infrared signal generator and the IR receiver designed
in single PCB. There are two sensors are used as left side sensor and right
side sensor and two sensors are used to sense the obstacle on left and
right side.
IR Detector :-
IR detector circuit is a circuit which gives a low output in
absence of IR signal When some obstacle come in path IR signal reflected
back and fall onto the IR detector. In such a way that obstacle are
detected.
b)Control board:-
Control board is the main driver circuit of the robot. It
mainly contains of the microcontroller of Atmel 89C205I and the motor
driver.
Page | 17
Circuit Diagram :
Block Diagram :
Page | 18
Algorithm:-
1.Start
2.Check either switch (p1.6) is on or off
3.If on then go to next step4, otherwise rotate at the same step.
2.Initialize the input port (P3) & output port(P1).
5.Set the bit of port pin 1.0 and pin1.1
6.Read data from port 3.
7.Check the bit on p3.0
8.If bit is present move left motors in Forward direction and stop the right
motor, else go to next step9
9.Check the bit in p3.2
10.If bit is present on pin p3.2,then move right motor in forward direction
until we get high signal on pin p3.2&stop left motor.
11.Again go to step 6.
NOTE
Page | 19
TIMING DIAGRAM :
Page | 20
F ig ure 5: - Flow Chart for the movement of the
Page | 21
Program :
void setup() {
void loop() {
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 you dont get proper movements of your robot then alter the pin
numbers
if (distance > 19)
{
digitalWrite(fwdright7, HIGH); // move forward
Page | 22
digitalWrite(revright6, LOW);
digitalWrite(fwdleft5, HIGH);
digitalWrite(revleft4, LOW);
}
Page | 23
RESULT:
WORKING OF ROBOT
As the robot is switched ON, 1st it will check
either start signal is received or not ,if not then the program counter will
not go to the next address it will remains on the same address until it get a
negative signal. Then the robot continuously check any obstacle in path, if
there is no obstacle then robot will go straight. If any obstacle will found in
left side then the controller send a command to the motor drive to stop the
right motor & move the left motor and just opposite as obstacle found in
right side.
APPLICATION :
Obstacle avoiding technique is very useful in real life,
this technique can also use as a vision belt of blind people by changing the IR
sensor by a kinetic sensor ,which is on type of microwave sensor whose
sensing range is very high and the output of this sensor vary in according to
the object position changes. This technique makes a blind people able to
navigate the obstacle easily by placing three vibrato in left, right and the
centre of a belt named as VISION BELT and makes a blind people able to walk
anywhere.On top of obstacle avoiding robot temperature/pressure sensors
can be added to monitor the atmospheric conditions around. This is useful
in places where the environment is not suitable for humans.
Page | 24
CONCLUSION :
FUTURE SCOPE :
In future, the sensing range can be increased by increasing
the sensor quality with the help of ultrasonic sensor or the IR signal spread
all over the provide area. Performance of this robot can be improved with
the help of Bump sensors, for slow moving robots, Ultrasonic range sensors
for large range up to 6m or LASER range finders. One of the prevailing fields
is the use of camera in robot, Computer vision can be implemented for better
performance.
Page | 25
REFERENCES:
http://www.engineersgarage.com/electronic_circuits.
http://www.electricaltechnology.com/motor_driverl293d.
“Obstacle Avoidance Robot” by K. Bhagt, S. Deshmukh, S. Dhonde, S.
Ghag, V. Waghmare, IJSETR, Volume 5, Issue 2, February 2016, ISSN:
2278 – 7798, pp.439-442 .
“OBSTACLE AVOIDING ROBOT – A PROMISING ONE” by R. Chandra
Kumar, Md. S. Khan, D. Kumar, R. Birua, S. Mondal, M. Kr. Parai,
IJAREEIE, Volume 2, Issue 4, April 2013, ISSN : 2278 – 8875, pp.1430-
1434 [5] “Obstacle Avoidance Robotic Vehicle Using Ultrasonic Sensor,
Android And Bluetooth For Obstacle Detection” by V. Ankit, P. Jigar, V.
Savan, IRJET, Volume: 03, Issue: 02, Feb-2016, ISSN: 2395 -0056,
pp.339-348
Page | 26
Page | 27