Human Gesture Controlled Robotic Arm Thesis
HUMAN GESTURE CONTROLLED
ROBOTIC ARM
by
M.Burhan Hani
EE103135
A Project Report submitted to the
DEPARTMENT OF ELECTRICAL ENGINEERING
in partial fulfillment of the requirements for the degree of
BACHELORS OF SCIENCE IN ELECTRONIC ENGINEERING
Faculty of Engineering
Mohammad Ali Jinnah University
Islamabad
August, 2015
`
Copyright 2015 by MAJU Student
All rights reserved. Reproduction in whole or in part in any form requires the prior
written permission of M.Burhan Hani, M.Usama Qureshi and Shaban Manzoor or
designated representative Mr.Umer Maqbool.
ii
`
We are dedicating our work to Mr. Umar Maqbool as he showed his keen
interest in our project and gave us an opportunity to enhance our
knowledge and encourage us. We also dedicate our work to our parents
as their intentions for our bright future made courage in us to do this job.
iii
`
DECLARATION
It is declared that this is an original piece of my own work, except where
otherwise acknowledged in text and references. This work has not been submitted in
any form for another degree or diploma at any university or other institution for
tertiary education and shall not be submitted by me in future for obtaining any degree
from this or any other University or Institution.
M.Burhan Hani
EE103135
August, 2015
iv
`
C E R T IF IC AT E O F AP P R O VAL
It is certified that the project titled “Human Gesture Controlled Robotic Arm” carried
out by of M.Burhan Hani EE103135, M.Usama Qureshi EE113090 and Shaban
Manzoor EE113071 under the supervision of Mr. Umar Maqbool, Mohammad Ali
Jinnah University, Islamabad, is fully adequate in scope and in quality as a final year
project for the degree of BS of Electronic Engineering.
Supervisor:
------------------------Mr. Umer Maqbool
Assistant Professor
Dept. of Electrical Engineering
Faculty of Engineering
Mohammad Ali Jinnah University, Islamabad
HOD:
----------------------------
Dr. Imtiaz Ahmad Taj
Professor
Dept. of Electrical Engineering
Faculty of Engineering
Mohammad Ali Jinnah University, Islamabad
v
`
ACKNOWLEDGMENT
We have a great pleasure in presenting this project report on “HUMAN GESTURE
CONTROLLED ROBOTIC ARM” and to express our deep regard to towards those who
have offered their valuable time & guidance in our hour of need.
Firstly we express our sincere gratitude to Mentor, the guide of the project who carefully and
patiently tended his valuable time and effort to give directions as well as to correct various
documents with attention and care.
It has been a great honor to do this project in this venerated institution and we would extend
our thanks to Mr. Umer Maqbool who have shared their vast knowledge and experience and
guided us till the end. We do also like to appreciate the consideration of the Faculty members
and colleagues which enabled us to balance our work along with this project.
It was their attitude that inspired us to do such an efficient and relevant work. We wish to
avail this opportunity to express a sense of gratitude and love to all our friends and our family
for their untiring support, strength, help and in short for everything they have done during the
crucial times of the progress of our project.
M.Burhan Hani (EE103135)
1
`
ABSTRACT
Now a day’s robots are controlled by remote, cell phone, or keyboard etc. so we design a
robot that can be controlled by hand gestures and not the old fashioned way by using the
buttons.
The user just needs to wear a small transmitting device on his hand, which includes
a sensor that is an accelerometer in our case.
If we think about cost and required hardware’s all this things increases the complexity,
especially for low level application. We used aluminum material for the Robot’s base. As this
is only a prototype robot, so we didn’t use actual fire proof material. Now the robot that we
have designed is different from others. It does not require any type of type of complex keys
or joysticks. It is a robot which is controlled by accelerometer and a gyroscope which drives
itself according to position of both the sensors.
2
`
TABLE OF CONTENTS
Acknowledgment ..................................................................................................... 1
Abstract. ................................................................................................................... 2
Table of Contents ..................................................................................................... 3
List of Figures .......................................................................................................... 5
List of Tables ........................................................................................................... 5
List of Acronyms/Abbreviations.............................................................................. 6
Chapter 1 .....................................................................................7
Introduction .....................................................................................7
1.1
Objective ...................................................................................................... 7
1.2
Overview ...................................................................................................... 7
1.3
Statement of Problem................................................................................... 7
1.4
Specifications of proposed Solution ............................................................ 8
1.5
Purpose of the project .................................................................................. 8
1.6
Applications of the project ........................................................................... 8
1.7
Project Plan .................................................................................................. 9
1.8
Report Organization ................................................................................... 11
Chapter 2 ................................................................................... 12
Literature review............................................................................ 12
2.1
2.2
Related Technologies ................................................................................. 12
2.1.1
Related Technology 1 .............................................................. 12
2.1.2
Related Technology 2 .............................................................. 12
Related Projects.......................................................................................... 13
2.2.1
Automated Guided Vehicle...................................................... 13
2.3
2.2.2
Line Follower Robotic Vehicle……………………………….14
Related Studies........................................................................................... 16
2.3
Limitations and Bottlenecks ...................................................................... 17
2.4
Summary .................................................................................................... 17
Chapter 3 ................................................................................... 18
Project Design and Implementation ................................................ 18
3.1
Design of Project Hardware/ Software ...................................................... 18
3.2
Implementation procedure ......................................................................... 19
3.3
Details about hardware............................................................................... 20
3
`
3.4
Details about software/ algorithms ............................................................ 21
3.5
Details about simulation / mathematical modeling .................................... 21
3.6
Details of working design prototype .......................................................... 22
3.7
Summary .................................................................................................... 23
Chapter 4 ................................................................................... 24
Tools and Techniques …………. ................................................... 24
4.1
Hardware used with technical specifications ............................................. 24
4.1.1
Arduino Controller ................................................................... 24
4.1.2
Servo Motors............................................................................ 25
4.1.3
Accelerometer .......................................................................... 26
4.1.4
RF Module ............................................................................... 26
4.2
Software(s), simulation tool(s) used .......................................................... 29
4.3
Summary .................................................................................................... 30
Chapter 5 ................................................................................... 31
Project Results & Evaluation .......................................................... 31
5.1
Presentation of the findings ....................................................................... 31
5.1.1
Hardware results ...................................................................... 31
5.1.2
Software results........................................................................ 32
5.1.3
Angle mapping and simmulation ............................................. 33
5.2
Limitations ................................................................................................. 34
5.3
Recommendations ...................................................................................... 34
5.4
Targets and Achievements ......................................................................... 35
5.5
Summary .................................................................................................... 35
Chapter 6 ................................................................................... 36
Conclusion .................................................................................... 36
References ..................................................................................... 37
Appendices(if included) ................................................................. 38
Appendix - A.......................................................................................................... 38
Appendix - B .......................................................................................................... 39
4
`
LIST OF FIGURES
Figure-2.1 Automated Guided Vehicle ......................................................................... 13
Figure-2.2 Block Diagram of AGV .............................................................................. 14
Figure-2.3 Block Diagram of Line Follower................................................................. 14
Figure-2.4 Line Follower .......................................................................................... 15
Figure-3.1 Base of Robotic Arm ................................................................................. 17
Figure-3.2 Arduino connected with Motor ................................................................... 18
Figure-3.3 Gripper Stand .......................................................................................... 19
Figure-3.4 Controller with Sensor............................................................................... 20
Figure-3.5 Arduino with Gyroscope ............................................................................ 21
Figure-3.6 Mathematical Simulation of Sensors ............................................................ 21
Figure-3.7 Base Assembly ......................................................................................... 22
Figure-4.1 Block Diagram......................................................................................... 23
Figure-4.2 Arduino Uno ............................................................................................ 24
Figure-4.3 Arduino interface with Servo ...................................................................... 25
Figure-4.4 Accelerometer .......................................................................................... 26
Figure-4.5 Controller with Transmitter........................................................................ 27
Figure-4.6 Controller with Receiver ............................................................................ 28
Figure-4.7 Software Simulation.................................................................................. 29
Figure-4.8 Software output of Sensor .......................................................................... 30
Figure-5.1 Sensor modeling ....................................................................................... 32
Figure-5.2 Performance Graph .................................................................................. 34
5
`
LIST OF TABLES
Table-1.1 Responsibilities for given task in part 1............................................................ 9
Table-1.2 Responsibilities for given task in part 2.......................................................... 10
Table-5.1 Mapping of Sensors .................................................................................... 33
Table-5.2 Targets & Achievements ............................................................................. 33
6
`
LIST OF ACRONYMS
PC
LED
AC
DC
KHZ
VCC
GND
MIMO
Personal Computer
Light Emitting Diode
Alternate Current
Direct Current
Kilo Hertz
Voltage Source
Ground
Mutiple Inputs, Multiple Outputs
PCB
Printed Circuit Board
LCD
Liquid Crystal Display
W.R.T
With Respect To
MHz
RF
USB
AGV
Mega Hertz
Radio Frequency
Universal Serial Bus
Automated Guide Vehicle
7
`
Chapter 1
INTRODUCTION
1.1 Objective
Our objective is to make the simple device as well as cheap so that it could be mass-produced
and can be used for a number of purposes. A Gesture Controlled robot is a kind of robot that
can be controlled by our hand gestures not by old buttons. We have use the Arduino as the
brain of the project.
We just need to wear a small transmitting device in our hands that
includes an accelerometer and a gyroscope. This will transmit an appropriate command to the
robot so that it can do whatever we want. We are transmitting the signal to mechanical body
by using an RF module for wireless communication.
.
1.2 Overview
We have designed a robotic arm with 2 degrees of freedom that is wirelessly coordinated to a
human arm and can follow the movements of a human arm. It is a robot that can be controlled
by hand gestures and not the old fashioned way by using the buttons. The user just needs to
wear a small transmitting device on his hand that includes a sensor which is an accelerometer
and gyroscope in our case. Movement of hand in specific direction will transmit a command
to robot that will then move in that specific direction. The transmitting device includes an RF
module.
1.3 Statement of Problem
This project aims to implement this robotic arm by interfacing it with motion sensors which
makes the user interface comfortable. Servo motors are great for robotics projects. They are
small in size but pack a big punch and are very energy efficient. The microcontroller controls
the robotic movement by rotating individual Servo Motors connected to each joint. Motors
controlled via Arduino allow the arm to move more precisely and fast enough. Motion
sensors are used to move it to the desired direction in right amount.
8
`
1.4
Specifications of proposed solution
In our Project we used Servo Motors to control the speed of a Robotic Arm. Our robot is
made up of metal segments which are joined by three joints and each joint has a fixed servo
motor inside it. They are small in size but pack a big punch and are very energy efficient. Our
main target was to achieve the required angle and momentum force to move the arm
according to our requirement. It has the ability to generate enough torque to quickly move
according to the user.
1.5
Purpose of the project
The main purpose of the project is to control the Speed and angle of the motors by using
Arduino AtMega. This gives precise angular control of the robotic arm which is not possible
with a regular DC motor. As it is mentioned above that its practical applications are very vast.
Its main applications are in Robotics. The best practical applications are the Robotic Arm and
the Quad Copter. To control the speed and the angle of the turn we use Servo Motors. Servo
Motors are recommended over the stepper motors because in stepper we have to find the
feedback first. This is a complex calculation so servo is preferred over the stepper motors.
This can also be helpful in medical sciences and military purposes.
1.6
Applications of the project
There are some applications of the project which is defined in order to the components used
in the assembly of the whole project. Servo motor mechanism is used in a large number of
applications which are critical in position control. The practical applications of this specific
project are very vast. Its main applications are in Robotics. The best practical applications are
the Robotic Arm and the Quad Copter. To control the speed and the angle of the turn we use
Servo Motors. Accelerometer is use to determine the acceleration of all the 3-axis. Gyroscope
is used to measure the orientation which is totally based on the angular momentum. This is a
very precise device. FR module is used on both ends both communication. This similar
module can be used for multiple applications like remote control, digital audio video
transmission etc. Other practical applications are in Cruise system, mobile cell and navigation
etc. Gesture controlling is very helpful for handicapped and physically disabled people to
achieve certain tasks such as driving a wheel chair.
9
`
1.7
Project Plan
We divided our project within the group in different small task so that each group member
can work on it and learn everything and can teach to other group members what he learnt.
Part-1
Table-1.1 Responsibilities for given task in part 1
10
`
Part-2
Table-1.2 Responsibilities for given task in part 2
11
`
1.8
Report Organization
In 1st phase we have discussed briefly about the conceptual buildup of our project. In this
chapter we have discussed about the hardware and the software part of the project very
briefly. We have talked about the equipment we have used and the coding behind its running
mechanism. As we have discussed that there is not really much hardware design necessary
for this project. We are just wiring up connections from the motors to the Arduino. The
Arduino library makes it much easier to understand how to control a Servo motor compared
to other microcontroller platforms that do not have a dedicated Servo Control library which
makes the task easier. We have also discussed about the problem face during project and the
outcomes of the projects. Project is break at two parts one is hardware and other is software.
We have talked about the equipment we have used and the coding behind its running
mechanism. This project doesn’t contain complex hardware. Complexities are in software
portion. From software we cover sensitivity of mpu6050 and transmitting data and receiving
and give as input to motors.
12
`
Chapter 2
LITERATURE REVIEW
Our gestured controlled robot works on the principle that follows the mechanism of
accelerometer and gyroscopes that receives a signal and then transmit it to the other end
where mechanical body is attached. The most common of all these manufacturing robots is
the robot arm. A typical robot arm is made up of seven segments joined by six joints. Usually
a servo motor is used in order to track the movement of the robot arm. The reason for this is
quite obvious since servo motors are designed to move in exact increments unlike DC
motors.
2.1
Related Technologies
The related technology and component that we can use in our project as well are mentioned
below which follows almost the same mechanism and techniques.
2.1.1 Related Technology 1
(Stepper Motors)
A Stepper motor is a part of a class of motors known as brushless motors these motors have a
shaft but it does not physically touch anything in order to rotate. Relatively stepper motors
work by utilizing electromagnets that are concentrically located around the shaft. The central
shaft rotates as the coils surrounding the electromagnets are brought to various voltage states.
These voltage states create a magnetic polarity between the shaft and the electromagnet
which cause the teeth of the shaft to line up with the teeth of the electromagnet. The motor
can then be induced to spin by having the electromagnets appropriately change their polarity
in a sequential fashion.[7][8][12]
2.1.2 Related Technology 2
(DC Motors)
This DC motor works on the principal when a current carrying conductor is placed in a
magnetic field it experiences a torque and has a tendency to move. This is known as motoring
action. If the direction of current in the wire is reversed the direction of rotation also reverses.
When magnetic field and electric field interacts they produce a mechanical force and this is
what based on the working principle of dc motor established.[7][8]
13
`
2.2
Related Projects
There is a lot of research going on similar to our project. One of them is implicated in past
named as Automated Guided Vehicle.
2.2.1 Automated Guided Vehicle
It is defined as a robot that follows the wires or any kind of marks of defined pattern on the
floor. Laser and IR can also be used for the same project. They are very cheap in cost. In its
structure an IR is fit in transmitter end which sense the pattern which has been programmed
in it which emits infrared lights in forward direction. This robot contained encoders according
to the block of robots used (2 encoders for each block). Sonar sensors were used for obstacle
or object detection. This helps the robot to sense any obstacle and prevent itself towards the
right path. [4][5]
Figure-2.1 Automated Guided Vehicle
14
`
Figure-2.2 Block Diagram of AGV
They are very cheap in cost. In its structure an IR is fit in transmitter end which sense the
pattern which has been programmed in it which emits infrared lights in forward direction.
This helps the robot to sense any obstacle and prevent itself towards the right path.
2.2.2 Line Follower Robot Using Arduino
This line follower robot is basically designed to follow a black line on a white surface. Any
way the same project can be used to follow the opposite configuration with appropriate
changes in the software. The entire hardware of this simple line follower robot using arduino
can be divided into three parts which are sensors, arduino board and the motor driver circuit.
Let’s have a look at the sensor first.
. Figure-2.3 Block Diagram of Line Follower
15
`
The sensor consists of two LED/LDR pairs with appropriate current limiting resistors. The
resistance of an LDR is inversely proportional to the intensity of the light falling on it. The
arduino board has to be programmed to keep the robot in correct path. This is done by
reading the left and right sensor outputs and switching the left and right motors appropriately.
Figure-2.4 Line Follower
2.3
Related Studies
Automated Guided Vehicle also follows the same criteria which we have been following in
our project. It is also categorized in same fashion. First part is mechanical selection and
designing. Then it leads to the controller part which is core of programming. Arduino Atmega
is used as a microcontroller in this project.
It acts as the brain of the whole project. Every
task is defined and mentioned in this part. Then comes the interfacing part of brain with the
body. We synchronize he controller with mechanical body and the sensors to get the desired
output. [3]
The mechanical part includes the structure/body of the project. It has a rectangular body with
4 wheels attach to it. DC Motors are used in this project whereas in our project we use the
16
`
Servo Motors. Then an important feature of mechanical part is the sensors. In this project IR
sensors are used to sense the pattern which follows the path for the robot.[9][10]
2.4
Their Limitations and Bottlenecks
There comes a few limitations when it comes to navigation because sensors needed a path to
follow. There are multiple ways of doing this task.
One of them is wired system in which a long slot of wire is inserted deep in ground which is
followed by AVG for navigation. The wire is used to transmit the signal which is RF. A
sensor is installed to AVG at the bottom to sense the receiving sensor. They sense it and then
follow the path by following the wire. Gyroscopic and laser target navigations are used for
the same guidance techniques as well.
Other procedure is by using the Guide Tape. These taps can be defined in two types as
Magnetic and Colored Types. There are some guided sensors for that to follow the path of the
tape. Main disadvantage of this tape method is that it can easily be removed from the surface
that will directly make a negative impact on the navigation and the path will be distracted.
2.5
Summary
In this chapter we have discussed the project and research work doing in the same field in
which we have discussed our project. This chapter gives reader a complete view about the
literature, related technologies, related project and studies. This chapter clears the sense of
reader why we are going to do this project by telling him about the problems that was faced
in daily life. It also gives over view of different project related to this project and their
limitation. The AVG was mentioned as it was has the same pattern which is been followed in
our project. We have explained the working mechanism behind it and showed the schematic
diagram as well. The limitations of the same project has also been mentioned which states
that easy operating formation by user can be obtained and gives a fair solution to accomplish
the assembly work done in the industry by minimizing the human task and becomes for
efficient for production in industrial level.
17
`
Chapter 3
PROJECT DESIGN AND IMPLEMENTATION
We design the project in a manner to control the peed and angle of the Servo motor using an
Arduino Controller.
copter etc.
This can be used in multiple applications like a robotic arm or a Quad
The motors play a major role in both these practical applications. The
performance and efficiency of both the examples highly depends on the speed and angle
control of the device.
A Servo motor uses pulse width modulation from a microcontroller to know at what speed
and at what position does it is supposed to move. They can move both clockwise or
counterclockwise because of an H bridge which is imprinted into them. Most of the Servo
motors unlike conventional electric motors do not move in continuous rotations. Our main
target was to achieve the required angle and momentum force to move the arm according to
our requirement. It has the ability to generate enough torque to quickly move according to the
user.[1]
3.1
Design of the Project Hardware/ Software
In the hardware part we have use the following gadgets:
Mechanical Arm
Servo Motors
Arduino Kit
RF Module
Connecting Wires
Breadboard
Potentiometer
Gripper
At the start we have connected 3 pins with the controller. 2 pins are for VCC and the 3rd is for
ground. For controlling a big servo motor we can use external power source but in our case
servo motors are not that big so we are connecting it directly with the Arduino.
18
`
We have connected the ground from the external source to the ground of the Arduino. The
third pin is the signal pin which accepts the signal from the controller.
It actually tells to motor that at what angle to turn to. The length of the pulse corresponds to
the angle the motor turns to.
When we attach the servo motors we attach it to the board via 3 male header as it does not
stay in servo connector holes. There isn't really much hardware design necessary for this
project. We are just wiring up 3 connections from the motors to the Arduino. RF module is
used for the wireless communication. [1]
3.2
Implementation procedure
To connect the servo motor with the Arduino we took 3 wires and plugged them into the
motors. After that we connect it to the controller. One pin was for power which gives 5v.
Other was for digital pin 0 and the ground.
For controlling a big servo motor we can use
external power source but in our case servo motors are not that big so we are connecting it
directly with the Arduino. We have connected the ground from the external source to the
ground of the Arduino. The third pin is the signal pin which accepts the signal from the
controller. It actually tells to motor that at what angle to turn to. Then on the receiving end we
connected Arduino Uno which receives the data from both the sensors the accelerometer and
the gyroscope. Then its sends the data wirelessly via RF module on the other side. The other
side contains a mechanical arm with a receiver attached on it. It receives the transmitted data
that was sent from the sensors and proceed it forward to make the motors operational.[1]
Figure-3.1 Base of Robotic Arm
19
`
3.3
Details about hardware
A Servo motor uses pulse width modulation from a microcontroller to know at what speed
and at what position does it is supposed to move. They can move both clockwise or
counterclockwise because of an H bridge that is imprinted into them. An accelerometer is a
device which actually measures the acceleration. It can be also said as the G Force which is
differentiated for both 2-axis and 3-axis as well . Gyroscope is used for the measurement of
orientation which totally based on the angular momentum. This is a very precise device.[3]
Figure-3.2 Arduino connected with Motor
For wireless communication RF module is used. At transmitting it it gathers the information
from the sensors and then transmits it on the other side. On the receiving end the data is
received and then given to the controller which operates the motors accordingly. Below is the
diagram of grip stand used in mechanical body of arm. [9][10]
Figure-3.3 Gripper Stand
20
`
3.4
Details about software/ algorithms
In our project we have done software in two types of partitions. At the first stage we initialize
the servo and all the other variables. This is important because we wanted to use more than 1
servo. We also need to declare that so we used the Arduino Servo library for all out control to
make things as easy as possible.
3.5
Details of Simulations / Mathematical Modeling
The circuit works on the principle of the Servo motors. When the object reaches towards the
robotic arm the accelerometer sense the movement and synchronize with the motors to help
arm move accordingly.
Figure-3.4 Controller with Sensor
Accelerometer measures the acceleration to give the information if we tilt the object the data
will be given at the receiving end. Whereas the gyroscope measure the rotational movement
in degrees per second. They directly receive the information if we tilt but only limitation is
that it gives only movement about an axis. [2][4]
Figure-3.5 Arduino with Gyroscope
21
`
3.6
Details of final working prototype
Figure-3.6 Mathematical Simulation of Sensors
As the robot should be a stable one, so we have used aluminum and acrylic sheets, geared
servo motors for the body of our robot. We started the design of our robot by calculating the
dimensions required to make it. Then, these dimensions are modeled in AutoCAD to make
very precise Structure. The AutoCAD design is given below.
Figure-3.7 Base Assembly
22
`
3.7
Summary
In this chapter we have discussed about the hardware and the software part of the project very
briefly. We have talked about the equipment we have used and the coding behind its running
mechanism. As we have discussed that there is not really much hardware design necessary
for this project. We are just wiring up 3 connections from the motors to the Arduino. The
Arduino library makes it much easier to understand how to control a Servo motor compared
to other microcontroller platforms that do not have a dedicated Servo Control library which
makes the task easier.
23
`
Chapter 4
TOOLS AND TECHNIQUES
4.1
Hardware used with technical specifications
The main title clarifies the idea about the tools and equipment that has been used in this
project. We are going to discuss all of them in detail.
Figure-4.1 Block Diagram
4.1.1 Arduino Controller
Arduino is an electronic prototype which is based on flexible and user friendly hardware and
software as well. It can be very creative and comes handy in many applications. Arduino can
be controlled by sending an input by the user from different sensors. This contains a
microcontroller which is programmed using its own language and environment. They can
also communicate with software running on computer and serial communications like Flash
Drive and USB etc. This controller can be built by hand or can be purchased from the market.
24
`
We are using Arduino Uno in our project on the transmitting end. It is the latest version. It
interfaces with the computer via USB cable and contain everything else we need for the
program and use the board.
It has 13 digital and 6 analog pins. These pins allow them to contact with the hardware. We
simply plug our sensors with the desired pins as mentioned in the data sheet to get the
required output. It runs on the frequency of 16 MHz. For the storing of data it has a built in
memory of 32 KB. An on board LED is connected to pin 13 for fast debugging of the code. A
reset button is also there to rest the program.[5]
Figure-4.2 Arduino Uno
4.1.2 Servo Motors
A Servo motor uses pulse width modulation from a microcontroller to know at what speed
and at what position does it is supposed to move. They can move both clockwise or
counterclockwise because of an H bridge which is imprinted into them. Most of the Servo
motors unlike conventional electric motors do not move in continuous rotations. Our main
target was to achieve the required angle and momentum force to move the arm according to
our requirement. It has the ability to generate enough torque to quickly move according to the
user.[5]
25
`
Figure-4.3 Arduino interface with Servo
4.1.3 Accelerometer
An accelerometer is a kind of sensor which measure the acceleration in al 3 axis. They sense
the initial measurement of the velocity and position. Also gives the orientation in all
dimensions as referred to the gravitational force. They also inform the user when the object is
tilt at a certain angel. The output values of this sensor s a scalar one which corresponds to
magnitude of acceleration vector. The acceleration is opposed by the gravitational force
which is said to be the G Force. Depending on the sensitivity its cost fluctuates from lower to
higher. If the degree range that an application will be measuring is only 0° to 45° and
the board will be mounted perpendicular to gravity then an X-Axis device would be the best
solution. If the degree range was 0° to 45° and the board will be mounted perpendicular to
gravity then a Z-Axis device would be the best solution. This is understood more when
thinking about the output response signal of the device and the nonlinearity. [6][7]
26
`
Figure-4.4 Accelerometer
4.1.4 RF MODULE (Rx/Tx)
Radio frequency is a rate of oscillation in the range of about 3 KHz to 300 GHz which
corresponds to the frequency of radio waves and the alternating currents which carry radio
signals. Why we have used this type of transmitter or receiver as there are many other
transmitters? All the other transmitter and receivers are not available in the market and the
purpose of phase shifting cannot be achieved by using the ordinary transmitter for the
calculated beam angles.
As radio frequency is a rate of oscillation the term radio frequency is also used as a synonym
for radio to describe the use of wireless communication as opposed to communication via
electric wires. . The power amplifiers are used after phase shifter for increasing the range of
the signal to be transmitted. The RF module is working on the frequency of 315 MHz and has
a range of 50-80 meters. [8]
27
`
4.1.4.1
Transmitter:
Working voltage: 3V - 12V for max. power use 12V
Working current: max Less than 40mA max , and min 9mA
Resonance mode: (SAW)
Modulation mode: ASK
Working frequency: Eve 315MHz Or 433MHz
Transmission power: 25mW (315MHz at 12V)
Frequency error: +150kHz (max)
Velocity : less than 10Kbps [7]
Figure-4.5 Controller with Transmitter
4.1.4.2 Receiver:
Working voltage: 5.0VDC +0.5V
Working current:≤5.5mA max
Working method: OOK/ASK
Working frequency: 315MHz-433.92MHz
Bandwidth: 2MHz
Sensitivity: excel –100dBm (50Ω)
Transmitting velocity: <9.6Kbps (at 315MHz and -95dBm) [7]
28
`
Figure-4.6 Controller with Receiver
4.2
Software(s), simulation tool(s) used
The Arduino Uno can be program within the Arduino built software. We do not need a boot
loader in it. Directly program the microcontroller through the in circuit serial programing.
Headers play an important role for optimization of the code.
Figure-4.7 Software Simulation
29
`
Figure-4.8 Software output of Sensor
The above diagram is showing the output of the sensor. The small window indicates the value
of the accelerometer of every axis separately. Whereas the big box shows the code written for
the controller and vice versa.[11]
4.3
Summary
In this chapter we have discussed about the hardware and the software part of the project very
briefly. We have talked about the equipment we have used and the coding behind its running
mechanism. As we have discussed that there is not really much hardware design necessary
for this project. The Arduino library makes it much easier to understand how to control a
Servo motor compared to other microcontroller platforms that do not have a dedicated Servo
Control library. After adding the header file the code runs smoothly as it was required to do
so. The software tools which were used are discussed in detail as an essential part of the
project because they were necessary in the completion of the project. The working
methodology of hardware and software is discussed with comparison of their results.
30
`
Chapter 5
PROJECT RESULTS AND EVALUATION
In this chapter we will discuss about the problems and result of the project. During the project
we face many problems in configuration of MPU6050 to control its sensitivity. We change
the code in header file of MPU6050. It took a handsome amount of time on understanding the
header file.
5.1
Presentation of the findings
The overall result of project is to move motors by wirelessly transmitted gyroscope data. We
move the gyroscope and its selective data will map with the angles from 0-180. After
mapping the result will transmitted at radio frequency through RF(NRF2401). Data receive
on the other hand is given to the Arduino. Data is sending in serial protocol and is given for
two motors. We have split project in two parts.
5.1.1 Hardware results
In hardware portion we have make circuit in which gyroscope give output to controller and
then transmitted through RF at 2.4GHz. Hardware part is of two types one is transmitter side
and other is receiving side. In receiving side mpu6050 a controller and a wireless transmitted
module. In receiving side a receiver is attached which receive the data and give data to
controller which give data as an input of servo motors.
When the arm is moved in the positive X direction (X+) initially the value of acceleration x a
increases because the arm begins to move and then, when the arm begins to slow the positive
value of x a is converted to a negative value. This point marks the point of maximum speed.
The acceleration a y remains near to zero and z a remains near to one because the
accelerometer is held horizontally (acceleration due to gravity). To move the robot in the X
direction, the user should move the accelerometer along the X axis, keeping it in the
horizontal and vice versa.
31
`
5.1.2 Software results
In software, the main problems occur in configuration of accelerometer. By changing the
sensitivity of mpu6050 we have change the register values of mpu6050 from its source code.
Transmitted data will be transmitting in SPI protocol. SPI send data in series. We transmit
data by making master slave device. Transmitter side RF module is master device. Data
receive at the other side in controller will give data0 to motor1 and data1 to motor2.
Figure-5.1Sensor Modeling
5.1.3
Angle Mapping and Simulation
Below is the given output by the sensors when we did multitasking and sensors works in
parallel.
Sr.#
1
2
3
4
Angle
in
degree
0
1
2
3
Value of G’s
Sr.#
-160 − -158
-157 − -155
-154 − -152
-151 − -149
-
Angle
in
degree-
Value of G’s
-40 − -38
-37 − -35
-33 − -31
-30 − -28
Sr.#
-
Angle in
degree
Value of G’s
-
81 − 83
84 – 86
87 – 89
90 − 92
32
`-
-
-148 − -146
-145 − -143
-142 − -140
-139 − -137
-136 − -134
-133 − -131
-130 − -128
-127 − -125
-124 − -122
-121 − -119
-118 − -116
-115 − -113
-112 − -110
-109 − -107
-106 − -104
-103 − -101
-100 − -98
-97 − -95
-94 − -92
-91 − -89
-88 − -86
-85 − -83
-82 − -80
-79 − -77
-76 − -74
-73 − -71
-70 − -68
-67 − -65
-64 − -62
-61 − -59
-58 − -56
-55 − -53
-52 − -50
-49 − -47
-46 − -44
-43 − -41
-
-
-27 − -25
-24 − -22
-21 − -19
-18 − -16
-15 − -13
-12 − -10
-9 − -7
-6 − -4
-3 − -1
0−2
3–5
6–8
9 – 11
12 – 14
15 – 17
18 – 20
21 – 23
24 – 26
27 – 29
30 – 32
33 – 35
36 – 38
39 – 41
42 – 44
45 – 47
48 – 50
51 – 53
54 – 56
57 – 59
60 – 62
63 – 65
66 – 68
69 – 71
72 – 74
75 – 77
78 – 80
-
-
93 – 95
96 – 98
99 − 101
102 – 104
105 – 107
108 – 110
111 – 113
114 – 116
117 – 119
120 – 122
123 – 125
126 – 128
129 – 131
132 – 134
135 – 137
138 – 140
141 – 143
144 – 146
147 – 149
150 – 152
153 – 155
156 – 158
159 – 161
162 – 164
165 – 166
167 – 168
169 – 170
171 – 172
173 – 174
175 – 176
177 – 178
179 – 180
181 – 182
183 – 184
185 – 186
187 – 188
Table-5.1 Mapping of Sensors
33
`
5.2
Limitations
In this project, the robotic arm will move only in left right and in up down position but cannot
grab things. We still have the limitation of speed in our robot. As we are achieving maximum
torque, so we are not receiving high speed. The graph of speed versus torque is shown in
following figure. Our operating point is also shown in the following graph.
Our Operating point
Figure-5.2 Performance Graph
5.3
Recommendations
Our recommendations in this project are to upgrade this project in moving the arm in
backward direction by moving accelerometer that is attached at your hand by adding more
joints. We shall also recommend that before doing this project one should have studied
theoretical research based on robotic arm especially studied about its hardware design to
obtain more compatible, reliable and user friendly robotic arm.
34
`
5.4
Targets and Achievements
Project Tasks
Initial Target
Integrated sensors with board
Achieve with a fast response
Integrated sensors with mechanical body
Achieve with almost
zero probability of
error and real time processing
Integrated motors with board
Achieve with less delays
RF Module Integration
Achieve so that can be access easily
Targets of the Project
Achieved/ Not -Achieved
Mapping
Achieved
Integrated motors with sensors
Achieved with some delays/jerks
Integrated
sensors
through
wireless Achieved
communications
Table-5.2 Targets & Achievements
5.5
Summary
In this chapter, we discuss about the problem face during project and the outcomes of the
project. Project is break at two parts one is hardware and other is software. We have talked
about the equipment we have used and the coding behind its running mechanism. This project
doesn’t contain complex hardware. Complexities are in software portion. From software we
cover sensitivity of mpu6050 and transmitting data and receiving and give as input to motors.
35
`
Chapter 6
CONCLUSION
To make a robot is not much a difficult thing to do but to make it work accurate is the real
thing. Many engineers failed to make accurate robots. Implementation of feedback algorithms
was a real difficult problem. To make them accurately is our real accomplishment. Moreover,
we have learned about main parts of artificial intelligence. We have used robotic arm which
is very much helpful in making arms, legs or any bending of any part of the body of robot.
Arduino is used in which we can program our own logic. By the implementation of this logic
we can build and implement any kind of logic to make our robot more sensible (very near to a
humanoid). Different sensors were used to make the sensing of the robot better and the
movement of the robot by 3-axis accelerometer and gyroscope was also very good
experience. Indeed, we have learned a lot of things during this project.
36
`
REFERENCES
[1] R. Carelli and E. O. Freire, “Navigation Outdoor and Wall-Following Stable Control for
Sonar-Based Mobile Robots,” Robotics and Autonomous Systems, Vol. 45, No. 3-4, 2003, pp.
235-247. doi:10.1016/j.robot.2003.09.
[2]R. Malhotra and A. Sarkar, “Development of a Fuzzy Logic Based Mobile Robot for
Dynamic Obstacle Avoi- dance and Goal Acquisition in an Unstructured Envi- roment,”
IEEE/ASME
Proceeding
of
International Con- ference on
Advanced
Intelligent
Mechatronics, Kobe, 20- 24 July 2003, pp. 235-247.
[3]P. M. Peri, “Fuzzy Logic Controller for an Autonomous Mobile Robot,” Master Thesis,
Cleveland State Univer- sity, Cleveland, 2005.
[4]D. Ratner and P. McKerrow, “Navigation an Outdoor Robot along Continuous Landmarks
with Ultrasonic Sen- sing,” Robotics and Autonomous Systems, Vol. 45, No. 1, 2003, pp. 7382. doi:10.1016/S-
[5]R. Carelli and E. Freire, “Stable Corridor Navigation Controller for Sonar-Based Mobile
Robots,” Technical Report, INAW, Universidad Nacional de San Juan, San Juan, 2001.
[6] Chris Churavy, Maria Baker, Samarth Mehta, IshuPradhan, Nina Scheidegger,
Steven Shanfelt, Rick Rarick, and Dan Simon, Cleveland State University, Department of
Electrical and Computer Engineering, IEEE Potential (Unpublished), October 2007.
[7] Mehmet Ergezer, Multivariable Control Methods for Wall Tracking Robot, Cleveland
State University, Department ofElectrical and Computer Engineering, Project Paper, 2006.
[8]
M.I.Rieiro
,P.Lima,
Kinematics
Models
of
Mobile
Robots,
http://omni.isr.ist.utl.pt/~mir/cadeiras/robmovel/Kinematics.pdf, April 2002.
[9] http://ohm.ieec.uned.es/portal/wp-content/uploads/2013/10/robot-arm.jpg
[10]http://www.societyofrobots.com/sensors_sharpirrange.shtml
[11]http://www.engineersgarage.com/electronic-components/at89c51-microcontrollerdatasheet]
37
`
[12]http://www.arduino.cc
[13]. Professor Levesley, “Recording and Replicating Human Arm Motionfor use within
physiotherapy” U.S. Patent-, Nov. 4, 1978.
[14]. Biswas, K. K., &Basu, S. K. (2011). Gesture recognition using Microsoft
Kinect.Automation, Robotics and Applications (ICARA), 2011 5th International Conference
on.
[15]. Henry, P., Krainin, M., Herbst, E., Ren, X., & Fox, D. (2012). RGB-D mapping: Using
Kinect-style depth cameras for dense 3D modeling of indoor environments. The International
Journal of Robotics Research, 31(5), 647–663.
[16]. EbehardD. andVogesE., “Motion Control of Robot Using Kinect” Research Journal of
Applied Sciences, Engineering and Technology
38
`
APPENDICES
Appendix – A
39
`
Appendix – B
Arduino Mega 2560 Pin Mapping
Pin Number
Pin Name
Mapped Pin Name
1
PG5 ( OC0B )
Digital pin 4 (PWM)
2
PE0 ( RXD0/PCINT8 )
Digital pin 0 (RX0)
3
PE1 ( TXD0 )
Digital pin 1 (TX0)
4
PE2 ( XCK0/AIN0 )
5
PE3 ( OC3A/AIN1 )
Digital pin 5 (PWM)
6
PE4 ( OC3B/INT4 )
Digital pin 2 (PWM)
7
PE5 ( OC3C/INT5 )
Digital pin 3 (PWM)
8
PE6 ( T3/INT6 )
9
PE7 ( CLKO/ICP3/INT7 )
10
VCC
VCC
11
GND
GND
12
PH0 ( RXD2 )
Digital pin 17 (RX2)
13
PH1 ( TXD2 )
Digital pin 16 (TX2)
14
PH2 ( XCK2 )
15
PH3 ( OC4A )
Digital pin 6 (PWM)
16
PH4 ( OC4B )
Digital pin 7 (PWM)
17
PH5 ( OC4C )
Digital pin 8 (PWM)
18
PH6 ( OC2B )
Digital pin 9 (PWM)
19
PB0 ( SS/PCINT0 )
Digital pin 53 (SS)
20
PB1 ( SCK/PCINT1 )
Digital pin 52 (SCK)
21
PB2 ( MOSI/PCINT2 )
Digital pin 51 (MOSI)
22
PB3 ( MISO/PCINT3 )
Digital pin 50 (MISO)
23
PB4 ( OC2A/PCINT4 )
Digital pin 10 (PWM)
24
PB5 ( OC1A/PCINT5 )
Digital pin 11 (PWM)
25
PB6 ( OC1B/PCINT6 )
Digital pin 12 (PWM)
40
`
26
PB7 ( OC0A/OC1C/PCINT7 )
Digital pin 13 (PWM)
27
PH7 ( T4 )
28
PG3 ( TOSC2 )
29
PG4 ( TOSC1 )
30
RESET
RESET
31
VCC
VCC
32
GND
GND
33
XTAL2
XTAL2
34
XTAL1
XTAL1
35
PL0 ( ICP4 )
Digital pin 49
36
PL1 ( ICP5 )
Digital pin 48
37
38
PL2 ( T5 )
PL3 ( OC5A )
Digital pin 47
Digital pin 46 (PWM)
39
PL4 ( OC5B )
Digital pin 45 (PWM)
40
PL5 ( OC5C )
Digital pin 44 (PWM)
41
PL6
Digital pin 43
42
PL7
Digital pin 42
43
PD0 ( SCL/INT0 )
Digital pin 21 (SCL)
44
45
PD1 ( SDA/INT1 )
PD2 ( RXDI/INT2 )
Digital pin 20 (SDA)
Digital pin 19 (RX1)
46
PD3 ( TXD1/INT3 )
Digital pin 18 (TX1)
47
PD4 ( ICP1 )
48
PD5 ( XCK1 )
49
PD6 ( T1 )
50
PD7 ( T0 )
Digital pin 38
51
52
PG0 ( WR )
PG1 ( RD )
Digital pin 41
Digital pin 40
53
PC0 ( A8 )
Digital pin 37
54
PC1 ( A9 )
Digital pin 36
55
PC2 ( A10 )
Digital pin 35
56
PC3 ( A11 )
Digital pin 34
57
PC4 ( A12 )
Digital pin 33
58
PC5 ( A13 )
Digital pin 32
59
60
PC6 ( A14 )
PC7 ( A15 )
Digital pin 31
Digital pin 30
61
VCC
VCC
62
GND
GND
41
`
63
PJ0 ( RXD3/PCINT9 )
Digital pin 15 (RX3)
64
PJ1 ( TXD3/PCINT10 )
Digital pin 14 (TX3)
65
PJ2 ( XCK3/PCINT11 )
66
67
PJ3 ( PCINT12 )
PJ4 ( PCINT13 )
68
PJ5 ( PCINT14 )
69
PJ6 ( PCINT 15 )
70
PG2 ( ALE )
Digital pin 39
71
PA7 ( AD7 )
Digital pin 29
72
PA6 ( AD6 )
Digital pin 28
73
PA5 ( AD5 )
Digital pin 27
74
75
PA4 ( AD4 )
PA3 ( AD3 )
Digital pin 26
Digital pin 25
76
PA2 ( AD2 )
Digital pin 24
77
PA1 ( AD1 )
Digital pin 23
78
PA0 ( AD0 )
Digital pin 22
79
PJ7
80
VCC
VCC
81
82
GND
PK7 ( ADC15/PCINT23 )
GND
Analog pin 15
83
PK6 ( ADC14/PCINT22 )
Analog pin 14
84
PK5 ( ADC13/PCINT21 )
Analog pin 13
85
PK4 ( ADC12/PCINT20 )
Analog pin 12
86
PK3 ( ADC11/PCINT19 )
Analog pin 11
87
PK2 ( ADC10/PCINT18 )
Analog pin 10
88
89
PK1 ( ADC9/PCINT17 )
PK0 ( ADC8/PCINT16 )
Analog pin 9
Analog pin 8
90
PF7 ( ADC7 )
Analog pin 7
91
PF6 ( ADC6 )
Analog pin 6
92
PF5 ( ADC5/TMS )
Analog pin 5
93
PF4 ( ADC4/TMK )
Analog pin 4
94
PF3 ( ADC3 )
Analog pin 3
95
PF2 ( ADC2 )
Analog pin 2
96
97
PF1 ( ADC1 )
PF0 ( ADC0 )
Analog pin 1
Analog pin 0
98
AREF
Analog Reference
99
GND
GND
100
AVCC
VCC
42