Documente Academic
Documente Profesional
Documente Cultură
________________ ________________
Internal Guide H.O.D./Coordinator
Date:____________ ______________
Examiner
College Seal
1
PROFORMA FOR THE APPROVAL PROJECT PROPOSAL
Osama Shaikh
Signature of Coordinator
Date: _______________
2
OBSTACLE AVOIDING ROBOT USING
ARDUINO
A Project Report
Submitted in partial fulfillment of the
Requirements for the award of the Degree of
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
By
Osama Shaikh
4067991
3
CHETANA’s HAZARIMAL SOMANI COLLEGE OF COMMERCE &
ECONOMICS, SMT. KUSUMTAI CHAUDHARI COLLEGE OF ARTS,
SELF FINANCING COURSES
(Affiliated to University of Mumbai)
MUMBAI, 400051
MAHARASHTRA
2018-2019
CERTIFICATE
This is to certify that the project entitled, "Obstacle Avoiding Robot using Arduino", is done by
Osama Shaikh bearing Seat. No: 4067991 submitted in partial fulfillment of the requirements for
the award of degree of BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY from
University of Mumbai.
___________________ _______________________
Internal Guide Coordinator B.Sc. (IT)
____________________
External Examiner
4
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 micro-controller. 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.
5
ACKNOWLEDGEMENT
First, I would like to thank Prof. Swantika Kaushik, my project advisor, for guiding me through
each and every step of the process with knowledge and support.
Thank you for your advice, guidance and assistance.
I am sincerely thankful to the Coordinators of B.Sc-I.T Prof. Swantika Kaushik, for their active
involvement, valuable suggestions and constant support during the preparation of the project.
Without their diligent and hard work it would have not been possible for us to complete the
project in record time.
I also owe a debt of gratitude to all those who helped us in the development of this book.
I am grateful to all the teaching and non-teaching staff, those who directly and indirectly helped
us to make this report a successful one. I am also thankful to friends and family for helping us
out in making this project a big success.
This project imparted a great deal of practical experience, which will be helpful for us in the near
future.
Osama Shaikh
4067991
6
DECLARATION
I hereby declare that Project entitled, “Obstacle Avoiding Robot” done at (place where
Project is done), has not been in any case duplicated to submit to any other university for award
of any degree. To best of my Knowledge other than me, no one has submitted to any other
university.
The Project is done in partial fulfillment of requirements for award of degree of
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY) to be submitted as final
semester project as part of our curriculum.
7
TABLE OF CONTENTS
Sr. Topic Name Page No
No.
1. Introduction
1.1 Background 12
1.2 Objectives 13
1.3 Purpose 13
1.4 Scope 13
2. System Analysis
2.1 Current System 14
2.2 Proposed System 14
3. System Design
3.1 Module Division 22
3.2 Use Case Diagram 23
3.5 ER Diagram 32
8
List of Tables
Sr. No. Table Name Page No.
1 Gantt Chart 21
List of Figures
Sr. No. Figure Name Page No.
1 Use Case Diagram 25
2 Activity Diagram 28
3 Class Diagram 31
4 ER Diagram 33
5 Sequence Diagram 34
6 Data Flow Diagram- Level 0 36
7 Data Flow Diagram- Level 1 37
8 Data Flow Diagram- Level 2 38
9 State Transition Diagram 39
9
Chapter 1
Introduction
# What is robotics?
● Robotics is the term used in artificial intelligence that deals with a study of creating
intelligent and efficient robots.
● The word robotics is used to collectively define a field in engineering that covers the
mimicking of various human characters.
# Why robotics?
● This sort of project is very much useful in the industries where the automated supervision
is required.
● Helps your student develop an intuitive understanding of physical concepts in science and
math
10
# What is obstacle avoidance?
● The obstacle avoidance robotics is used for detecting obstacles and avoiding the
collision.
● Some sensing devices used for obstacle detection like bump sensor, infrared sensor,
ultrasonic sensor etc.
● The obstacle avoidance robotic vehicle uses ultrasonic sensors for its movements.
11
# My project
The project is designed to build an obstacle avoidance robotic vehicle using ultrasonic sensors
for its movement. An Arduino Uno is used to achieve the desired operation. A robot is a machine
that can perform task automatically. Robotics is generally a combination of computational
intelligence and physical machines (motors). Computational intelligence involves the
programmed instructions. The project proposes robotic vehicle that has an intelligence built in it
such that it guides itself whenever an obstacle comes ahead of it. This robotic vehicle is built,
using an Arduino Uno. An ultrasonic sensor is used to detect any obstacle ahead of it and sends a
command to the Arduino. In today’s world robotics is a fast growing and interesting field. robot
has sufficient intelligence to cover the maximum area of provided space. Autonomous Intelligent
Robots are robots that can perform desired tasks in unstructured environments without
continuous human guidance. The obstacle detection is primary requirement of this autonomous
robot. The robot gets the information from surrounding area through mounted sensors on the
robot.
1.1 BACKGROUND
12
1.2 OBJECTIVES
The objective of having obstacle avoiding robot is to enable autonomous functioning without
human supervision. ... IR sensors are widely used for measuring distances, so they can be used in
robotics for obstacles avoidance. IR sensors are also faster in response time than ultrasonic
sensors. The obstacle detection is primary requirement of this autonomous robot. The robot gets
the information from surrounding area through mounted sensors on the robot. Some sensing
devices used for obstacle detection like bump sensor, infrared sensor, ultrasonic sensor etc.
Ultrasonic sensor is most suitable for obstacle detection and it is of low cost and has high
ranging capability.
1.3 PURPOSE
The aim of this project is to implement an obstacle avoiding robot using ultrasonic sensor and
Arduino. All the connections are made as per the circuit diagram. The working of the project is
explained below. An Obstacle Avoidance Robot is an intelligent robot, which can automatically
sense and overcome obstacles on its path. It contains of a Microcontroller to process the data,
and Ultrasonic sensors to detect the obstacles on its path. Obstacle avoidance is one of the most
important aspects of mobile robotics
1.4 SCOPE
The project uses uc P89V51RD2 as the controlling element. It uses IR (Infra Red) sensors and
two IR transmitting circuitry. When the obstacle comes in path of robot IR beam is reflected
from the obstacle then sensor gives zero voltage to uc. This zero voltage is detected then uc
decides to avoid the obstacle by taking left or right turn. If the sensor gives +5v to uc that means
there is no obstacle present in it path so it goes straight until any obstacle is detected. The two IR
transmitter circuits are fitted on front and left side of robot. The two IR sensors are placed near to
transmitters' IR LEDs. The connections can be given from main circuit to sensors using simple
twisted pair cables. Two motors namely right motor and left motor are connected to driver IC
(L293D). L293D is interface with uc Micro-controller sends logic 0 & logic 1 as per the
programming to driver IC which moves motors forward or reverse direction.
13
Chapter 2
System Analysis
14
2.3 Software Requirement
15
2.5 Component Description
● Arduino Uno
2. Arduino Uno has 14 digital I/O pins out of which 6 pins are used in this project.
3. A USB connection.
4. A power jack.
16
● HC – SR04
2. The HC-SR04 ultrasonic sensor uses SONAR to determine the distance of an object just
like the bats do.
3. Most ultrasonic sensors are based on the principle of measuring the propagation time of
sound between send and receive
4. Typical applications:
Distance measurement
Stack height measurement
17
● L293D Motor Driver
1. L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any
direction.
2. L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive
on either direction.
3. It is a motor driver which can provide bi-directional drive current for two motors.
● Servo Motor
1. The Tower Pro SG90 is a simple Servo Motor which can rotate 90 degrees in each direction
(approximately 180 degrees in total).
2. A servomotor is a rotary actuator or linear actuator that allows for precise control of
angular or linear position, velocity and acceleration.
18
2.6 Justification of Selection of Technology
#Arduino
● Arduino is a rapid electronic prototyping platform composed by the Arduino board and
the Arduino IDE.
● The Arduino board is a microcontroller board, which is a small circuit (the board) that
contains a whole computer on a small chip (the microcontroller). There are different
versions of the Arduino board: they are different in components, aim and size, etc.
#Why Arduino
● It is an open-source project, software/hardware is extremely accessible and very flexible
to be customized and extended.
● It is flexible, offers a variety of digital and analog inputs, SPI and serial interface and
digital and PWM outputs.
● It is easy to use, connects to computer via USB and communicates using standard serial
protocol, runs in standalone mode and as interface connected to PC/Macintosh
computers.
● It is inexpensive, around 30 euro per board and comes with free authoring software.
● Arduino is backed up by a growing online community, lots of source code is already
available and we can share and post our examples for others to use, too!
#Arduino IDE
● The other component of the Arduino platform is the Arduino IDE. This contains all the
software which will run a computer in order to program and communicate with an
Arduino board.
● The Arduino IDE contains an editor which we can use to write sketches (that's the name
of Arduino programs) in a simple programming language modeled after the Processing
language.
● Using the IDE the program we wrote is converted to C language and then compiled
using avr-gcc. This process produce binary code wich the microcontroller on the
Arduino board will be able to understand and execute.
● When the Arduino board is connected to a computer using the USB cable, by using the
IDE we are able to compile and upload to the board the program.
19
20
2.7 Gantt Chart
• A Gantt chart is a type of bar chart that illustrates a Project schedule.
• Gantt charts illustrate the start and finish dates of the terminal elements and summary elements
of a project. Terminal elements and summary elements comprise the work breakdown structure
of the project.
21
Chapter 3
System Design
ii) Sensors- This module provides the working of sensors which helps to detect
objects in the environment.
22
3.2 Use Case Diagram
Importance of Use Case Diagram:
Use case diagram are used to gather a usage requirement of a system.
Depending on your requirement you can use that data in different ways.
Below are few ways to use them.
1) Robot:
Robot in a use case diagram is a machine based on Arduino development board. This could be
any car varying according to size, model and form factor. It's drawn in a box as show below.
23
2) Obstacle:
An obstacle in use case represents a piece of object placed in the environment. Its drawn as a box
and named with the function as show below-
3) Environment:
Environment is used to define the surrounding in which object and robot are placed.
This an optional element but useful when your visualizing large systems.
It is represented as shown below:-
4) Detecting:
Detecting is an element that can be defined as the process of identifying whether there's an object
in surrounding or not. It is drawn like the image shown below-
5) Finding path:
Finding path can be defined as the process to find an alternative path for robot.
It is represented as given below-
6) Avoiding obstacles:
Avoiding Obstacles can be defined as the process of dodging/neglecting the obstacles in
surrounding. It is represented as given below-
24
Use Case Diagram –
25
3.3 Activity Diagram
An activity diagram illustrates the dynamic nature of a system by modeling the flow of control
from activity to activity. An activity represents an operation on some class in the system that
results in a change in the state of the system. Typically, activity diagrams are used to model
workflow or business processes and internal operation.
2) Action Flow
3) Object Flow
Object flow refers to the creation and modification of objects by activities. An object flow arrow
from an action to an object means that the action creates or influences the object. An object flow
arrow from an object to an action indicates that the action state uses the object.
26
4) Initial State
5) Final State
An arrow pointing to a filled circle nested inside another circle represents the final action state.
5) Branching
A diamond represents a decision with alternate paths. The outgoing alternates should be labeled
with a condition or guard expression. You can also label one of the paths "else."
SYNCHRONIZATION
A synchronization bar helps illustrate parallel transitions. Synchronization is also called forking
and joining.
27
Activity Diagram –
28
3.4 Class Diagram
Class diagrams are the backbone of almost every object-oriented method including UML. They
describe the static structure of a system.
Class diagram shows all classes and their relationships a structure. It could contain main
attributes and operations for each class. And this paper defines each behavior as a class, and uses
operations of each class to represent sub-goals of every behavior. Given Fig is the class diagram,
and the super- class in this diagram is from development kit of the mobile robot AS-R [16]. All
classes representing behaviors inherit the class ’robotASR’, which stands for a robot system. The
dashed line with an arrow shows associative relationship between two classes and the direction
for message transfer.
Illustrate classes with rectangles divided into compartments. Place the name of the class in the
first partition, list the attributes in the second partition, and write operations into the third.
1) Active Class
Active classes initiate and control the flow of activity, while passive classes store data and serve
other classes. Illustrate active classes with a thicker border.
2) Visibility
Use visibility markers to signify who can access the information contained within a class. Private
visibility hides information from anything outside the class partition. Public visibility allows all
other classes to view the marked information. Protected visibility allows child classes to access
information they inherited from a parent class.
29
3) Multiplicity
Place multiplicity notations near the ends of an association. These symbols indicate the number
of instances of one class linked to one instance of the other class.
Composition is a special type of aggregation that denotes a strong ownership between Class A
and Class B. Illustrate composition with a filled diamond. Use a hollow diamond to represent a
simple aggregation relationship, in which the "whole" class plays a more important role than the
"part" class, but the two classes are not dependent on each other.
5) Generalization
Generalization is another name for inheritance or an "is a" relationship. It refers to a relationship
between two classes where one class is a specialized version of another.
30
Class Diagram – For The System
31
3.5 ER Diagram
32
Entity Relationship Diagram –
33
3.6 Sequence Diagram
Direction of Arrows:
● Direction indicates which object’s method is being called by whom.
● A circulating arrow on the Object Lifeline is for a self method - called within the object
by itself.
Sequence Diagram-
34
3.7 Data Flow Diagram
• A data flow diagram (DFD) is a graphical representation of the "flow" of data through
information system.
● DFD’s can also be used for the visualization of data processing (structured design).
● A DFD shows what kind of information will be input to and output from the system
where the data will come from and go to and where the data will be stored.
● Data flow diagrams are one of the three essential perspectives of the Structured
Systems analysis and Design Method (SSADM).
● With a data flow diagram, users are able to visualize how the system will operate,
what the system will accomplish, and how the system will be implemented.
Representation of Components:
DFDs involve four symbols. They are:
1. Process:
Transform of incoming data flow(s) to outgoing flow(s).
2. Data Flow
Movement of data in the system.
3. Data Store
Data repositories for data that are not moving. It may be as simple as abuffer or a queue or a s
sophisticated as a relational database.
________________________
________________________
35
4. External Entity
Sources of destinations outside the specified system boundary.
36
Figure 6(b)– Data Flow Diagram
37
Figure 6(c)– Data Flow Diagram
38
3.8 State Transition Diagrams
● State transition diagrams have been used right from the beginning in object-oriented
modeling. The basic idea is to define a machine that has a number of states (hence the
term finite state machine). The machine receives events from the outside world, and each
event can cause the machine to transition from one state to another.
● A state diagram is a type of diagram used in computer science and related fields to
describe the behavior of systems. State diagrams require that the system described is
composed of a finite number of states; sometimes, this is indeed the case, while at other
times this is a reasonable abstraction.
39
(B) The State Transition Diagram for Finding Path Behavior
40
(C) State Transition Diagram for Obstacle Avoidance Behavior
41