Professional Documents
Culture Documents
Obstacle Avoiding Robot
Obstacle Avoiding Robot
Obstacle Avoiding Robot
ON
SUBMITTED BY
OMKAR REVAJE
AKASH UTPURE
KAJAL DHAMAL
SANJAY GUPTA
ACKNOWLEDGEMENT
We have great pleasure to convey our gratitude to Prof. D. K. Nayak, Principal, and VPM’s
POLYTECHNIC for permitting to do this project.
We express our heartiest gratitude and respectful regards to Mrs. K. S. Agashe, Head of
Industrial Electronics Department, and VPM’s POLYTECHNIC for her support and
encouragement while doing the project.
We express our profound sense of gratitude to our internal guide Mrs. Santhi M. Laguduva,
Lecturer of IE Department for her valuable guidance, constructive criticism and consistent
enthusiastic interest during the case of investigation.
We regard our sincere thanks to Mr. Bhore sir he help us during the project and made our
project successful.
Last but not the least our special thanks to our parents and friends for their support and
constant encouragement during the project work.
TABLE OF CONTENTS
ACKNOWLEDGEMENT ..................................................................................................................... II
TABLE OF CONTENTS...................................................................................................................... III
LIST OF FIGURES .............................................................................................................................. IV
1 INTRODUCTION .......................................................................................................................... 2
1.1 INTRODUCTION .................................................................................................................. 2
2 BLOCK DIAGRAM AND OPERATION ...................................................................................... 4
2.1 BLOCK DIAGRAM ............................................................................................................... 4
2.2 OPERATION DIAGRAM ...................................................................................................... 5
3 CIRCUIT DIAGRAM .................................................................................................................... 7
4 PCB DESIGN ............................................................................................................................... 10
5 SOFTWARE ................................................................................................................................. 12
5.1 ALGORITHM OF PROGRAM ............................................................................................ 12
5.2 FLOWCHART ...................................................................................................................... 13
5.3 PROGRAM ........................................................................................................................... 14
5.4 SOFTWARE USED: ............................................................................................................ 22
6 CONCLUSION ............................................................................................................................. 24
6.1 ADVANTAGES ................................................................................................................... 24
6.2 LIMITATIONS ..................................................................................................................... 24
6.3 APPLICATIONS .................................................................................................................. 24
6.4 FUTURE SCOPE.................................................................................................................. 25
7 COMPONENT LIST .................................................................................................................... 27
8 APPENDIX I: DATASHEETS.................................................................................................... 29
9 BIBLIOGRAPHY ............................................................................................................................ 43
EXTENDED FORMAT........................................................................................................................ 44
LIST OF FIGURES
Figure 1: Obstacle Avoiding Robot …………………………………………………………. 2
CHAPTER
1
INTRODUCTION
1 INTRODUCTION
1.1 Introduction
CHAPTER
2
BLOCK DIAGRAM
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.
CHAPTER
3
CIRCUIT DIAGRAM
3 CIRCUIT DIAGRAM
Operation:
The obstacle avoidance robotic vehicle uses ultrasonic sensors for its movements. A
microcontroller of 8051 family is used to achieve the desired operation. The motors are
connected through motor driver IC to microcontroller. 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
microcontroller. The microcontroller 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).
CHAPTER
4
PCB DESIGN
4 PCB DESIGN
CHAPTER
5
SOFTWARE
5 SOFTWARE
5.1 Algorithm of Program
A brief overview of the software function and the system architecture is shown in Figure 5 to clarify
the cyclic phase rotation for robot movement. From the flowchart, the calling sequence and the
relationship between the functions are visualized. The algorithm and corresponding flowchart has
been shown here.
1.Start
8. If bit is present move left motors in Forward direction and stop the right motor, else go to
next step9
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.
5.2 Flowchart
START
CHECK START
SINGNAL?
IS OBSTACLE
DETECTED?
STOP
5.3 Program
Servo myservo;
// defines variables
long duration;
int distance;
int distance_f;
int distance_r;
int distance_l;
int maxLowDistance=70;
void setup() {
pinMode(lm1,OUTPUT);
pinMode(lm2,OUTPUT);
pinMode(rm1,OUTPUT);
pinMode(rm2,OUTPUT);
myservo.attach(servoPin);
myservo.write(90);
void loop() {
distance_f=ping();
front();
delay(400);
}else{
Break();
get_Distance();
right();
delay(400);
front();
left();
delay(400);
front();
}else{
back();
delay(400);
Break();
void displayDistance(){
Serial.print(distance_r);
Serial.println("");
Serial.print(distance_f);
Serial.println("");
Serial.print(distance_l);
Serial.println("");
void front(){
Serial.println("Forward Move");
digitalWrite(lm2,HIGH);
digitalWrite(rm2,HIGH);
digitalWrite(lm1,LOW);
digitalWrite(rm1,LOW);
void back(){
Serial.println("Back Move");
digitalWrite(lm1,HIGH);
digitalWrite(rm1,HIGH);
digitalWrite(lm2,LOW);
digitalWrite(rm2,LOW);
void left(){
digitalWrite(rm2,HIGH);
digitalWrite(rm1,LOW);
digitalWrite(lm1,HIGH);
digitalWrite(lm2,LOW);
void right(){
digitalWrite(lm2,HIGH);
digitalWrite(lm1,LOW);
digitalWrite(rm1,HIGH);
digitalWrite(rm2,LOW);
void Break(){
digitalWrite(lm2,LOW);
digitalWrite(lm1,LOW);
digitalWrite(rm1,LOW);
digitalWrite(rm2,LOW);
void get_Distance(){
myservo.write(0);
delay(500);
int temp_r1=ping();
myservo.write(45);
delay(500);
int temp_r2=ping();
if(temp_r1<temp_r2){
distance_r=temp_r1;
}else{
distance_r=temp_r2;
myservo.write(90);
delay(500);
distance_f=ping();
myservo.write(135);
delay(500);
int temp_l1=ping();
myservo.write(180);
delay(500);
int temp_l2=ping();
if(temp_l1<temp_l2){
distance_l=temp_l1;
}else{
distance_l=temp_l2;
myservo.write(90);
int ping(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
// Reads the echoPin, returns the sound wave travel time in microseconds
distance= duration*0.034/2;
return distance;
Arduino
CHAPTER
6
CONCLUSION
6 CONCLUSION
6.1 Advantages
Whenever it senses any obstacle it automatically diverts its path to left and right
and follows the path without human guidance.
The programing of the microcontroller is easy.
It is low cost circuit
6.2 Limitations
6.3 Applications
This logic has been specially designed for vacuum cleaner. By using heavy rating
motors, strong mechanical structure and using highly sensitive obstacle sensors, it
efficiently work as vacuum cleaner.
Just by making small changes in software this system can be used for avoiding
concealed paths. This robot can effectively sense the obstacles and find out correct
path.
In Mines.
CHAPTER
7
COMPONENT LIST
7 COMPONENT LIST
CHAPTER
8
APPENDIX
DATASHEETS
APPENDIX I: DATASHEETS
Arduino UNO:
The Arduino Uno is a microcontroller board based on the AT mega 328(datasheet). It has 14
digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16
MHz ceramic resonator, 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. The Uno
differs from all preceding boards in that it does not use the FTDI USB-to-serial driver chip.
Instead, it features the AT mega 16U2 (Atmega8U2up to version R2) programmed as a USB-
to-serial converter.
Summary:
Microcontroller ATmega328
Operating Voltage 5V
Boot loader
SRAM 2 KB (ATmega328)
Power:
The Arduino Uno can be powered via the USB connection or with an external power supply.
The power source is selected automatically. External (non-USB) power can come either from
an AC-to-DC adapter (wall-wart) or battery. The adapter can be connected by plugging a
2.1mm center-positive plug into the board's power jack. Leads from a battery can be inserted
in the Gnd and Vin pin headers of the POWER connector. The board can operate on an
external supply of 6 to 20 volts. If supplied with less than 7V, however, the 5V pin may
supply less than five volts and the board may be unstable. If using more than 12V, the voltage
regulator may overheat and damage the board. The recommended range is 7 to 12 volts. The
power pins are as follows:
VIN. The input voltage to the Arduino board when it's using an external power source (as
opposed to 5 volts from the USB connection or other regulated power source). You can
supply voltage through this pin, or, if supplying voltage via the power jack, access it through
this pin.
5V.This pin outputs a regulated 5V from the regulator on the board. The board can be
supplied with power either from the DC power jack (7 - 12V), the USB connector (5V), or
the VIN pin of the board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the
regulator, and can damage your board. We don't advise it.
3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50
mA.
Rather than requiring a physical press of the reset button before an upload, the Arduino Uno
is designed in a way that allows it to be reset by software running on a connected computer.
One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the
reset line of the ATmega328 via a 100 Nano farad capacitor. When this line is asserted (taken
low), the reset line drops long enough to reset the chip. The Arduino software uses this
capability to allow you to upload code by simply pressing the upload button in the Arduino
environment. This means that the bootloader can have a shorter timeout, as the lowering of
DTR can be well-coordinated with the start of the upload. This setup has other implications.
When the Uno is connected to either a computer running Mac OS X or Linux, it resets each
time a connection is made to it from software (via USB). For the following halfsecond or so,
the bootloader is running on the Uno. While it is programmed to ignore malformed data (i.e.
anything besides an upload of new code), it will intercept the first few bytes of data sent to
the board after a connection is opened. If a sketch running on the board receives one-time
configuration or other data when it first starts, make sure that the software with which it
communicates waits a second after opening the connection and before sending this data. The
Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the
trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able
to disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this
forum thread for details.
The Arduino Uno has a resettable poly face that protects your computer's USB ports from
shorts and overcurrent. Although most computers provide their own internal protection, the
fuse provides an extra layer of protection. If more than 500 mA is applied to the USB port,
the fuse will automatically break the connection until the short or overload is removed.
Physical Characteristics:
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes
allow the board to be attached to a surface or case. Note that the distance between digital pins
7 and 8 is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.
Ultrasonic Definition:
The human ear can hear sound frequency around 20HZ ~ 20KHZ, and ultrasonic is the sound
wave beyond the human ability of 20 KHz.
Ultrasonic transmitter emitted an ultrasonic wave in one direction, and started timing when it
launched. Ultrasonic spread in the air, and would return immediately when it encountered
obstacles on the way. At last, the ultrasonic receiver would stop timing when it received the
reflected wave. As Ultrasonic spread velocity is 340m / s in the air, based on the timer record
t, we can calculate the distance (s) between the obstacle and transmitter, namely: s = 340t / 2,
which is so- called time difference distance measurement principle The principle of ultrasonic
distance measurement used the already-known air spreading velocity, measuring the time
from launch to reflection when it encountered obstacle, and then calculate the distance
between the transmitter and the obstacle according to the time and the velocity. Thus, the
principle of ultrasonic distance measurement is the same with radar. Distance Measurement
formula is expressed as: L = C X T In the formula, L is the measured distance, and C is the
ultrasonic spreading velocity in air, also, T represents time (T is half the time value from
transmitting to receiving).
Ultra-sonic Applications:
Ultrasonic Application Technology is the thing which developed in recent decades. With the
ultrasonic advance, and the electronic technology development, especially as high-power
semiconductor device technology matures, the application of ultrasonic has become
increasingly widespread:
Product Features:
Stable performance
Accurate distance measurement
High-density
Small blind
Application Area:
Robotics barrier
Object distance measurement
Level detection
Public security
Parking detection
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
Specifications:
• Weight: 9 g
• Temperature range: 0 ºC – 55 ºC
Basic Information:
Modulation : Analog
Rotation/Support: Bushing
DESCRIPTION :
The Device is a monolithic integrated high voltage, high current four channel driver designed
to accept standard DTL or TTL logic levels and drive inductive loads (such as relays
solenoids, DC and stepping motors) and switching power transistors. To simplify use as two
bridges each pair of channels is equipped with an enable input. A separate supply input is
provided for the logic, allowing operation at a lower voltage and internal clamp diodes are
included. This device is suitable for use in switching applications at frequencies up to 5 kHz.
The L293D is assembled in a 16 lead plastic package which has 4 center pins connected
together and used for heat sinking The L293DD is assembled in a 20 lead surface mount
which has 8 center pins connected together and used for heat sinking.
Pin Direction:
Thermal Data:
Block Diagram:
Electrical Characteristics:
Japan Servo’s DC Miniature Motors are widely used in a variety of application fields, from
copiers and other office equipment, to remote-controlled equipment, medical equipment,
vending machines, and game machines. These motors may be combined with Japan Servo’s
full line of gearheads to meet a wide range of torque and output speed specifications. Japan
Servo provides a practical and economic choice as drive actuators. Strict quality control
ensure reliable performance as well as prompt delivery at reasonable price. Japan Servo
provides a full variation line-up of stock model and customized design motors to best meet
your specific application needs.
Features:
12V – 200RPM
3.6KG•CM torque DC gearhead motor
30:1 Gear Ratio
2mm rear encoder shaft
Good compromise between speed and torque for small robotic designs
Solutions Cubed does not authorize any Solutions Cubed product for use in life support
devices and/or systems without express written approval from Solutions Cubed.
Warrantee:
Solutions Cubed warrants all products against defects in materials and workmanship for a
period of 90 days. If you discover a defect, we will, at our option, repair or replace your
product or refund your purchase price. This warrantee does not cover products that have been
physically abused or misused in any way.
9V Battery:
Specifications:
Classification : Alkaline
CHAPTER
9
BIBLIOGRAPHY
9 BIBLIOGRAPHY
N. Senthil Kumar, M. Saravanan, S Jeebananthan ,“Microprocessors &
Microcontrollers”, Oxford University Press,4th Edition,2012,ISBN:978-0- 19-
806647-7
B. Ram, “Fundamental of Microprocessors & Microcontrollers”, Dhanpat Rai
Publication, Seventh Edition, ISBN:978-81-89928-60-5
M. C. Lam, A. S. Prabuwono, H. Arshad, C. S. Chan, “A Real-Time Vision-Based
Framework for Human-Robot Interaction”, , 7066Lecture Notes .in Computer Science
(Part 1),2011, pp. 257-267, IVIC 2011.
T. Ishida, and Y. Kuroki, “Sensor System of a small Biped Entertainment Robot”,
Advanced Robotics, © VSP and Robotics Society of Japan,Vol. 18, No. 10, pp 1039-
1052, 2004,.
Maikoto T., Koji Y., and Satoshi E., “Studies on Forward Motion of Five Legs
Robot”, Journal Code: L0318B 2005, 2P1-S-065, 2005.
Proceedings of Cooperative Intelligent Robotics in space-II SPIE vol. 1612, Boston,
Nov 1991.
R. A Besari, R. Zamri, A. S. Prabuwono, and S. Kuswadi, “The Study on Optimal
Gait for Five-Legged Robot with Reinforcement Learning”, Intelligent .Robotics and
Applications, , Vol. 5928, pp. 1170-1175, 2009.
Extended Format
Acknowledgement
Table of Contents
List of Figures
1. Introduction
1.1. Aims
1.2. Objectives
1.3. Scope
1.4. Report Structure
2. Background Research
3. Design Specification
4. The System
1. Introduction
2 Block Diagram
Block Diagram
Operation Diagram
3 Circuit Diagram
4 PCB Design
5 Software
Algorithm of Program
Flowchart
Program
5. Testing
7. Conclusions
Advantages
Limitations
Applications
Future Scope
8 Component List
9 Bibliography