You are on page 1of 41

CERTIFICATE

This is to certify that the Project work in


_________________________________________________________
as entered in this journal and is as per syllabus prescribed by the University of
Mumbai, was done in the _________________________,Laboratory of the
Chetana’s Hazarimal Somani College of Commerce & Economics, Smt. Kusumtai
Chaudhuri College of Arts, Self – Financing Courses, Bandra (East) Mumbai -
400051 by Mr./Ms. ___________________________________________
Student of the class_______________Roll No./ Seat No. _______________
during the academic year 2018-19 first half of 2018 .

________________ ________________
Internal Guide H.O.D./Coordinator

Date:____________ ______________
Examiner

College Seal

1
PROFORMA FOR THE APPROVAL PROJECT PROPOSAL

PNR No. : 2016016402472854 Roll No. : 4067991

Name of the Student

Osama Shaikh

Title of the Project

Obstacle avoiding Robot using Arduino

Name of the Guide

Prof. Swantika Kaushik

Teaching Experience of Guide ______5______________

Is this your First Submission? Yes No

Signature of the Student Signature of the Guide

Date: ______________ Date: ______________

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

Under the esteemed guidance of


Mrs. Swantika Kaushik

DEPARTMENT OF INFORMATION TECHNOLOGY


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

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

DEPARTMENT OF INFORMATION TECHNOLOGY

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

Date: College Seal

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.

Name: Osama Shaikh


Seat No: (Roll No: 4067991)

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

2.3 Software Requirement 15


2.4 Hardware Requirement 15
2.5 Component Description 16
2.6 Justification of Selection of Technology 19
2.7 Gantt Chart 21

3. System Design
3.1 Module Division 22
3.2 Use Case Diagram 23

3.3 Activity Diagram 26

3.4 Class Diagram 29

3.5 ER Diagram 32

3.6 Sequence Diagram 34

3.7 Data Flow Diagram 35

3.8 State Transition Diagram 39

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.

● It must be able to perform certain tasks we set for it.

● The desired task must be achieved within some given limitations

● It may be human controlled or automatic.

# Why robotics?

● Mobile perform various ways of tasks to serve human.

● No human guidance is required.

● This sort of project is very much useful in the industries where the automated supervision
is required.

● Makes learning fun, engaging, and inspiring.

● Develops critical thinking skills and problem solving strategies.

● 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.

● Obstacle avoidance is one of the most important aspects of mobile robotics.

● Without it robot movement would be very restrictive and fragile.

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

Development of an obstacle avoiding robot model is required as a fundamental step towards a


bigger goal, for example development of an autonomous vehicle. An obstacle avoiding robot
uses a proximity sensor module, besides other parts. In this case, this robot uses a proximity
sensor developed by ourselves. The robot is controlled by a program that is embedded into a
microcontroller. The logics produced by the microcontroller are further processed by an interface
module, in this case, also developed by ourselves. The interface module translates
microcontroller’s logics into voltage and current that can practically drive the two motors. This
article provides a report on the project activity, consisting of summary of the design, summary of
the development process and report on the running test of the robot. Following the test and
program fine-tuning, it has been proven that the robot model operated well just as programmed.
Index Terms- obstacle avoiding, obstacle avoidance, proximity sensor, mobile robot, interface
module for robot.

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

2.1 Current System


● In simple robot, steering algorithm is used for robotic actions in which driver or a
human being is controlling the robot using remote.
● Here driver is present, who can see the obstacles and navigate robot accordingly.

Disadvantages of Current System –

● Need of a driver or a human controlling robot thru steering algorithm.


● Time consuming and slow process.
● Dependent technology.
● High maintainability and money consuming.

2.2 Proposed System


● The project proposes an autonomous robotic vehicle, in which no remote is used
for controlling the robotic actions.
● It intelligently detects obstacles present on its path through the sensors, avoid it
and take decisions on the basis of internal code that we set for it.

Benefits of Proposed System –

● No need of a person or a driver to control it.


● Fast and efficient.
● Independent technology.
● Adequate performance and maintainability.

14
2.3 Software Requirement

● Arduino Software (can be downloaded from the internet)

2.4 Hardware Requirements


● Arduino Uno
● Ultrasonic Range Finder Sensor – HC – SR04
● Motor Driver IC – L293D
● Jumper wires
● Voltage regulator L7805CV
● Servo Motor (Tower Pro SG90)
● Geared Motors x 2
● Robot Chassis
● Power Supply
● Breadboard

15
2.5 Component Description
● Arduino Uno

1. Arduino Uno is an ATmega 328p Microcontroller based prototyping board.


It is an open source electronic prototyping platform that can be used with various
sensorstuators.

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

1. It is an Ultrasonic Range Finder Sensor. It is a non-contact based distance measurement


system and can measure distance of 2cm to 4m.

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.

3. It consists of a suitable motor coupled to a sensor for position feedback.

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.

Task Name Starting Month Duration (Months) Ending Month


Information Gathering July 1½ September
Planning September 2 November

21
Chapter 3
System Design

3.1 Module Division


i) Arduino IDE- This module provides an interface to manage the entire software.

ii) Sensors- This module provides the working of sensors which helps to detect
objects in the environment.

iii) Arduino- This module is a development board based on which project is


implemented.

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.

● To identify functions and how roles interact with them –


The primary purpose of use case diagrams.
● For a high level view of the system –
You can highlight the roles that interact with the system and the functionality provided by
the system without going deep into inner workings of the system.
● To identify internal and external factors –
This might sound simplebut in large complex projects a system can be identified as an
externalrole in another use case.

Use Case Diagram objects:


Use case diagrams consist of 6 objects.

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 –

Figure-1 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.

Activity Diagram Notations


1) Action State

Action states represent the non interruptible actions of objects.

2) Action Flow

Action flow arrows illustrate the relationships among action states.

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

A Filled Circle Followed By An Arrow Represents The Initial Action 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 –

Figure 2- Activity Diagram for The System

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.

Class Diagram Notations

Classes represent an abstraction of entities with common characteristics. Associations represent


the relationships between classes.

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.

4) Composition and Aggregation

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

Figure 3- Class diagram for The System

31
3.5 ER Diagram

● An entity-relationship diagram (ERD) is a graphical representation of an information


system that shows the relationship between people, objects, places, concepts or events
within that system. An ERD is a data modeling technique that can help define business
processes and can be used as the foundation for a relational database.
1. ERD is unlikely to be helpful on its own in integrating data into a pre-existing
information system.
2. Three main components of an ERD are the entities, which are objects or concepts that can
have data stored about them, the relationship between those entities, and the cardinality,
which defines that relationship in terms of numbers.
3. Finally, cardinality notations define the attributes of the relationship between the entities.
Cardinalities can denote that an entity is optional or mandatory The three main cardinal
relationships are:
1) One-to-one (1:1). For example, if each customer in a database is associated with one
mailing address.
2) One-to-many (1:M). For example, a single customer might place an order for multiple
products. The customer is associated with multiple entities, but all those entities have a single
connection back to the same customer.
3) Many-to-many (M:N). For example, at a company where all call center agents work with
multiple customers, each agent is associated with multiple customers, and multiple customers
might also be associated with multiple agents.

32
Entity Relationship Diagram –

Figure 4- Entity Relationship Diagram for The System

33
3.6 Sequence Diagram

● Sequence Diagram describes interactions among classes in terms of an “exchange of


messages over time”.

Sequence Diagram Notations

● Lifeline: It is a vertical dashed line that represents the “lifetime” of an object.


● Arrows: They indicate flow of messages between objects.
● Activation: It is a thin rectangle showing period of time, during which an object is
performing an action.

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-

Figure 5- Sequence Diagram for The System

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.

Data Flow Diagram –

Figure 6(a)– Data Flow Diagram

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.

State Transition Diagram-

(A) The State Transition Diagram for Detecting Behavior

39
(B) The State Transition Diagram for Finding Path Behavior

40
(C) State Transition Diagram for Obstacle Avoidance Behavior

41

You might also like