You are on page 1of 51

University of Baghdad

College of Engineering
Electrical Engineering
Department

Wirelessly Controlled
Robotic Hand

Submitted in Partial Fulfillment


For the degree of B.Sc. in
Electrical Engineering

By
Mohamed Saad A.K.

Supervisor
Abdullah M. Zyarah
June 2016
To My Parents, Saad & Najwa
“Here is the deepest secret nobody knows
Here is the root of the root and the bud of the bud
And the sky of the sky of a tree called life; which grows
Higher than soul can hope or mind can hide
And this is the wonder that's keeping the stars apart
I carry your heart with me, I carry it in my heart”

I
Acknowledgment
I would like to express my deepest appreciation to all those who provided me
the possibility to complete this report. A special gratitude I give to my final year
project supervisor, Mr. Abdullah M. Zyarah, whose contribution, suggestions and
encouragement, helped me to coordinate my project especially in writing this report.

My completion of this project could not have been accomplished without the
support of my Colleagues, Mohannad, Mortadha, Mustafa, Ahmed, Farah, Reema,
Zahraa and Samar, I could not finish this project without your support and guidance.
Of course, I could not forget my best friends’ support through the hard times. Omer,
Hassan, you truly are my best friends.

Finally, the deepest gratitude goes to my parents. I would not be able to be


standing where I am without you. Even though you are far away and it has been two
years since we all gathered, but we will be reunited soon by the grace of god.

II
Abstract

Developing robotic system that behaves just as human is the ultimate goal of
robot research community. Unfortunately, this system is way far to achieve, because
there is no control and processing system has been developed works just as the
biological human neocortex, where all data processing carried out and motor control
signals are generated. However, over the last years, neural network algorithms, which
is inspired by the neocortex structure and the principle of operation, grab a lot of
attention in the research community as a step forward to develop standalone systems
work like the human brain. Although these systems demonstrate astonishing results in
several applications including prediction and decision making, unpredicted behavior of
such systems is something expected. For this reason, this work is resorted to robot-
human interaction system since it may give more promising results especially when it
is needed to mimic human movements. The interaction between human and robot may
have a significant impact on the industry and shapes our future. Typically, the
interaction can be achieved by recording human movements accurately and translating
it into control signals controlling the developed robotic platform.

In this project, a robotic hand controlled by a hand gesture glove is developed


and implemented. The robotic hand is assembled as a ready one and the work is
confined to developing a control circuit that primarily captures any human hand gesture
and translates it into equivalent signals that control five servo motors connected to a
robotic hand. To facilitate the control of the robotic arm and to maintain the
independently, each servo motor is connected to a particular finger. Fundamentally, the
project main circuit is divided into two physically separated models that are connected
wirelessly via XBEE communication models. The first circuit is accompanied to a glove
worn by a user, and this circuit is responsible for sensing any finger movements via flex
sensors, while the second circuit performs the receptive motions part based on the
received signal via a PIC microcontroller. The results of the implemented model
illustrate the capability and practicability of the developed model in performing the
intended function and meeting the performance goals.

III
CONTENTS
Acknowledgment ......................................................................................................... II
Abstract ...................................................................................................................... III
Contents ......................................................................................................................IV
List of Figures .............................................................................................................. V
List of Tables ........................................................................................................... VII
CHAPTER ONE: Introduction .................................................................................. 1
CHAPTER TWO: Background .................................................................................. 3
2.1: ZIGBEE ............................................................................................................... 3
2.1.1: ZigBee Shield ........................................................................................... 5
2.1.2: UART Communication Protocol .............................................................. 5
2.2: MICROCONTROLLER........................................................................................... 7
2.2.1: Pic Microcontroller ................................................................................... 8
2.2.2: PICKIT 3 .................................................................................................. 9
2.2.3: Analog To Digital Converters ................................................................ 10
2.2.4: ADCs in PIC Microcontroller ................................................................ 11
2.3: MOTORS ............................................................................................................ 12
2.3.1: Types of Motors ..................................................................................... 13
2.3.2: Pulse Width Modulation ......................................................................... 13
2.3.3: Servo Motors .......................................................................................... 14
2.4: FLEX SENSORS .................................................................................................. 16
CHAPTER THREE: Hardware Implementation ................................................... 17
3.1: TRANSMISSION CIRCUIT ................................................................................... 17
3.1.3: Flex Sensor Voltage Divider .................................................................. 17
3.1.2: Transmission Circuit Source Code ......................................................... 18
3.1.3: XBee Configuration and Installation ...................................................... 20
3.1.4: Transmission Circuit Hardware Implementation ................................... 22
3.1.5: Final Look of the Transmission Circuit.................................................. 25
3.2: RECEIVING CIRCUIT ......................................................................................... 26
3.2.1: Data Representation................................................................................ 26
3.2.2: Receiving Circuit Source Code .............................................................. 27
3.2.3: Receiving Circuit Hardware Implementation ......................................... 31
3.2.4: Robotic Hand Kit .................................................................................... 34
3.2.5: Final Look of the Receiving Circuit ....................................................... 35
CHAPTER FOUR: Conclusion & Future Work .................................................... 36
REFERENCES ....................................................................................................... VIII
APPENDIX .................................................................................................................. X

IV
List of Figures
1.1: Evolution of the Robots ....................................................................................... 1
2.1: XBee Chip ........................................................................................................... 3
2.2: XBee and XBee PRO .......................................................................................... 3
2.3: XBee Shield ......................................................................................................... 5
2.4: UART Communication ....................................................................................... 6
2.5: UART Waveforms............................................................................................... 6
2.6: Microcontroller-XBee UART Interface .............................................................. 7
2.7: PIC 16F873A ....................................................................................................... 8
2.8: PICKIT 3 ............................................................................................................. 9
2.9: ADC Basic Principle ......................................................................................... 10
2.10: ADC Parameters .............................................................................................. 10
2.11: ADC Block Diagram in PIC16F87X ............................................................... 11
2.12: Several Types of Motors ................................................................................. 13
2.13: Pulse Width Modulation Showing the Average Voltage ................................ 14
2.14: Servo Motor Main Parts .................................................................................. 15
2.15: Servo Motor PWM .......................................................................................... 15
2.16: Servo Wires Specification ............................................................................... 16
2.17: Flex Sensor ...................................................................................................... 16
3.1: Proteus Model of the Transmission Circuit ....................................................... 17
3.2: Flex Sensor Voltage Divider ............................................................................. 18
3.3: CCS C Compiler Window ................................................................................. 18
3.4: a-ADC Program Segment, B-ADC Proteos Example ....................................... 19
3.5: Transmission Program for a Single Input .......................................................... 19
3.6: XBee Explorer ................................................................................................... 20
3.7: XBee Chip Mounted on Explorer ...................................................................... 20
3.8: XCTU Displaying the XBee Module ................................................................ 21
3.9: XCTU Displaying the XBee Network Settings ................................................. 21
3.10: UART Data Format ......................................................................................... 22
3.11: Stretched Gloves .............................................................................................. 22
3.12: Flex Sensors Glued Over the Glove ................................................................ 22
3.13: Flex Sensor Connection ................................................................................... 23
3.14: Female Pin Headers for Flex Sensors .............................................................. 23
3.15: Female Pin Headers implemented in the circuit .............................................. 24
3.16: Transmission Circuit ....................................................................................... 24
3.17: Different Views of Transmission Circuit ........................................................ 25
3.18: Final Look of the Transmission Circuit........................................................... 25
3.19: Proteus Model of the Receiving Circuit .......................................................... 26
3.20: De Facto Representation of Bytes ................................................................... 27
3.21: Servo Rotation Library .................................................................................... 27
3.22: Synchronizing the Transmission Process ........................................................ 28
3.23: Getting Data from the XBee ............................................................................ 29
3.24: Synchronizing Process inside the C-Compiler ................................................ 29

V
3.25: Receiving Program Flowchart ......................................................................... 30
3.26: MG995 Servomotor ......................................................................................... 31
3.27: Receiving Circuit under Implementation ........................................................ 31
3.28: Servomotor Hook-up Wires ............................................................................ 32
3.29: Servo Male Pins (3*5) ..................................................................................... 32
3.30: Rechargeable Batteries .................................................................................... 32
3.31: Different Views of the Receiving Circuit ........................................................ 33
3.32: Robotic Hand Kit ............................................................................................. 34
3.33: Cord Tied to the Servo Gear ............................................................................ 34
3.34: Final Look of the Receiving Circuit ................................................................ 35
4.1: The project is completed and presented in the Scientific Exhibition ................ 36
4.2: The project represented to Dean of the Faculty of Engineering with MR.Thamir
and other Guests ....................................................................................................... 37

VI
List of Tables
2.1: Specifications and Performance for ZigBee & ZigBee PRO .............................. 4
3.1: XBees Configuration ......................................................................................... 21
3.2: Servomotor Degree and its Control Signal Timing Up ..................................... 28
3.3: Servomotor Angle Movement ........................................................................... 29

VII
References
1- XBee, Datasheet. "XBee-PRO™ OEM RF Modules. “." Product Manual v1.
xAx-802.15 4 (2013).
2- Gutierrez, Jose A., et al. "IEEE 802.15. 4: a developing standard for low-
power low-cost wireless personal area networks." network, IEEE 15.5 (2001):
12-19.
3- Boonsawat, Vongsagon, et al. "XBee wireless sensor networks for temperature
monitoring." the second conference on application research and development
(ECTI-CARD 2010), Chon Buri, Thailand. 2010.
4- Osborne, Adam. "An Introduction to Microcomputers: Volume 1—Basic
Concepts, Berkeley: Osborne." (1980). Augarten, Stan. "The Most Widely
Used Computer on a Chip: The TMS 1000." State of the Art: A Photographic
History of the Integrated Circuit (New Haven and New York: Ticknor &
Fields). ISBN 0-89919-195-9. Retrieved (2009): 12-23.
5- Svendsli, Odd Jostein. "Atmel’s Self-Programming Flash
Microcontrollers."Systementwicklungsprojekt-Thomas Kittel (2013).
6- Peatman, John B. Design with PIC microcontrollers. Simon & Schuster Trade,
1997.
7- Fu, Yejun. A Millimeter Wave Electro-Optical Transmitter for Radio over
Fiber Systems. Diss. Concordia University Montréal, Québec, Canada, 2012.
8- Microchip, P. I. C. "chipKIT™ PGM Programmer/Debugger Reference
Manual."
9- Zuch, Eugene L. "Principles of data acquisition and conversion." Data
Acquisition and Conversion Handbook (1979): 13-18.
10- Figueras, Ilka, Maximiliano Moreno, and Patricia Lauriet-Moreno. "Control
card check." U.S. Patent Application No. 10/734,983.
11- Mazidi, Muhammad A., et al. Pic microcontroller and embedded systems.
Prentice-Hall, Inc., 2005.
12- Gramme, Izenobe Theophile. "Improvement in magneto-electric machines."
U.S. Patent No. 120,057. 17 Oct. 1871.
13- Popović‐Bijelić, Ana, et al. "Multi‐Field Surface Electrode for Selective
Electrical Stimulation." Artificial organs 29.6 (2005): 448-452.
14- Theraja, B. L., et al. "A Textbook of Electrical Technology Vol II." Chand &
Co., New Delhi (2005).
15- Barr, Michael. "Pulse width modulation." Embedded Systems
Programming14.10 (2001): 103-104.
16- Sweeney Jr, James S. "Adaptive pulsing motor control for positioning
system." U.S. Patent No. 4,353,019. 5 Oct. 1982.
17- Lin, F-J., and S-L. Chiu. "Adaptive fuzzy sliding-mode control for PM
synchronous servo motor drives." Control Theory and Applications, IEE
Proceedings-. Vol. 145. No. 1. IET, 1998.
18- Servomotor , Datasheet

VIII
19- Zimmerman, Thomas G., et al. "A hand gesture interface device." ACM
SIGCHI Bulletin. Vol. 18. No. 4. ACM, 1987.
20- Configuration, X. C. T. U. "Test Utility Software." URL http://ftp1. digi.
Com/support/documentation/90001003_A. pdf (2008).
21- Spark Fun Products.
22- Russell, Rusty. "virtio: towards a de-facto standard for virtual I/O
devices."ACM SIGOPS Operating Systems Review 42.5 (2008): 95-103.

IX
Appendix

Appendix 1
ZigBee (Xbee) Pinout Description

X
Appendix 2
XBee Shield Pin Diagram

XI
Appendix 3-A
PIC16F873A Pinout Description

XII
Appendix 3-B
PIC16F873A Pinout Description

XIII
CHAPTER 1: Introduction

CHAPTER ONE
Introduction
Human-robot interaction (HRI) can be defined as the interdisciplinary study of
interaction dynamics between humans and robots. Researchers and practitioners specializing
in HRI come from a variety of fields, including engineering (electrical, mechanical, industrial,
and design), computer science (human-computer interaction, artificial intelligence, robotics,
natural language understanding, and computer vision), social sciences (psychology, cognitive
science, communications, anthropology, and human factors), and humanities(ethics and
philosophy).

Figure 1.1: Evolution of the Robots

A step-by-step approach has been taken, starting with a basic, static walk, through an
automatically adjustable, intelligent walk, ending towards the capability of working for a
human being. This is shown in Figure 1.1. It represents robots development of Honda
Humanoid Company.

Robots today are moving towards applications beyond the structured environment of a
manufacturing plant. They are making their way into the everyday world that people inhabit –
hospitals, offices, homes, construction sites and other cluttered and uncontrolled environments.
The successful introduction of robotics into human environments will rely on the development
of competent and practical systems that are dependable, safe, and easy to use. The value of
their contribution to the work environment will have to be unquestionable and their task
performance must be as reliable as that of a human worker. The introduction of a robot to assist
a human in such tasks will reduce fatigue, increase precision, and improve quality, whereas the
human can control the robot and communicate the task to it, rather than program the robot to
do a certain task, and that's exactly what makes the robot so safe to use.

1|Page
CHAPTER 1: Introduction

The thing to remember about gesture, whether if it is used as a verb or a noun, is that
not only is it a movement of the hands or body, but it is also a movement that has some meaning,
intention, or emotion behind it. When this word is used, it enters a whole history of human
communication, because there is no language that exists entirely without gesture. People cannot
communicate without gesture. It is so connected to intention that there is a phrase
"empty gesture," used to mean an action or movement that is without genuine feeling.

The Robot represented in this project works best as an example that has a massive role
to play in creating a disability friendly environment, which offers a major help for the disabled
to be connected with other and their environment in many activates. There is a huge number of
tasks that can be communicated to this robot to be done, starting from using it in medical
surgery due to its Suitable size. Also it can be used in industrial operations where humans suffer
from the danger of various types of tasks.

The original benchmarks for HRI were proposed by Isaac Asimov in his now famous
three laws of robotics: 1. a robot may not injure a human being or, through inaction, allow a
human being to come to harm. 2. A robot must obey orders given it by human beings except
where such orders would conflict with the First Law. 3. A robot must protect its own existence
as long as such protection does not conflict with the First or Second Law. The designed Robot
in this project operates According to these rules that what makes it proper to use.

2|Page
CHAPTER 2: Background

CHAPTER TWO
Background
2.1 ZigBee (XBee)
ZigBee (also known as XBee) is a wireless microcontroller made by DIGI which uses
the ZigBee protocol [1]. It was designed to meet IEEE 802.15.4 standards which specifies the
physical layer and media-access control for low rate personal area networks (LR-WPANS) [2].
ZigBee supports the engineering requirements of low cost, low power and high performance.
The ZigBee module is shown in Figure 2.1, the modules is widely used in RF applications that
requires a low data-rate, long battery life and secure networking.

Figure 2.1: ZigBee Chip

Wireless light switches, electrical meters with in-home-displays, and other consumer
are all examples of XBee Applications, also industrial equipment that operate within the
Industrial, Scientific & Medical (ISM ) 2.4 GHz frequency .This technology is considered to
be simpler and less expensive than other WPANs, such as Bluetooth. ZigBee existed in two
types as shown in Table 1.1(XBEE & XBEE PRO) [1].

Figure 2.2: XBee & XBee PRO

3|Page
CHAPTER 2: Background

Performance ZigBee ZigBee PRO

Indoor/Urban Range Up to 100 ft. (30 m) Up to 300 ft. (90 m)


Outdoor RF line-of-sight Up to 300 ft. (90 m) Up to 1 mile (1.6 Km)
Range
Transmit Power Output 1Mw (0 dBm) 63 Mw(18 dBm)

RF Data Rate 250 Kbps 250 Kbps

Serial Interface Data Rate (1.2-250) Kbps (1.2-250) Kbps


Receiver Sensitivity -92 dBm -100 dBm
Power Requirements

Supply Voltage 2.8 – 3.4 V 2.8 – 3.4 V

Transmit Current 45mA (@ 3.3 V) 250mA (@3.3 V)

Idle / Receive Current 50mA (@ 3.3 V) 55mA (@ 3.3 V)


Power-down Current < 10 µA < 10 µA
General
Operating Frequency ISM 2.4 GH ISM 2.4 GHz
Dimensions 2.438cm x 2.761cm 2.438cm x 3.294cm

Operating Temperature -40 to 85º C -40 to 85º C

Antenna Options Integrated Whip, Chip or Integrated Whip, Chip or


U.FL Connector, RPSMA U.FL Connector, RPSMA
Connector Connector

Table 1.1: Specifications and Performance for ZigBee & ZigBee PRO

There are a few differences between the regular XBees and the XBee Pros. XBee Pro
is bigger in size, and uses more power and costs more money. The greater power means longer
range (1 mile instead of 300ft) so if the XBee is required to be used for long range
communication process, the XBee Pros is qualified, and otherwise the regular models satisfy
the requirements.

4|Page
CHAPTER 2: Background

2.1.1 XBee Shield


The XBee chip pin-spacing is very small to fit a normal Bread Board, Also, it needs a
3.5V Voltage Supply. Therefore, XBee shield is utilized. It is an Adapter Kit which allows
plugging the XBee straight to the breadboard, it also mates directly with any development
board that has an Arduino standard footprint and equips it with wireless communication
capabilities using the popular XBee module. The XBee shield is shown in Figure 2.3.

Figure 2.3: XBEE Shield

Typically, all the XBee pins are coupled with its equivalent shield pins, where DIN and
DOUT of the XBee is connected to the UART pins of the Microcontroller used in this project.
The Power is taken from any 5V DC supply and regulated on-board to 3.3V DC before being
supplied to the XBee. The shield also takes care of level shifting on the DIN and DOUT pins
of the XBee. The board also includes LEDs to indicate power and activity on DIN, DOUT,
RSSI pins of the XBee [3].

2.1.2 UART Communication Protocol


A UART (Universal Asynchronous Receiver/Transmitter) is a protocol that translates
data between parallel and serial forms. UARTs are commonly used in conjunction with
communication standards such as RS-232, RS-422 or RS-485. A UART is usually an
individual (or part of an) integrated circuit (IC) used for serial communications over a
computer or peripheral device serial port. UARTs are now commonly included in
microcontrollers as a protocol. A dual UART, or DUART, combines two UARTs into a single
chip [4].

5|Page
CHAPTER 2: Background

The universal asynchronous receiver/transmitter (UART) takes bytes of data and


transmits the individual bits in a sequential fashion. At the destination, a second UART re-
assembles the bits into complete bytes. Each UART contains a shift register, which is the
fundamental method of conversion between serial and parallel forms. Serial transmission of
digital information (bits) through a single wire or other medium is less costly than parallel
transmission through multiple wires. Figure 2.3 shows how two devices are communicated
through the UART.

Figure 2.4: UART Communication

The UART usually does not directly generate or receive the external signals used
between different items of equipment. Separate interface devices are used to convert the logic
level signals of the UART to and from the external signaling levels. External signals may be
of many different forms. Examples of standards for voltage signaling are RS-232, RS-
422 and RS-485 from the EIA (Electronic Industries Alliance) as shown in Figure 2.5.
Historically, current (in current loops) was used in telegraph circuits. Some signaling schemes
do not use electrical wires. As example optical fiber, and (wireless) Bluetooth in its Serial Port
Profile (SPP). Some signaling schemes use modulation of a carrier signal (with or without
wires). Examples are modulation of audio signals with phone line modems, RF modulation
with data radios, and the DC-LIN for power line communication [4].

Figure 2.5: UART Waveforms

6|Page
CHAPTER 2: Background

The XBee RF (Radio-Frequency) Modules interface to a host device through a logic-


level asynchronous serial port. Through its serial port, the module can communicate with any
logic and voltage compatible UART; or through a level translator to any serial device (For
example: Through a Digi proprietary RS-232 or USB interface board).

Figure 2.6: Microcontroller-XBee UART Interface

Data enters the UART module through DI pin (pin 3) as an asynchronous serial signal.
The signal should idle ‘high’ when no data is being transmitted. Each data byte consists of a
start bit logic ‘0’, 8 data bits (least significant bit first) and a stop bit logic ‘1’ [1].

2.2 Microcontroller
A microcontroller is a self-contained system with peripherals, memory and a processor
that can be used in embedded systems. Most microcontrollers that are used today are embedded
in other consumer products or machinery. Such as automobile engine control systems,
implantable medical devices, remote controls, office machines, appliances, power tools, toys
and other embedded systems. By reducing the size and cost compared to a design that uses a
separate microprocessor, memory, and input/output devices, microcontrollers make it
economical to digitally control even more devices and processes. Mixed microcontrollers are
common, integrating analog components needed to control non-digital electronic systems [5].

Most microcontrollers at this time had concurrent variants. One had an


erasable EPROM program memory, with a transparent quartz window in the lid of the package
to allow it to be erased by exposure to ultraviolet light, often used for prototyping. The other
was either a mask programmed ROM from the manufacturer for large series, or a PROM
variant which was only programmable once; sometimes this was signified with the designation
OTP(one-time programmable). The PROM was of identical type of memory as the EPROM,
but because there was no way to expose it to ultraviolet light, it could not be erased. The
erasable versions required ceramic packages with quartz windows, making them significantly
more expensive than the OTP versions, which could be made in lower-cost opaque plastic
packages. For the erasable variants, quartz was required, instead of less expensive glass, for its
transparency to ultraviolet—glass is largely opaque to UV—but the main cost differentiator
was the ceramic package itself [5].

7|Page
CHAPTER 2: Background

In 1993, the introduction of EEPROM memory allowed microcontrollers (beginning


with the Microchip PIC16x84) to be electrically erased quickly without an expensive package
as required for EPROM, allowing both rapid prototyping, and In System Programming. The
same year, Atmel introduced the first microcontroller using Flash memory, a special type of
EEPROM. Future Electronics has a wide range of programmable microcontrollers, including
pic, low power, and LCD, USB and wireless microcontrollers from several manufacturers.
Once the engineer decides if he needs 8 bit, 16 bit general purpose, 16 bit digital signal
controllers or 32 bit microcontrollers, he will be able to choose from their technical attributes
and search results will be narrowed to match the specific microcontroller application needs [6].

The most popular Microcontrollers are from Intel (such as the 8051), Zilog (derivatives
of their famous Z-80 microprocessor), Motorola (such as the 68HC05), Atmel (the A VR),
and Microchip.

2.2.1 PIC Microcontroller


PIC (Programmable Interface Controllers) microcontrollers are integrated circuits that
can be programmed to carry out a vast range of tasks. They can be programmed to be timers or
to control a production line and much more. General Instruments produced a chip called the
PIC1650, described as a Programmable Intelligent Computer. This chip is the mother of all
PIC chips. It was intended as a peripheral for their CP1600 microprocessor. Microchip has
never used PIC as an abbreviation, just as PIC. And recently Microchip has started calling its
PICs microcontrollers PICmicro MCU's [7].

Figure 2.7: PIC 16F873A

Figure 2.7 represents PIC16F873A which has 128 bytes of EEPROM data memory, an
ICD, 2 Comparators, 5 channels of 10-bit Analog-to-Digital (A/D) converter, and a Universal
Asynchronous Receiver Transmitter (USART). All of these features make it ideal for more
advanced level A/D applications in automotive, industrial, appliances and consumer
applications [8].

8|Page
CHAPTER 2: Background

2.2.2 PICKIT 3
PICKIT is a family of programmers for PIC microcontrollers made by Microchip
Technology. They are used to program and debug microcontrollers, as well as program
EEPROM. Some models also feature logic analyzer and serial communications (UART) tool.
The PICKIT 3 programmer/debugger is a debugger system used for hardware and software
development of Microchip PIC microcontrollers (MCUs) that are based on In-Circuit Serial
Programming and Enhanced In-Circuit Serial Programming 2-wire serial interfaces. In addition
to debugger functions, the PICKIT 3 programmer/debugger system also may be used as a
development programmer [9].

Figure 2.8: PICKIT 3

PICkit 3 programmer/debugger allows the user to debug the needed application on his
own hardware in real time. Also allows debugging with hardware breakpoints. Besides setting
breakpoints based on internal. Along with programming any kind of PIC device.
This device have internal switch-mode voltage regulators that allows it to generate voltages
from 3.5 to 5.5 volts, from a 5 V USB supply, at around 100 mA. Also, it has an option for
calibrating the output with a multimeter, for increased accuracy. Additionally, for some PICs,
the MCLR programming voltage can be generated, at around 13 to 14 volts. This voltage is
required to reprogram the flash memory [9].

9|Page
CHAPTER 2: Background

2.2.3 Analog to Digital Converters


The analog-to-digital converter (ADC, A/D, or A to D) is a device that converts a
continuous physical quantity (usually voltage) to a digital number that represents the quantity's
amplitude as shown in Figure 2.9.

Figure 2.9: ADC Basic Principle

The conversion involves quantization of the input, so it necessarily introduces a small


amount of error. Furthermore, instead of continuously performing the conversion, an ADC
does the conversion periodically, sampling the input. The result is a sequence of digital values
that have been converted from a continuous-time and continuous-amplitude analog signal to
a discrete-time and discrete-amplitude digital signal [10]. A simple ADC converter is shown
in Figure 2.10.

Figure 2.10: ADC Parameters

Digital signals propagate more efficiently than analog signals, largely because digital
impulses, which are well-defined and orderly, are easier for electronic circuits to distinguish
from noise, which is chaotic. This is the chief advantage of digital modes in communications.
Computers communicate and think in terms of binary digital data; while a microprocessor can
analyze analog data, it must be converted into digital form for the computer to make sense of
it. A typical telephone modem makes use of an ADC to convert the incoming audio from a
twisted-pair line into signals the computer can understand. In a digital signal processing system,
an ADC is required if the signal input is analog [10] [11].

10 | P a g e
CHAPTER 2: Background

2.2.4 ADCs in PIC Microcontrollers


Many electrical signals around are Analog in nature. That means a quantity varies
directly with some other quantity. The first quantity is mostly voltage while that second
quantity can be anything like temperature, pressure, light, force or acceleration. But most of
Microcontrollers are digital in nature. They can only differentiate between HIGH or LOW level
on pins. Thus, an ADC is needed to convert a voltage to a number so that it can be processed
by digital systems like MCU. Most modern Microcontrollers have an ADC unit which enables
easily interface all sort of analog devices with MCUs [11].

Figure 2.11: ADC Block Diagram in PIC16F87X

PIC16F873A contains 5 analog inputs. They enable the microcontroller to recognize,


not only whether a pin is driven to logic zero or one (0 or +5V), but to precisely measure its
voltage and convert it into a numerical value “digital format”. The converter generates a 10-bit
(or 8-bit) binary result using the method of successive approximation. The A/D converter
allows conversion of an analog input signal to a 10-bit binary representation of that signal. By
selecting voltage references Vref- and Vref+ as shown in figure 2.11, the minimal resolution
or quality of conversion may be adjusted to various needs [11].

11 | P a g e
CHAPTER 2: Background

2.3 Motors
An electric motor is a machine which converts electric energy into mechanical energy.
Its action is based on the principle that when a current carrying conductor is placed in a
magnetic field, it experiences a mechanical force whose direction is given by Fleming’s Left-
hand Rule. There are several types of motors, but it will always be classified to two main
categories: DC motors, and AC motors [15].

The first commutator DC electric motor capable of turning machinery was invented by
the British scientist William Sturgeon in 1832. Following Sturgeon's work, a commutator-type
direct-current electric motor made with the intention of commercial use was built by the
American inventor Thomas Davenport, which he patented in 1837. The motors ran at up to 600
revolutions per minute, and powered machine tools and a printing press. Due to the high cost
of primary battery power, the motors were commercially unsuccessful and Davenport went
bankrupt [13].

In the 1880s, many inventors were trying to develop workable AC motors because AC's
advantages in long-distance high-voltage transmission were counterbalanced by the inability
to operate motors on AC. Practical rotating AC induction motors were independently invented
by Galileo Ferraris and Nikola Tesla, a working motor model having been demonstrated by the
former in 1885 and by the latter in 1887. In 1888, Tesla presented his paper ‘A New System
for Alternating Current Motors and Transformers’ to the AIEE that described three patented
two-phase four-stator-pole motor types: one with a four-pole rotor forming a non-self-starting
reluctance motor, another with a wound rotor forming a self-starting induction motor, and the
third a true synchronous motor with separately excited DC supply to rotor winding. One of the
patents Tesla filed in 1887, also described a shorted-winding-rotor induction motor [13] [14].

Ac motors require an alternating current or voltage source like the power supplied from
the wall outlet in houses, while DC motors require a direct current or voltage source like the
voltage coming out from the batteries [15].
The motor is constructed of two essential components:
1- Stator: a permanent magnet (or magnets) around the edge of the motor case that
remains static.
2- Rotor: a coil inside the stator mounted on an axle that spins around at high speed.

Electric motors are used to produce linear or rotary force (torque), and should be
distinguished from devices such as magnetic solenoids and loudspeakers that convert
electricity into motion but do not generate usable mechanical powers, which are respectively
referred to as actuators and transducers. Motors are used everywhere, there is a motor in fans,
blowers, cars, trains, clocks, etc. In industry, motors are used for lifting, moving, accelerating,
rotating, braking and spinning materials in order to paint, cut, plate, punch, film, etc. [15]

12 | P a g e
CHAPTER 2: Background

2.3.1 Types of Motors


There are several types of motors used in industrial, commercial, and residential
applications. Figure 2.12 represents several types of AC and DC motors.

Figure 2.12: Several Types of Motors

2.3.2 Pulse Width Modulation (PWM)


Pulse Width Modulation (PWM) is a method for generating an analog signal using a
digital source. A PWM signal consists of two main components that define its behavior: a duty
cycle and a frequency. The duty cycle describes the amount of time the signal is in a HIGH
(ON) state as a percentage of the total time of it takes to complete one cycle. The frequency
determines how fast the PWM completes a cycle (i.e. 100 Hz would be 100 cycles per second),
and therefore how fast it switches between HIGH and LOW states. By cycling a digital signal
off and on at a fast enough rate, and with a certain duty cycle, the output will appear to behave
like a constant voltage analog signal when providing power to devices [16].

13 | P a g e
CHAPTER 2: Background

Pulse width modulation works as a speed control by driving the motor with a series of
“ON-OFF” pulses and varying the duty cycle, the fraction of time that the output voltage is
“ON” compared to when it is “OFF”, of the pulses while keeping the frequency constant. The
power applied to the motor can be controlled by varying the width of these applied pulses and
thereby varying the average DC voltage applied to the motors terminals [17].

As shown in Figure 2.13, by changing or modulating the timing of these pulses the
speed of the motor can be controlled, i.e., the longer the pulse is “ON”, the faster the motor
will rotate and likewise, the shorter the pulse is “ON” the slower the motor will rotate. In other
words, the wider the pulse width, the more average voltage applied to the motor terminals, the
stronger the magnetic flux inside the armature windings and the faster the motor will rotate
[17].

Figure 2.13: Pulse Width Modulation Showing the Average Voltage

PWM signals are used for a wide variety of control applications. Their main use is for
controlling DC motors but it can also be used to control valves, pumps, hydraulics, and other
mechanical parts. The frequency that the PWM signal needs to be set at will be dependent on
the application and the response time of the system that is being powered [16].

2.3.3 Servo Motors


Servo motors are types of DC motors whose output shaft can be moved to a specific
angular position by sending it a coded signal using Pulse Width Modulation technique. As long
as the pulse is kept on sending with the same average voltage, the servo motor will maintain
the position of the shaft. When the width of the pulse is increased, i.e. the average voltage is
increased, the rotation of the motor is increased, and vice versa. [19]

14 | P a g e
CHAPTER 2: Background

The servo motor is constructed of four main parts as shown in Figure 2.14:

1- A normal DC Motor.
2- A Gear reduction unit.
3- A position-sensing device (usually a potentiometer).
4- A control circuit (PID Controller) which allows the servomotor to be brought to its
commanded position more quickly and precisely, with less overshooting.

Figure 2.14: Servo Motor Main Parts

Servos are commonly electrical or partially electronics in nature, means that it uses an
electric motor as primary means of creating a mechanical force. Other types of servos use
hydraulics, pneumatics, or magnetic principles. For the electric servo motors, they are generally
with a PWM period of 20ms, and they are settled at angular position 0o when the PWM period
is 15ms as shown below.

Figure 2.15: Servo Motor PWM

15 | P a g e
CHAPTER 2: Background

When intermediate value of pulse width is above 1.5ms, servo rotates in clockwise
position, conversely, anticlockwise. There are three wires to a servo motor as shown in Figure
2.16. Two wires are for power, +5V and ground. The third wire feeds a positional control signal
to the motor [18] [19].

Figure 2.16: Servo Wires Specification

2.4 Flex Sensors


Flex sensors are passive resistive devices that can be used to detect bending or flexing.
The flex sensor used in this project is a bi-directional flex sensor that decreases its resistance
in proportion to the amount it is bent in a certain direction. And increases its resistance if it is
bent in the other direction. The bi-directional flex sensor is shown in Figure 2.17.

Figure 2.17: Flex Sensor

Flex sensors may be used in robotics to determine joint movement or placement. They
may also be used like whiskers for wall detection. The sensors we are making are also pressure
sensitive so they can also be used as bumper switches for wall detection or pressure switches
on robotic grippers. For bio-metrics, the sensor can be placed on a moving joint of athletic
equipment to provide an electrical indication of movement or placement. A few of the sensors
can be incorporated onto a glove to make virtual reality glove [20].

16 | P a g e
CHAPTER 3: Hardware Implementation

CHAPTER THREE
Hardware Implementation
This chapter is divided into two main sections: Transmission circuit and Receiving circuit.

3.1 Transmission Circuit:


In the transmission circuit the analog quantities are converted to digital values and sent
via the XBee to the receiving circuit for evaluation and making the necessary movements.
Figure 3.1 represents the circuit diagram of the transmission circuit, and in the next sections
each part of the transmission circuit will be discussed in details.

Figure 3.1: Proteus Model of the Transmission Circuit

3.1.1 Flex Sensor Voltage Divider


The number of flex sensors used in this project are five. Each flex sensor is tied to a
finger and is connected to a 100KΩ resistor. This is to form a voltage divider and measure the
voltage across the flex sensor as shown in Figure 3.2. Then, the measured voltage is translated
into the corresponding angle by which the flex sensor is bended and transmitted to the receiving
circuit to make the necessary movements.

17 | P a g e
CHAPTER 3: Hardware Implementation

The resistance of the flex sensors used in this project were measured experimentally.
The maximum value the flex sensor reached is 95KΩ, while at rest it is about 30KΩ.

Figure 3.2: Flex Sensor Voltage Divider

3.1.2 Transmission Circuit Source Code


The source code of the transmission circuit is mainly divided into two parts: The first
part is responsible for reading the analog signals applied at the Microcontroller ADC channels
and converting it to digital, while the second part is to set the necessary configurations setup
that enables the UART port to communicate with the transmission module, XBEE. The PIC
was programmed using CCS C compiler which enables the user to write C-based codes that
could be uploaded to the device using Microchip programming KIT. The CCS C compiler
window is shown in Figure 3.3.

Figure 3.3: CCS C Compiler Window

18 | P a g e
CHAPTER 3: Hardware Implementation

By creating a new project file and selecting the desired PIC device, the user can start
writing the program. The first part of the transmission circuit is to enable the ADC channels.
This can be done using the program syntax shown in Figure 3.4.a. This program file is
simulated using Proteus program as shown in Figure 3.4.b to verify its function.

Figure 3.4: a-ADC Program Segment, b-ADC Proteos Example

Figure 3.4-b represents an ADC PIC-based circuit implemented using Proteus circuit
simulator. The circuit can be used to convert any analog signal applied at channel AN0 to a
corresponding digital value which is displayed on a LED bar.

Figure 3.5: Transmission Program for a Single Input


(Red Arrows Responsible for ADC Conversion)

19 | P a g e
CHAPTER 3: Hardware Implementation

The program segment shown in Figure 3.5 enables the ADC and UART transmission
for PIC16F873A. As it is shown in this program, port ‘A’ channels are enabled to allow the
ADC conversion. Five channels of ADC are utilized in the work, each of which is connected
to a flex sensor so that the voltage across it can be measured. Since the Microcontroller executes
the source code in sequential fashion, reading the voltage across the flex sensor takes five cycle
of the while loop. Once the analog value is converted to digital, it will be sent to the receiving
circuit via the XBEE module.

3.1.3 XBee Configuration and Installation


After the PIC program is written, the XBee needs to be ready for transmission. The
XBee chip is configured using XCTU which is a free multi-platform application designed to
enable developers to interact with Digi RF modules through a simple-to-use graphical interface.
It includes new tools that make it easy to set-up, configure and test XBee® RF modules. XCTU
also includes all of the tools a developer needs to quickly get up and running with XBee. Unique
features like graphical network view, which graphically represents the XBee network along
with the signal strength of each connection, and the XBee API frame builder, which intuitively
helps to build and interpret API frames for XBees being used in API mode, combine to make
development on the XBee platform easier than the old fashion methods [20].

Figure 3.6: XBee Explorer

To configure the XBee chip on PC using USB


port, an adapter called XBee Explorer which shown in
Figure 3.6 is used. This unit works with all XBee
modules including the Series 1 and Series 2.5,
standard and Pro version. By plugging the unit into the
XBee Explorer, and attaching a mini USB cable, the
user will have direct access to the serial and
programming pins on the XBee unit [21] (see
Figure 3.7) .

Figure 3.7: XBee Chip Mounted on


Explorer

20 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.8: XCTU Displaying the XBee Module

After plugging the USB cable to the PC and opening the XCTU program,
the XBee module should be displayed on the radio modules window as shown In
Figure 3.8. Finally, by clicking the module the XCTU starts reading the module
radio settings.

After reading the XBee module settings, XBEE modules are configured to form a
Router-Coordinator network connection as shown in the XCTU window in Figure 3.9. XBees
can only communicate with each other if they have the same network ID. For both devices the
PAN ID is given ‘D4A1’. The destination high and low addresses are changed for both XBees,
Table 3.1 illustrates how both XBees are configured.

Figure 3.9: XCTU Displaying the XBee Network Settings

Settings XBee 1 (Router) XBee 2 (Coordinator)


Channel (CH) C C
PAN ID (ID) D4A1 D4A1
Destination High (DH) 0 0
Destination Low(DL) 1234 0
Table 3.1: XBees Configuration

21 | P a g e
CHAPTER 3: Hardware Implementation

The transmission/receiving is happening as follows: Data enters the module UART


through the DI pin (pin 3) as an asynchronous serial signal. The signal should idle high when
no data is being transmitted. Each data byte consists of a start bit (low), 8 data bits (least
significant bit first) and a stop bit (high).

Figure 3.10 illustrates the serial bit pattern of data passing through the module. Serial
communications depend on the two UARTs (the microcontroller's and the RF module's) to be
configured with compatible settings (baud rate, parity, start bits, stop bits, data bits) [1].

Figure 3.10: UART Data Format

3.1.4 Transmission Circuit Hardware Implementation (Putting all


parts together)
It is impossible to place the flex sensor over the finger directly, as it may cause severe
pain and skin peeling. Therefore, all the flex sensors are super glued to gloves (shown in Figure
3.11) for safety and to provide the portability in the sense that, the glove can be worn by any
user and not restricted to a particular one.

Figure 3.11: Stretched Gloves Figure 3.12: Flex Sensors Glued Over

The Glove

22 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.13 illustrates how the flex sensors are connected to the glove. X0, X1, X2, X3
& X4 represent the flex sensors pins connected to PIC16F873A ADC. This is to measure the
voltages across the flex sensors that represent the user’s hand gesture.

Figure 3.13: Flex Sensor Connection

These five values and a ground are entering PIC16F873A ADC ports via male-female
pin headers as shown in Figure 3.14.

Figure 3.14: Female Pin Headers for Flex Sensors

23 | P a g e
CHAPTER 3: Hardware Implementation

As mentioned in chapter two, the


XBee shield mates directly with any
development board that has an Arduino
standard footprint. But in this project no
Arduino chip is used, that is why an
Arduino pin headers are soldered in the
implementing circuit as the Arduino
standard foot print. This is shown in the red
arrows in Figure 3.15. Also, a coupled
regulator is used for regulating the voltage
supply, and 4 MHZ crystal is employed
as a clock source generator. Moreover, 6
pins of male header are soldered to plug
PICKIT3 programmer to program the
microcontroller and debugging the source
code when it is needed to do so. Figure 3.15: Female Pin
Headers Implemented in the
Circuit

After the soldering is finished, the


circuit is ready to be used. As it is shown
in Figure 3.16, the XBee chip is mounted
over the XBee shield, which is placed over
the PIC implemented circuit. The male
header pins shown in Figure 3.16 are
dedicated to capture any change that
may happen in the flex sensors. However,
each pin is connected internally to port ‘A’
pins of PIC microcontroller. These pins are
then programmed for ADC conversion. The
flex sensors ground is also connected to the
XBee shield’s ground. After that, the
data is sent to the XBee through the
PIC UART port. This is to transmit
the data wirelessly to the receiving end.
Figure 3.17 shows front, top, side
and bottom views, respectively (bottom
view represents the soldering) for
the implemented transmission circuit.
Figure 3.16: Transmission Circuit

24 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.17: Different Views of Transmission Circuit

3.1.5 Final Look of the Transmission Circuit


After soldering the circuit and verifying its operation, the circuit is placed over the glove
using Adhesive cloth making the circuit removable if any additional components are required
to be placed in the circuit. Also, a 9V battery is placed on the glove to power the circuit. Figure
3.18 represents the final look of the transmission circuit.

Figure 3.18: Final Look of the Transmission Circuit

25 | P a g e
CHAPTER 3: Hardware Implementation

3.2 Receiving Circuit:


After the transmitted data is received, it is relayed from the XBee to the PIC
microcontroller, which is programmed to generate a pulse width modulated signal that causes
the servo to rotate at a specific degree. Figure 3.19 represents the receiving circuit diagram.
More details about the receiving circuit will be discussed in the next subsections.

Figure 3.19: Proteus Model of the Receiving Circuit

3.2.1 Data Representation


The De Facto standard of eight bits is a convenient power of two permitting the values
0 through 255 for one byte, it is represented in Figure 3.20 in the ubiquitous acceptance of the
8-bit size. The term octet was defined to explicitly denote a sequence of 8 bits because of
the ambiguity associated with the term byte. [22]

26 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.20: De Facto Representation of Bytes

In this project, the PIC microcontroller at the transmission side converts the analog
quantities to values within range from (0-255). As the voltage reference for the ADC is the
same as PIC VDD voltage which is 5v. Thus, the values from 0V to 5V can be represented as
a De Facto number from 0 to 255 using the equation below:

255
𝑋=𝑌∗
5𝑉
Where X denotes the De Facto number and Y is voltage across the flex sensor.
3.2.2 Receiving circuit source code
The flex sensor voltage is represented (as a De Facto number) in 8-bits (byte) when it
is transmitted/received, or processed inside the PIC microcontroller. As the register size used
to store the ADC read values is 8-bit size, all the converted analog signals values will be ranged
between (0-255). The program segment of pulse width modulation for servomotors must be
developed before writing the receiving circuit source code. The servo library in CCS-C
compiler is sophisticated to use as it contains timers and other flags. Also, to have wider control
over the generated PWM, a new PWM library needs to be developed as listed in Figure 3.21.

Figure 3.21: Servo Rotation Library

27 | P a g e
CHAPTER 3: Hardware Implementation

From the servomotor datasheets, the servomotor control signal period is 20ms, its
duration is from 0 to 2ms, and at 1500µs it is at 0 degree. This library shows how to make the
servomotor rotates to 0 degree angle. Ten pulses are given periodically with a Mark of 1500µs
and a Space time of (20ms – 1.5ms) to ensure that the second pulse begins after 20ms of the
original pulse. Simply, ten periods of duration 1.5ms is given in this library. Table 3.2
illustrated how this library is used.

Servo Degree PWM Signal Duration Delay


90o 2000µs 18000µs
60o 1800µs 18200µs
0o 1500µs 18500µs
-30o 1300µs 18700µs
Table 3.2: Servomotor Degree and its Control Signal Timing Up

As mentioned earlier, there are five flex sensors connected to the transmission circuit.
Thus, it is expected to receive five consecutive packets from the transmission circuit every time
a new gesture is formed by user’s hand. These packets usually are sent and received in a
particular order that ensures that right servo motors movements. To ensure the transmitting and
receiving synchronization, a character flag is sent periodically. This is shown in the block
diagram of Figure 3.22. The capitol letter ‘A’ is the character flag sent sequentially to ensure
synchronizing. The data is also represented as a character because it is sent as a character.

Figure 3.22: Synchronizing the Transmission Process

After ensuring synchronizing process, the data is now ready to enter the PIC microcontroller
and processed. By using “getc” command in the C-compiler, the users would be able to receive
the data form XBee via UART port. This is shown in the program segment of Figure 3.23. This
variable is now ready to be programmed to do its part of rotating the servomotor to the specific
angle degree.

28 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.23: Getting Data from the XBee

It is obvious from Figure 3.22 that the transmission XBee is sending six characters.
Five of which represent the voltage drop across the flex sensor and one is a flag. The program
segment shown in Figure 3.24 illustrates how the synchronizing actually happened. X variables
waits for the flag. If the received value is the character flag, the microcontroller start receiving
the other five packets, otherwise, no change occurs.

Figure 3.24: Synchronizing Process inside the C-Compiler

The received variables are represented (as a De Facto number) in 8-bits (byte), and all
the values will be ranged between (0-255). Table 3.3 shows the received values ranged from
(0-255), and the rotation angle corresponded to it. The servomotor rotation angle is managed
to the specific finger movement using this table.

Received Values PWM Signal Delay Servo Degree


Duration
40-55 2000µs 18000µs 90o
56-65 1800µs 18200µs 60o
66-80 1500µs 18500µs 0o
81-95 1300µs 18700µs -30o

Table 3.3: Servomotor Angle Movement

29 | P a g e
CHAPTER 3: Hardware Implementation

By combining all the program segments for the receiving circuit, the user would be able
to make an efficient program. The flowchart shown below represents how the receiving
program is written.

Figure 3.25: Receiving Program Flowchart

30 | P a g e
CHAPTER 3: Hardware Implementation

3.2.3 Receiving Circuit Hardware Implementation


Before implementing the receiving circuit, the area of soldering the components
and placing the five servomotors must be taken under consideration of choosing the best
dimensions of a veroboard. The servomotor used in this project is known as MG995, and it is
shown in Figure 3.26.

Figure 3.26: MG995 Servomotor

The face area of the servo motor is (5.4*2) cm2. Also, the motor gear used in this project
is 3.5 cm. Therefore, an area of (15*10) cm2 is required for fives servomotors to rotate without
gear interference. Besides of adding the same area of the transmission circuit which includes
XBee shield, PIC microcontroller, crystal and capacitors. All reasons above lead to using a
veroboard of (10*22) cm2. The circuit is implemented similar to that in transmission circuit,
but in the receiving circuit port ‘B’ pins are soldered to pass the PWM signals to the servo
motors. This circuit is shown in Figure 3.27.

Figure 3.27: Receiving Circuit under Implementation

31 | P a g e
CHAPTER 3: Hardware Implementation

Pin headers are soldered in the implementing circuit as the Arduino standard foot print.,
so that the XBee shield would mount over it. There are two main objects that need to be
discussed in this circuit.

First, there are three hook-up wires


to a servomotor as shown in Figure 3.28.
The white wire is the pulse width
modulation signal, while the red and black
wires are used to power the servo motor.
As mentioned, the three wires are hooked
together as a female pins. That is why a
three male pins are soldered in this circuit.
For five servomotors, (3*5) male pins are
soldered for five signals, five sources and Figure 3.28: Servomotor Hook-up Wires
five grounds. This is shown in Figure 3.29.

Figure 3.29: Servo Male Pins (3*5(

The second main object is the


servomotor current limitations. A single
MG995 servomotor draws 250mAh. A
normal 9-V DC battery supply is incapable
of supplying five servomotors. That is why
a 10Ah DC rechargeable battery supply is
used. These batteries are shown in Figure
3.30. Each battery gives 4.2V. By
connecting two batteries in series, an 8.4V
DC battery is created. This source is
capable of supplying five MG995
servomotors for ten hours.
Figure 3.30: Rechargeable Batteries

32 | P a g e
CHAPTER 3: Hardware Implementation

Figure 3.31 represents different views of the receiving circuit. The XBee chip is
mounted over the XBee shield which is also mounted over the veroboard header pins. Also,
port ‘B’ pins are soldered to the pin headers which carries the pulse width modulated signal
responsible for rotating the servomotor. Besides, five servomotors are placed with distance to
avoid gear interference. Finally, the rechargeable batteries are glued behind the veroboard
where the soldering is placed, and they are responsible for supplying the servomotors.

Figure 3.31: Different Views of the Receiving Circuit

33 | P a g e
CHAPTER 3: Hardware Implementation

3.2.4 Robotic Hand Kit


Educational kits cover a wide range of educational subjects these days. They include
science kits, arts and crafts kits, robotics kits, and more. The robotic hand kit is shown in
Figure 3.32. It contains all the materials needed to assemble a robotic hand with fully
articulated fingers. Pulling a cord makes the robotic fingers curl inward in a realistic gripping
action.

Figure 3.32: Robotic Hand Kit

In this project, the cord is tied and glued with silicon to the servomotor’s gear as shown
in Figure 3.33. Thus, when the servomotor rotates, the robotic finger curls inward.

Figure 3.33: Cord Tied to the Servo Gear

34 | P a g e
CHAPTER 3: Hardware Implementation

3.2.5 Final Look of the Receiving Circuit


After soldering the circuit and placing the servomotors, the robotic arm is connected to
the veroboard. The robotic arm is accurately fixed to the veroboard with glue. It is very light
in weight and each finger is being pulled by a servo motor that is also fixed to the board with
a 11.5 kg-cm torque, so the arm should be fixed tightly, and for that purpose a wood glue was
used to protect the arm from tilting while the fingers are moved. The circuit is shown in Figure
3.34.

Figure 3.34: Final Look of the Receiving Circuit

After the two circuits start to run and the glove is worn without tilting any finger, the
finger strings were tightly pulled without leaving any loose area in the string. This is considered
to be the normal state of the motors, as if any finger moves the motors will then be powered.

35 | P a g e
CHAPTER 4: Conclusion and Future Work

CHAPTER FOUR
Conclusion and Future Work
This work is resorted to robot-human interaction system. It gives promising results
especially when it is needed to mimic human movements. The interaction between human and
robot may have a significant impact on the industry and shapes our future. Typically, the
interaction can be achieved by recording human movements accurately and translating it into
control signals controlling the developed robotic platform. The robotic hand is assembled as a
ready one and the work is confined to developing a control circuit that primarily captures any
human hand gesture and translates it into equivalent signals that control five servo motors
connected to a robotic hand.

Figure 4.1: The project is completed and presented in the Scientific Exhibition

This project is implemented using wireless technology which is becoming more and
more popular because of its low cost and ease-of-use. In many cases wireless has become
cheaper than the wired alternative. This technology allows us a faster and more convenient
access to the world. XBee technology provides the world with a variety of wireless
applications. The direct interfacing of analog sensors and digital I/O, makes Xbee widely
acceptable in variety of areas.

36 | P a g e
CHAPTER 4: Conclusion and Future Work

The applications of this project are limitless if it is developed for a special usage. This
project can be used in both medical and industrial sectors. If voice commands are introduced
in this project, the robotic hand can be developed to be an artificial hand for a disabled person,
or an artificial leg since the servomotors are considered to be a high accurate motors.

Figure 4.2: The project represented to Dean of the Faculty of Engineering with MR.Thamir
and other Guests

37 | P a g e

You might also like