You are on page 1of 51

Design and Implementation of Robotic

Arm that Copies the Human Arm

Submitted by:
Arslan Ahmad 2013-EE-72
Muhammad Ibraheem 2013-EE-79
Mohsin Ahsan 2013-EE-92
Khawar Nabi Shah 2013-EE-99

Supervised by: Mr. Umer Shahid

Department of Electrical Engineering


University of Engineering and Technology Lahore
Design and Implementation of Robotic
Arm that Copies the Human Arm

Submitted to the faculty of the Electrical Engineering Department


of the University of Engineering and Technology Lahore
in partial fulfillment of the requirements for the Degree of

Bachelor of Science
in
Electrical Engineering.

Internal Examiner External Examiner

Director
Undergraduate Studies

Department of Electrical Engineering

University of Engineering and Technology Lahore

i
Declaration
I declare that the work contained in this thesis is my own, except where explicitly stated
otherwise. In addition this work has not been submitted to obtain another degree or
professional qualification.

Signed:
Date:

ii
Acknowledgments
We would express a deep sense of gratitude and respect to our Advisor, Mr. Umer
Shahid for his guidance, motivation and help, and consider ourselves extremely lucky to
work under his guidance. We would also like to thank all the faculty members of our
department for their pieces of advise and help that they provided us.

iii
Dedicated To Our Parents,
Who Always Sacrifice Their Dreams for Our Betterment

iv
Contents

Acknowledgments iii

List of Figures vii

Abstract viii

1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 The Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.4 The Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.5 Phases of the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5.1 Selection of Implementation of Arm . . . . . . . . . . . . . . . . . 3
1.5.2 Selection of Actuators for the Power Arm . . . . . . . . . . . . . . 3
1.5.2.1 Comparison between hydraulic, pneumatic and electric
actuators . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5.3 Selection of Sensors for Sensor Arm . . . . . . . . . . . . . . . . . 5
1.5.4 PC interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 The Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6.1 Advantages of LabVIEW . . . . . . . . . . . . . . . . . . . . . . . 6

2 The Human Arm 7


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.1 Shoulder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.2 Elbow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.2.3 Wrist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.2.4 Fingers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Comparison of Human Arm and Power Arm . . . . . . . . . . . . . . . . . 10
2.3.1 Shoulder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.2 Elbow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.3 Wrist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3.4 Fingers and Palm . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

3 The Sensor Arm 12


3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2 Flow chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3.3 Hardware Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

v
Contents vi

3.3.1 Flex Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14


3.3.1.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3.2 Gyroscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.2.1 Getting the angle from gyroscope . . . . . . . . . . . . . 17
3.3.2.2 Complimentary filter . . . . . . . . . . . . . . . . . . . . 17
3.3.2.3 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.3 Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3.4 ADC module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.4.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.3.5 Raspberry Pi 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.3.5.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 23

4 The Power Arm 24


4.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Working . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2.1 PID control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3 Hardware Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.1 Gyroscope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.3.2 Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.3.3 PWM driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.3.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.4 Motor Driver (L298) . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.4.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3.5 DC Geared Motor . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.3.5.1 Specifications . . . . . . . . . . . . . . . . . . . . . . . . . 33
4.3.5.2 Power Requirements . . . . . . . . . . . . . . . . . . . . . 33
4.4 Limits of Motion in the Power Arm Structure . . . . . . . . . . . . . . . . 34

5 Conclusion 36
5.1 Possible applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2 Possible extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
5.2.1 Interface via leap motion . . . . . . . . . . . . . . . . . . . . . . . 36
5.2.2 Interface via EEG . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.3 Complete suit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
5.2.4 Tactile and haptic feedback . . . . . . . . . . . . . . . . . . . . . . 37

A I2C Bus Transactions 38


A.1 Basics of I2C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.2 ADS1115 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
A.3 PCA9685 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
A.4 MPU6050 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

References 42
List of Figures

1.1 The Block Diagram of the system . . . . . . . . . . . . . . . . . . . . . . . 2


1.2 Simple LabVIEW code example . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3 Raspberry Pi 3 connected to LabVIEW over Ethernet . . . . . . . . . . . 6

2.1 7 DOF of Human Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7


2.2 27 DOF of Human Hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3.1 Flow chart of the sensor arm . . . . . . . . . . . . . . . . . . . . . . . . . 13


3.2 Flex Sensor 4.5 inch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 Working of flex Sensor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.4 GY-521 IMU breakout board . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.5 Explanation of roll, pitch and yaw movements of a gyroscope . . . . . . . 17
3.6 Complimentary filter block diagram . . . . . . . . . . . . . . . . . . . . . 18
3.7 A typical single turn potentiometer . . . . . . . . . . . . . . . . . . . . . . 19
3.8 Waveform showing linear behavior when the resistance changes in LabVIEW 20
3.9 Waveform showing noise of a potentiometer . . . . . . . . . . . . . . . . . 20
3.10 Model of potentiometers assembly . . . . . . . . . . . . . . . . . . . . . . 21
3.11 ADS1115 module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.12 Model of potentiometers assembly . . . . . . . . . . . . . . . . . . . . . . 22

4.1 The Power Arm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24


4.2 Power Arm Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 The power arm flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.4 PID Control Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.5 GY521 IMU breakout board . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.6 Motion detected by the IMU . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.7 Motion detected by the IMU . . . . . . . . . . . . . . . . . . . . . . . . . 29
4.8 A 10k Rotary Potentiometer . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.9 PCA9685 PWM driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.10 L298 Motor Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.11 Motors on the power arm . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
4.12 Clutch wires on the power arm . . . . . . . . . . . . . . . . . . . . . . . . 34
4.13 Clutch wire for the finger . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

A.1 I2C example using LabVIEW . . . . . . . . . . . . . . . . . . . . . . . . . 39


A.2 ADS1115 example using LabVIEW . . . . . . . . . . . . . . . . . . . . . . 39
A.3 PCA9685 example using LabVIEW . . . . . . . . . . . . . . . . . . . . . . 40
A.4 MPU6050 example using LabVIEW . . . . . . . . . . . . . . . . . . . . . 41

vii
Abstract
The aim of this project is to make a robotic arm that copies the human. The user will
get a wearable sleeve and glove that will act as the input device and copy the motion
of arm and fingers. This data will be stored in a controller, processed in LabVIEW and
sent to the other side where a robotic arm will mimic the motion. In this way, a person
can complete a task from a remote location, just by using this device. NI LabVIEW
will be used, combined with Raspberry pi 3 using DILIGENT LINX. The application
consists of two parts, the controller arm that acts as the input, and the power arm that
acts as the output. The controller arm will be a wearable sleeve and glove, and will sense
the motion of joints of the arm. The sensors used are mostly potentiometers, because
they are cheap and no complex algorithm is needed to process the data. For complex
joints, we will use gyroscope. For the power arm, we will use DC geared motors. The
geared motors are controlled using a PID control loop inside LabVIEW. Both arms,
controller and power arm, will have a controller attached and will communicate using a
wired or wireless protocol. The project is aimed to be cost effective.
Chapter 1

Introduction

1.1 Background

In the present era, our telecommunication methods have advanced, and the communi-

cation that took days in the past now happens with the blink of an eye. We can talk

to any person anywhere, we attend conferences online, attend seminars online, and now

with the advancement in the internet, we have the facility of video calling as well.

But these all are methods of virtual communication. If a person is virtually needed, he

is easily available to us 247. But what if we need the person physically. This problem

still needs to be addressed. Many of our tasks have been automated by the help of

computer, but still, there are many tasks that are in need of human arms. This project

was designed to tackle this problem. We cannot transport the person anywhere within

no time, so the idea is to virtually transport his physical motion to a humanoid model

so that the model behaves as a real human being.

Our application consists of two parts, the sensor arm , that senses the motion of the

arm of a person, and the power arm that mimics that motion.

1.2 Objectives

There were two main goals of the project:

1
Chapter 1. Introduction 2

• Design of controller arm that reads the person’s arm’s movement as input, termed

as the sensor arm

• Design of slave arm that operates using the designed control, called the power arm.

1.3 The Block Diagram

Figure 1.1: The Block Diagram of the system

This block diagram shows the controller/sensor arm and the power arm. The both can

communicate over a wired or wireless channel, which will require two micro-controllers,

but currently we are using on-board communication, so we require a single micro-

controller. The sensor arm and the power arm will be explained in the subsequent

chapters.

1.4 The Approach

The power arm has 8 DOF (degrees of freedom), where 3 are on the arm and 5 on the

hand (for fingers). The human arm has 7 DOF while the hand has 27 DOF. There are

a lot of options for the sensor arm. It can be done using:

• Brain signal via EEG electrodes

• Gyroscopes on all pivot points of arms

• Image processing using cameras


Chapter 1. Introduction 3

• Rotary potentiometers on pivots of arms

We are using a combination of gyroscope and rotary potentiometers for the sensor arm.

The gyroscopes were included because there are some complex joints on the arm such

as the ellipsoid joint on the wrist where there is no possible place for a potentiometer.

1.5 Phases of the Project

1.5.1 Selection of Implementation of Arm

Two types of implementations are possible:

• Exact copying of the human arm

• Any application using arm gestures

Since the sensor arm only detects the motion of the arm, a common sensor arm can be

used for both types of implementation, however the power arm is application dependent,

so if we are copying the human arm exactly, then the power arm should resemble the

human arm, and if we are using an application using arm gestures, like controlling a

crane, etc. as the cranes have a very complex control panel, and arm gestures will ease

the control, then the power arm should resemble the application, which in this example,

is a crane. We have designed the power arm to copy the motion of the arm exactly.

1.5.2 Selection of Actuators for the Power Arm

The power arm motion is the output of the system. The options for actuator for power

arm were:

• Hydraulic

• Pneumatic

• Electrical
Chapter 1. Introduction 4

Since we want to control it using a computer, electronic valves and pumps are required

in the traditional hydraulic or pneumatic implementation, which will cost a lot, and

the design would also be very complex. So, we went for electrical actuators and used

DC motors. DC geared motors were used and so for the position feedback, we used a

combination of gyroscope and potentiometers. There are eight motors in the system, 5

of which get feedback from the potentiometers, and 3 get feedback from gyroscope [1]

1.5.2.1 Comparison between hydraulic, pneumatic and electric actuators

In a pneumatic system, pressurized air is used to transfer pressure from one end of a

pipe to the other, so if pistons are placed on the end, pressing of one results in motion

of the other. Pneumatic systems are quite simple and are also beneficial in applications

of high temperature or hazardous material and create no magnetic interference. But

pressure losses make them the most inefficient type of actuators.

Hydraulic systems are similar to pneumatic system, but instead of air, they use a liquid

for transferring force. They are suited for high force applications, but they require a lot

of extra parts, like reservoir, heat exchanger, etc. and this list increases when we want

to implement electronic hydraulic control.

Electrical actuators have the highest precision, they can be controlled easily and because

of no fluid, there are no hazards, but they have limited output power and continuous

running can overheat and damage the motor.

When deciding between hydraulic and electric actuators, in the recent developments,

many electro-hydraulic systems are being replaced by electric motors, because hydraulic

system requires a lot of input force as well and have a noisy mechanism. e.g. the

hydraulic power steering in cars is being replaced by electronic power steering because

electronic systems can be monitored easily on computers and hence we can get proper

diagnostics and health report of the system easily. Hydraulics is the best option for high

power systems and high torque applications, in terms of size and power density.
Chapter 1. Introduction 5

1.5.3 Selection of Sensors for Sensor Arm

The sensor arm motion is the input of the system. For detecting the movements of arm,

we used combination of potentiometers and gyroscope on a sleeve wearable. For the

glove, we used flex sensors, that are variable resistors that change resistance when bent,

so they provide a good estimate of the finger movement. Potentiometer and flex sensors

are analog sensors and their sensitivity depends on the ADC, while the gyroscope is a

digital sensor, which gives us the angular velocity, and by integrating it in time, we can

get the angular displacement. The gyroscope calculate angle has a drift with time, so

we used the complimentary filter, which will be explained in later chapters.

1.5.4 PC interface

The power arm and sensor arm are connected to a PC via a micro-controller. The

micro-controller used is Raspberry Pi 3 as it is cheap and is supported by NI LabVIEW.

1.6 The Software

The software we are using is NI LabVIEW, which is a graphical programming language.

Figure 1.2: Simple LabVIEW code example

Every code in LabVIEW has two windows, the front panel, that takes user input and

gives output and the block diagram, where the processing takes place.

The Micro-Controller Raspberry Pi 3 is supported by NI LabVIEW using a module

named Diligent LINX. The Micro-Controller can communicate with the software using
Chapter 1. Introduction 6

either serial interface using a FTDI converter or over a local area network, using WLAN

or Ethernet.

Figure 1.3: Raspberry Pi 3 connected to LabVIEW over Ethernet

1.6.1 Advantages of LabVIEW

LabVIEW has the advantage of being very easy, since we can see all the input or output

terminals, so there is no chance of leaving one, and hence the chance of a code error

is greatly reduced. The search option gives the user the ease of finding the required

command, without going to the internet, all commands are displayed in one window for

those who want to explore the LabVIEW language. But the major advantage of Lab-

VIEW is that it can communicate with micro-controllers to plot results continuously. In

this way, we can monitor all the inputs and outputs on the front panel, either numerical

values or graphs, like for sensor data.


Chapter 2

The Human Arm

2.1 Introduction

Figure 2.1: 7 DOF of Human Arm

Human fore limb comprises of multiple bones and different types of joints therefore

enabling it to control and access the large space with complex orientations. It starts from

the shoulder area and through elbow extends to the hand and fingers. Multiple types

of joints provide distinct motions of the arm with the power provided by the specially

7
Chapter 2. The Human Arm 8

designed and enhanced muscles. The structure and design of human arm enables it to

perform multiple tasks in a bi-directional manner. Human arm bones comes with the

set of muscles enabling it to open and close while having a power in both direction for

example in human arm the set of biceps muscles and triceps muscles provide power for

folding the elbow and opening it respectively. Human arm can bear the load up to 250

pounds.

The human arm has 7 DOF(degrees of freedom), as shown in the above figure.

2.2 Structure

Main structure of human is provided by solid bones mainly composed of Calcium and

proteins. The large bones are hollow filled with bone marrow for lesser weight and for

blood production. Current project focuses on the structural implications of human arm.

Human arm can be easily divided into four parts while considering the functions. They

are shoulder, elbow, wrist and fingers.

2.2.1 Shoulder

Shoulder of human body joins the body and the forearm. It has a ball and socket joint

which enables human arm to cover and large field of area in three dimensions. The

scapula of shoulder joint is connected to humerus the longest bone in forearm. With the

joint having largest degree of freedom and the longest bone provides human arm with

large field of operation.

2.2.2 Elbow

Elbow joint in human arm provide the hinge joint action on elbow. This hinge joint

connects humerus with radius and ulna. The power to have a motion in this joint is

provided by biceps and triceps muscles of the arm situated on humerus provide the

closing and opening of the joint respectively. These set of strong muscles and joint

provide lever action for lifting and for high power applications. Hinge joint of elbow can

move to approximate of one hundred and twenty degrees.


Chapter 2. The Human Arm 9

2.2.3 Wrist

Human wrist joint is an ellipsoidal joint and has a very complex motion comprising of

hinge plus radial motion which is made possible by the small carpal and metacarpals

bones. The muscles situated on upper and posterior side of radius and ulna provide

the power for the hinge action for the wrist joint. Wrist enables human arm to access

difficult positions requiring complex orientations. The hinge joint can move up to one

hundred and eighty degrees.

2.2.4 Fingers

Figure 2.2: 27 DOF of Human Hand

Grasping and holding the main key task of the human arm is done by fingers and palm

of human hand as it serves as tool to handle everything owing to its complex structure.

It has 27 DOF as shown in the figure. Each of the five digits are divided into three

segments having set of muscles for each single joint which enables finger to open and

grasp the objects. The fingers have a plain joint thumbs have a saddle joint and are

specialized set of fingers having sophisticated orientation to handle multiple complex

scenarios.[5]
Chapter 2. The Human Arm 10

2.3 Comparison of Human Arm and Power Arm

Power arm in the project is made on the principles of an actual human arm. Main

functionality of the human arm are employed in power arm. Rotation of the shoulder,

lifting action of the elbow and grasping of the fingers are the most important movement

mimicked in the power arm. Following subsection describes the differences between

power arm and actual human arm.

2.3.1 Shoulder

Shoulder of the power arm is only capable of rotational motion while shoulder of actual

human arm has ball socket joint which is capable of wide range of motions. Shoulder of

power arm has only single degree of freedom having +90 to -90 degrees.

2.3.2 Elbow

The motion of elbow is completely copied in the power arm while it has power in only one

direction i.e. it has the functioning of biceps but it does not have the counter opening

mechanism. Elbow reopens naturally by the gravitational pull. It has only single degree

of motion having 90 degree span. String is used to pull the arm to perform lifting action

as it folds when elbow closes. String unfolds when an elbow is opened.

2.3.3 Wrist

Wrist of human arm is restricted to only its radial motion about arm axis, power arm

doesnt allow the radial motion along wrist axis. While human wrist have complex

hinging motion with radial motion. Wrist of power arm can move up to +90 to -90

degrees. Motor which provide power for wrist action is situated at the back of the

shoulder.

2.3.4 Fingers and Palm

Palm of power arm provides the path for power wire to transfer load to the motors.

Actual human palm have muscles for multiple grasping purposes but in palm of power
Chapter 2. The Human Arm 11

arm there is no motion. Fingers of power arm like actual human fingers have three

segments in each digit. These enables fingers of power arm to grasp multiple types

of objects easily. Power has closing mechanism powered by motors which are situated

outside power arm but it has automatic opening mechanism which uses springs. The

thumb of power arm does not have complex movement as in actual human arm although

it is placed in a particular selected location to facilitate the grasping ability of the power

arm.
Chapter 3

The Sensor Arm

3.1 Introduction

The human arm is undeniably a work of nature. This version of hand is result of millions

of years of evolution and adaptation. We have design a robotic arm that is basically

a mechanical arm with five fingers, wrist and a forearm (like humans have), that gives

ability to perform actions of a human arm which will be mutually controlled by another

human arm at a distance. In simple words this mechanical arm will always copy human

arm movements.

In order to achieve this goal, we need some equipment to convert human arms mechanical

motion into electrical signal so that that signal can be transferred to power arm via

communication channel. That equipment is the sensor or control arm which sense the

arms movements.

In this project, control arm or sensor arm acts as a master controller in a master-slave

relation where power arm behaves like slave. It is a wearable assembly that consists

of sensors which measures the change in angle of the motion of human arm and hand.

When mounted on, any motion of the arm or hand is recorded to raspberry pi3 micro-

controller through ADC module (ADS1115) which in turn through a communication

channel is connected to the power arm. So, any change in the state of human arm

12
Chapter 3. The Sensor Arm 13

causes change in the state of power arm thus enabling power arm to perform action the

same way as the human arm does.

3.2 Flow chart

The following flow chart shows the working mechanism of controller arm.

Figure 3.1: Flow chart of the sensor arm

3.3 Hardware Used

In this project, a total of eight motions of both arm and hand is taken into consideration

which includes the movements of four fingers and a thumb, wrist motion (pronation &
Chapter 3. The Sensor Arm 14

supination),rotation of arm(medial & lateral) and the last is flexion and extension of

arm. Different kinds of techniques has been used to sense and process these different

kinds of motion which are explained briefly as follows

• Flex Sensors

• Gyroscope

• Potentiometer

• ADC module

• Raspberry Pi 3

All the components are explained below.

3.3.1 Flex Sensors

Flex sensor is a thin, straight and flexible strip which is capable of sensing any minute

bend in its structure fig. 3.2. Its resistance changes when it bends. The amount of

resistance that change depends upon the degree to which it bends. It is highly resistant

to high temperatures and can be mounted on straight as well as flexible surfaces. Con-

trolling joint movement or placement is easy with flex sensors and that is the reason we

use them to sense the flexion and extention of human fingers and thumb. fig. 3.3 shows

how the flex sensor works.

A wearable woolen glove has been used to mount the flex sensors on it. Five flex sensors

four for each finger and one for the thumb have been sewed to the glove. All these sensors

are attached to the micro-controller via ADC module (ADS 1115). This assembly when

wore on the hand, detects the movement of fingers and thumb. Each flex sensor senses

the movement of the finger it is attached to. Since the primary functionality of the

sensor is to change the resistance when it bends, a flex sensor has minimum resistance

when a finger is fully extended and it has maximum resistance when it is fully flexed.
Chapter 3. The Sensor Arm 15

Figure 3.2: Flex Sensor 4.5 inch

Figure 3.3: Working of flex Sensor

This change of resistance through ADC module measures the angle to which the finger

is moved.

3.3.1.1 Specifications

• Flat Resistance: 10K Ohms

• Resistance Tolerance: 30

• Bend Resistance Range: 60K to 110K Ohms

• Power Rating : 0.50 Watts continuous. 1 Watt Peak [6]


Chapter 3. The Sensor Arm 16

3.3.2 Gyroscope

In this modern era, many different sensing devices are used to measure and control the

motion of a human body. The most common and effective of them is gyroscope. A

gyroscope is a device that uses earth’s gravity to help measure the angular motion of

the object on which it is mounted on. Its design consists of a freely-rotating disk called

a rotor, mounted onto a spinning axis in the center of a larger and more stable wheel.

As the axis turns, the rotor remains stationary to indicate the central gravitational pull,

and thus which way is down.

In this project we have used MPU6050 board that combines a three-axis gyroscope, a

three-axis accelerometer(measures the linear acceleration) and a Digital motion proces-

sor. The device also contains 16 bit ADCs to digitalize the output of both gyroscope

and accelerometer. All the communication with the device has been done using i2c serial

interface at 400 KHz. fig. 3.4 shows the MPU6050 board.

Figure 3.4: GY-521 IMU breakout board

Gyroscope or gyro-sensor has the ability to measure the angular rate or angular velocity.

It can determine rotational motion and changes in the orientation of an object or a

human body. This is a 3-axis gyroscope which can measure angle along all three axis.

In our project we used the gyro-sensor to measure the roll (pronation and supination) of

human’s wrist. When the human arm rotates or rolls, the gyroscope senses the motion

and gives us the angular velocity of that motion. fig. 3.5 shows all three motions that

can be detected by a gyroscope.


Chapter 3. The Sensor Arm 17

Figure 3.5: Explanation of roll, pitch and yaw movements of a gyroscope

3.3.2.1 Getting the angle from gyroscope

As described earlier, gyroscope is the most effective device to measure the angular motion

of a body. However, that angular motion is in the form of angular velocity(deg/s) but

we need the angular position(deg). In order to achieve this we can simply integrate the

angular velocity using this mathematical expression.

Z t t
X
θ(t) = θ̇dx ≈ θ̇T s (3.1)
0 0

Since we cannot take a perfect linear integral provided that we are using a digital system

we have to take sum of finite number of velocity’s values taken at a constant time period

or the sampling period (”T” s). Now, this approximation will cause errors. When the

output of gyroscope changes fastly than the sampling frequency, we will not detect it

and the integration of such a data will not be exact. This behaviour of gyroscope is

called drift and it increases in time. When the gyro is brought back to its reset position

the angle will not be 0. In order to avoid this error we have used a complimentary filter

that enables us to find the correct angular position.

3.3.2.2 Complimentary filter

A complimentary filter is basically a math filter which allow us to use both the values

from gyroscope as well as accelerometer[7]. It acts as both high pass filter and a low
Chapter 3. The Sensor Arm 18

pass filter. It filters high frequency values from the accelerometer due to vibrations

and the low frequency values from the gyroscope due to its drift. As low pass filter, It

uses integration techniques in such a way that gyroscope data integrates with previously

calculated angle each time the integration is done. As high pass filter, it then checks

whether the data received from accelerometer is reasonable, not too small or too big. In

the final steps we take 98% of data from gyro and 2 % from accelerometer(processed via

atan2) and combine them to get the accurate angle. Simply, the filter looks like this:

angle = 0.98 ∗ (angle + gyrData ∗ dt) + 0.02 ∗ (accData) (3.2)

Figure 3.6: Complimentary filter block diagram

3.3.2.3 Specifications

• Operating voltage: 3.3V to 5V

• Gyroscope Ranges: +/- 250 500 1000 2000 degree/sec

• Accelerometer Ranges: +/- 2g 4g 8g 16g

• ADC: 16-bit

• Working temperature range: From -40 C to +200 C [8]

3.3.3 Potentiometer

As described above, gyroscope is the most effective and suitable sensor to determine the

angular motion of a human body. We have used it to measure the roll of our wrist and
Chapter 3. The Sensor Arm 19

Figure 3.7: A typical single turn potentiometer

could also be used to measure the movements of our forearm. The drawback is that it

cannot identify if the movement occurs due to movement of arm or movement of body.

Forexample, if you are to measure the yaw movement of your arm, gyroscope will give

you a value irrespective of whether you actaully rotate your arm or you just turn facing

north to east. This problem has been resolved by making use of potentiometers.

Potentiometer is the cheapest and simple electrical equipment which consists of a three

pins variable resistor. fig. 3.7 shows a typical single turn potentiometer. Two pins are

connected separately to the power source and ground while the other pin is internally

connected to a slider which slides on a resistive track. When the slider changes its po-

sition across the resistive track, the voltage across its terminal changes. This voltage

change is linear in nature i.e. it changes linearly with change in the position of poten-

tiometers knob (slider). The tolerance in this linear nature of our voltage divider is very

small ranging from 0.01 to 2. Figure 3.8 shows the waveform of a potentiometer when

its resistance is changed. Another important feature of a potentiometer is that its an

absolute sensing device which means whenever it is powered off or on, it keeps the same

output value as before unlike other digital sensors that require to be reset. In addition,

the output signal from a potentiometer possess such a small amount of noise that no

filter is required for it. fig. 3.9 shows the noise in potentiometers output signal. These

features made this device a suitable sensor and an obvious choice to be used in this
Chapter 3. The Sensor Arm 20

project.

Figure 3.8: Waveform showing linear behavior when the resistance changes in Lab-
VIEW

Figure 3.9: Waveform showing noise of a potentiometer

In this project we have used potentiometers to detect the movement of elbow pitch and

yaw. Two round shaped linear potentiometers of nominal value 10k have been used,

one for each movement, for this purpose. To be able to use these potentiometers upto

our requirement we have devised an assembly made up of nylon (polyamide nylon 66)

in such a way that two potentiometers are mounted perpendicularly on the nylon base.

The knobs of these potentiometers are then connected with long nylon bar. One bar is

connected perpendicularly on a knob to measure the elbow yaw while the other one is

connected parallel to others knob to measure the elbow pitch. These bars were attached
Chapter 3. The Sensor Arm 21

to upper and forearm with the help of straps. When the arm rotates, the nylon bar

rotates with it enabling the respective potentiometers knob to rotate thus causing a

change in its voltage and enabling us to measure the degree to which the arm rotates.

3.12 shows the model of potentiometer’s assembly.

Figure 3.10: Model of potentiometers assembly

3.3.4 ADC module

The ADS-1115 module is used as an ADC for the Raspberry Pi 3, as it has no analog

input pins. The potentiometer and the flex sensor are analog sensors and have no

builtin ADC, so we need this module to convert their analog signal to a digital that can

be processed by the micro-controller. It communicates to the micro-controller using I2C

protocol.

3.3.4.1 Specifications

• Supply Range: 2.0V to 5.5V

• channels: 4

• Resolution: 16-bit
Chapter 3. The Sensor Arm 22

Figure 3.11: ADS1115 module

• Type: Delta Sigma

• Sampling Rate: 8SPS to 860SPS

• Operating Modes: Single ended, Differential

• Modes: +- 0.256, 0.512, 1.024, 2.048, 4.096, 6.144 [10]

3.3.5 Raspberry Pi 3

Figure 3.12: Model of potentiometers assembly


Chapter 3. The Sensor Arm 23

The Raspberry Pi 3 on-board computer is used a the micro-controller for this project.

It is a very power and cheap computer and has the size of a credit card.

3.3.5.1 Specifications

• System on Chip: Broadcom BCM2387

• CPU: A 64bit, 1.2 GHZ quadcore ARM Cortex A53

• Instruction set: ARMv8

• ADC: 16-bit

• Working temperature range: From -40 C to +200 C [11]


Chapter 4

The Power Arm

Figure 4.1: The Power Arm

24
Chapter 4. The Power Arm 25

4.1 Overview

The power arm is the output device of the system. It has 8 DOF(Degrees of Freedom),

3 for the arm and 5 for the fingers. It uses DC geared motors, which get feedback from

potentiometers and gyroscope.

Figure 4.2: Power Arm Block Diagram

The Microcontroller takes the values of the angles of the sensors on the sensor arm, and

compares them with the values of the angles of the sensors on the power arm. There is

a minimum window for noise, where the non-zero difference will cause no change in the

position of the power arm. As soon as the difference is outside the threshold, the power

arm motors are driven at a speed proportional to the motion.

4.2 Working

The reference angle, or the angle to which the actuator of the power arm should rotate,

is input from the sensor, processed and provided to the the power arm via the micro-

controller. The feedback from the power arm helps calculating the error in the reference

and measured angle. If the error is within the specified threshold value, the change in

angle is ignored. The threshold is set to avoid any false movements due to sensor noise.

If the error is greater than the threshold, then we check the direction of the error. The

channel0 and channel1 defined here are the channels of the PWM driver, that drive the

motor driver. It will be discussed below. Setting a channel to a particular value and

setting the other to zero moves the motor in one direction, and interchanging channel

values, moves it in the reverse. The motor is moved in a direction according to the angle
Chapter 4. The Power Arm 26

Figure 4.3: The power arm flowchart

and the feedback is calculated. As soon as the error comes within the threshold value,

the motor will stop.


Chapter 4. The Power Arm 27

4.2.1 PID control

PID(Proportional Integral Derivative) control is a feedback mechanism used by industry

systems. It calculates the error continuously by comparing a feedback value and a

reference value.

Figure 4.4: PID Control Block Diagram

The equation for PID is as follows:

Z t
de(t)
u(t) = Kp ∗ e(t) + Ki ∗ e(τ )dτ + Kd ∗ (4.1)
0 dt

Where Kp, Ki and Kd are coefficients for proportional, integral and derivative terms

respectively. In this model:

• P depends on the current error

• I depends on the past errors

• D is dependent on future possible errors[12]

4.3 Hardware Used

• Gyroscope (Feedback)

• Potentiometer (Feedback)

• Motor Driver
Chapter 4. The Power Arm 28

• PWM Driver

• DC Geared Motor (Actuator)

• Raspberry Pi 3 (Controller)

All the components are explained below.

4.3.1 Gyroscope

Figure 4.5: GY521 IMU breakout board

We’ve used MPU 6050 IMU which has an accelerometer with 3 DOF and gyroscope

which measures angular velocity in all the three axes i.e., x, y and z or roll, pitch and

yaw. The orientation of the object in motion can be more accurately observed by a

gyrometer as compared to an accelerometer. However, since gyrometers, as contrary to

accelerometers, are not affected by gravity, so the two are usually used together. The

GY-521 breakout board for MPU6050 is used.

Figure 4.6: Motion detected by the IMU


Chapter 4. The Power Arm 29

The values of the gyroscope are filter using complimentary filter, which is a software

based filter, discussed in the previous chapter. The gyroscope is used for feedback from

the 3 DOF of the arm, as:

Figure 4.7: Motion detected by the IMU

The values of the gyroscope are filter using complimentary filter, which is a software

based filter, discussed in the previous chapter. The gyroscope is used for feedback from

the 3 DOF of the arm, as:

More detail on the gyroscope and its specifications are given in chapter 3.

4.3.2 Potentiometer

The potentiometer is used as a feedback to report the position of the Power Arm.

The control unit will not get the feedback without it. We have used 10K linear taper

Potentiometers. In linear taper the resistance increases proportionally with the position
Chapter 4. The Power Arm 30

Figure 4.8: A 10k Rotary Potentiometer

of the pot shaft. This is the most popular method to provide feedback. The method

of providing the position feedback is by attaching the shaft of the potentiometer elbow

joint or motor. The potentiometer is moved as the joint turns which therefore changes

its resistance. The change in the resistance indicates the exact position of the joint. Any

potentiometer can be used as long as it has a travel rotation same as or greater than

the travel rotation of the joints in the arm or else the potentiometers will be damaged.

In most of the arm systems the travel rotation is not the problem as joints seldom move

40 and 50. The rotary is used in the feedback of the arm. This feedback turns the open

loop DC Gear Motor into Closed Loop System. More details on the potentiometer are

given in chapter 3.

4.3.3 PWM driver

Figure 4.9: PCA9685 PWM driver

The PCA9685 PWM driver is used to drive the motor driver and achieve variable speed

as well. It is a 12-bit 16-channel PWM driver with low output current, and suitable for
Chapter 4. The Power Arm 31

LEDs and Servo motors. In this project, we have used it to control the motor driver so

it is eligible to be used. Motor drivers need two control inputs per motors, and we are

using 8 motors, so we require 16 inputs, and so all the channels of the PWM driver will

be used. For a single channel, there are four registers to set its output, two for rising

edge and two for falling edge. Since we donot require control of the rising edge, so we

set these to zero, and hence we need to control two registers per channel.

4.3.3.1 Specifications

• Channels: 16

• Resolution: 12-bit

• Operating voltage: 2.3 V to 5.5 V

• Configuration: Totem Pole

• Internal Oscillator: 25 MHz

• External Clock Input: 50 MHz max.

• PWM frequency range: 24 Hz to 1526 Hz

• Communication: I2C[13]

4.3.4 Motor Driver (L298)

Figure 4.10: L298 Motor Driver


Chapter 4. The Power Arm 32

The L298 is a dual H-bridge motor driver with capacity suitable for most robotic ap-

plications. We have used a L298 module. Two motors are connected in one driver and

four drivers were used in the project to connect eight motors. The motor driver has four

terminals for driving the motors, two for each motor for direction control. If we give

high to one terminal and low to other , it will move in one direction and the direction

can be reversed by interchanging the inputs of the terminals. If the inputs are same the

driver will not work

4.3.4.1 Specifications

• Logic Voltage: 5V

• Drive Voltage: 5V to 35V

• Logic Current: 0 to 36mA

• Drive Current: 2A(Max Single Bridge)

• Maximum Power: 25W [14]

4.3.5 DC Geared Motor

Figure 4.11: Motors on the power arm

The DC geared motor is an open loop system, which require extensive calculations and

re-calibration for proper operation. But we have used the sensors, discussed before to

convert it to a closed loop system.


Chapter 4. The Power Arm 33

A geared DC Motor has a gear assembly attached to the motor. The speed of motor

is counted in terms of rotations of the shaft per minute and is termed as RPM. The

gear assembly helps in increasing the torque and reducing the speed. Using the correct

combination of gears in a gear motor, its speed can be reduced to any desirable figure.

This concept where gears reduce the speed but increase its torque is known as gear

reduction. The DC Gear Motor works over a fare range. The speed of motor is controlled

by the PWM driver. We have used eight DC Geared Motors; five motors have been used

for the movement of the fingers and the other the other three have been used for the

movement of the arm. These motors are controlled by the motor driver.

4.3.5.1 Specifications

• Rated Voltage: 24 V

• Rated Current: 190 mA

• Speed: 5.3 r/min

4.3.5.2 Power Requirements

The power requirements are as follows:

• Motor Voltage: 24 V

• Motor Current: 190 mA

• Configuration: Parallel Connected

• Required Voltage level: 24 V

• Required Current: 190 mA x 8 = 1520 mA

We have used two DC batteries, 12V each, connected in series to get the required voltage

level. This voltage level is also compatible with the motor driver.
Chapter 4. The Power Arm 34

4.4 Limits of Motion in the Power Arm Structure

The presence of rigid wires automatically limits the motion of the power arm on all axes

Figure 4.12: Clutch wires on the power arm

The 3 DOF on the power arm, i.e. Roll, pitch and yaw are restricted due to these wires.

The motion of the fingers is also dependent on the clutch wire.

The finger can open to a max when the clutch wire is completely extended as shown in

fig 4.13

If any motion in either direction is given to the motor when the wire is completely

extended, it will contract, hence closing the fingers. Hence, this point has to be taken

into account while writing the code.


Chapter 4. The Power Arm 35

Figure 4.13: Clutch wire for the finger


Chapter 5

Conclusion

5.1 Possible applications

• Exosuit (make a wearable power arm to enhance the strength of the arm)

• SaR (search and rescue)

• Medical (remote surgeries)

• Construction (control crane movement easily)

• Arm extender (for accessing places that are out of reach of the arm)

• A helping hand (an extra pair of hands)

• Handling hazardous/hot materials

5.2 Possible extensions

5.2.1 Interface via leap motion

The leap motion is a new technology, that detect the motion of hands by creating a

virtual 3d space using two monochromatic IR cameras and 3 IR LEDs. This can be

used as the sensor arm and will be more convenient, since it is not a wearable, it is a

plug and device.


36
Chapter 5. Conclusion 37

5.2.2 Interface via EEG

EEG electrodes detect the neuro signals in the brain. For persons with weak or cutoff

limbs, the power arm can be controlled using an EEG signal.

5.2.3 Complete suit

For this project, we have created one arm, with limited DOF. In such a way, a complete

suit can be created, that totally mimics the human body. It can be used in exercises,

where there are huge chances of fatality, so the person can practice and stay safe

5.2.4 Tactile and haptic feedback

Tactic feedback tells the power arm to stop when it detects an obstruction. If it is not

stopped, the excessive load on the motors may damage them. It can be implemented

using pressure sensors. Haptic feedback is the feedback on the sensor arm that tells the

person that the power arm has touched something. Vibration actuators can be used

for this purpose to give a more realistic use of the sensor arm, i.e. the person gets the

feeling that he has touched something.


Appendix A

I2C Bus Transactions

A.1 Basics of I2C

The I2C is a is a synchronous serial communication protocol that uses 2 wires, SCL

(serial clock) and SDA (serial data), hence also called the 2-wire interface. It transfers

data in bytes, where the LSB of the starting bit indicates a read or write operation, so

I2C devices mostly have a 7-bit address. The address byte is followed by the pointer

byte, that tell the device which register is to be accessed. The I2C is a network interface,

so there may be multiple masters and multiple slaves. Buffers are marked with a start

and stop bit, and each buffer is 8-bit long. Here is a sample VI of I2C transaction in

LabVIEW. There is no need of sending a 0(read) or 1(write) in LabVIEW as the blocks

for read and write command are separate and do this automatically. This problem was

faced at the beginning as we were sending 0s and 1s and hence no output was received.

A.2 ADS1115

The ADS1115 is a 16-bit ADC with 4 channels for analog input. It has a variable

sensitivity and a variable sampling rate, that can be adjusted using the control register.

The control register also selects the ADC channel from which we want to receive data.

One channel can be read at a time. Since it is a 16-bit ADC, 2 bytes are to be read for

38
Appendix A. I2C Transactions 39

Figure A.1: I2C example using LabVIEW

a single channel. Here is an example transaction

Figure A.2: ADS1115 example using LabVIEW

This module has only two possible values for pointer. Writing a 1 in 1st byte of buffer

tells the module that we want to configure the control registers, and then write two

bytes for the control registers. Writing a 0 tells it that we want to read, so writing a

zero is followed by a read command, and it will continue till we write another command.
Appendix A. I2C Transactions 40

A.3 PCA9685

The PCA9685 is a 12-bit, 16 channel PWM driver. It has a variable PWM frequency that

can be adjusted by the pre-scale register. It also has 2 registers for basic configurations

such as sleep, open drain, invert, etc. named as MODE1 and MODE2. It also has

an ALL-CALL register that sets the same value on all channels. Apart from this,

each channel is 12-bit, so we need 2 register per channel, but instead, 4 are available

per channel, two for setting the rising edge time, and two for the falling edge time.

The registers for rising edge will be set to 0, so the pulse starts at time zero, and

now we control the output using the falling edge register, named as LEDx OFF L and

LEDx OFF H. Below is an example of the PCA9685 control using LabVIEW, on channel

0, using a slider on the front panel.

Figure A.3: PCA9685 example using LabVIEW

A.4 MPU6050

The MPU6050 is an IMU with a MEMS accelerometer and gyroscope, and contains a

16-bit ADC. It has 6 DOF, i.e. x, y and z for accelerometer and roll, pitch and yaw for

gyroscope. The I2C block for MPU-6050 is available in LabVIEW, so we do not need
Appendix A. I2C Transactions 41

to use the previous method for I2C transactions. In the project, we have used GY-521,

which is a breakout board for the MPU-6050. Here is an example VI that extracts

raw accelerometer and gyroscope data from the MPU. The brown wire represents a

cluster, all the values of gyroscope and accelerometer, and need to be separated using

the unbundle block in LabVIEW.

Figure A.4: MPU6050 example using LabVIEW


References

[1] Whats the Difference Between Pneumatic, Hydraulic, and Electrical Actuators?
http://www.machinedesign.com/linear-motion/what-s-difference-between-
pneumatic-hydraulic-and-electrical-actuators

[2] Matthew M. Williamson. Robot Arm Control Exploiting Natural Dynamics.

[3] Design of Robotic Arm Control System Mimics Human Arm Motion. Al-Khwarizmi
Engineering Journal, Vol. 9, No. 1, P.P. 9-18 (2013)

[4] Nof, Y. S., Handbook of industrial robotics, volume 1, Canada: John Wiley & Sons,
1999.

[5] Keller, A. D., C. L. Taylor, and V. Zahm Studies to determine the functional re-
quirements for hand and arm prosthesis, Department of Engineering University of
California at Los Angeles, 1947

[6] Flex Sensor Datasheet, Spectrasymbol

[7] Kalman Filter vs. Complimentary Filter,


http://robottini.altervista.org/kalman-filter-vs-complementary-filter

[8] MPU-6050 Datasheet, Inversense.

[9] Potentiometers: A Proven Position Sensing Solution that Every Engineer Needs to
Consider in Modern Designs,
http://www.sensorsmag.com/embedded/potentiometers-a-proven-position-sensing-solutio

[10] ADS-1115 Datasheet, Texas Instruments

[11] Raspberry Pi 3 Compute model, Raspberry Pi (Trading) Ltd

[12] Araki M. PID control Kyoto University, Japan

[13] PCA9685 Datasheet, NXP Semiconductors

[14] L298 Datasheet, ST Microelectronics

42

You might also like