SlideShare une entreprise Scribd logo
1  sur  58
Télécharger pour lire hors ligne
School of Electrical & Electronic Engineering
Bachelor of Engineering Technology in Electrical and Control Systems
Engineering (DT 009)
Final Year Project 2016
Actuation and Control of an Upper Limb Prosthesis for a Transradial
Amputee
Student Name
Aisling Lee
Student Number
C1235856
Supervisor
Dr Ted Burke
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
1
Aisling Lee C12358536
DECLARATION
I, the undersigned, declare that this report is entirely my own written work, except
where otherwise accredited, and that it has not been submitted for a degree or other
award to any other university or institution.
Signed: _____________________________
Date: ________________
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
2
Aisling Lee C12358536
Table of Contents
Abstract:..................................................................................................................................................4
Introduction:...........................................................................................................................................5
Chapter 2: Research................................................................................................................................7
Anatomy..........................................................................................................................................7
Measurement and recording of bio potential signals.....................................................................8
Control ............................................................................................................................................9
Actuation and mechanics..............................................................................................................10
Quantization and testing...............................................................................................................11
Chapter 3: Design..................................................................................................................................12
Circuitry.............................................................................................................................................12
Control ..............................................................................................................................................14
Mechanics.........................................................................................................................................15
Chapter 4: Testing and results ..............................................................................................................16
Cappagh IDS: Industry testing...........................................................................................................16
Circuitry.............................................................................................................................................17
Control ..............................................................................................................................................20
Mechanics.........................................................................................................................................20
Full assembly.....................................................................................................................................21
Conclusion.........................................................................................................................................22
Works Cited...........................................................................................................................................23
Table of Figures.....................................................................................................................................26
Table of Tables......................................................................................................................................27
Appendix ...............................................................................................................................................28
Reference Images..............................................................................................................................29
Flow chart .........................................................................................................................................30
State table.........................................................................................................................................31
Code..................................................................................................................................................33
Circuit diagrams ................................................................................................................................41
Instrumentation............................................................................................................................41
Control ..........................................................................................................................................46
Complete circuit............................................................................................................................47
Working Drawings.............................................................................................................................48
......................................................................................................................................................48
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
3
Aisling Lee C12358536
Prototype ..........................................................................................................................................50
..........................................................................................................................................................51
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
4
Aisling Lee C12358536
Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
Abstract:
Using bio potential instrumentation, programming and some simple mechanics to
achieved actuation and control of an upper limb prosthetic for a transradial amputee. The prosthesis
designed allows for force control of the end effector in the form of a biomimetic hand.
Designing the prosthetic required first identification of the muscles, the type of signal I
desired to obtain and the conditioning of it. This has been achieved using EMG signals measured
from the anterior and posterior upper forearm, passed through an instrumentation amplifier, gain
buffer, envelope detector and a comparator. After having achieved a clear digital representation of
the electrical activity of the muscle a simple state machine implemented using a dsPIC30F4011
microcontroller which facilitates the desired control of the actuators (a stepper and servo motor).
This code provides the user with control over the opening and closing of the hand at any time and at
any level desired. Failsafes are also included, lest the user should accidentally activate the closing
process at the wrong time or wrong level allowing either a return to the grip level selection or a
complete open.
The most innovative side of this project is in how it allows a user control over the level of
grip applied to a desired object while being easily calibrated to that of the strength of their own
residual limb. Many of the modern electromechanical prostheses either require very strong muscles
in the residual limb to provide grip control similar to that included in this system or they offer only
open/close grip control to the user. My model also achieves all this with minimal thought required on
the part of the user by utilising simple and intuitive combinations of muscle activation coupled with
visual cues to inform the wearer as to the state or condition of the arm.
The initial phase of this project involved a thorough review of the technology used in the
design and control of modern electromechanical prostheses. This research yielded evidence of a
significant demand for a product such as this. Current solutions are either too expensive, not as
suitable for some candidates, or are simply too complex to control. To see this product realised and
brought to market first will complete the prototype which is currently in its final stage of assembly
and run final tests on it for functionality through base level activities which will allow for quantifying
it. Studies have been carried out comparing various impaired arms and prosthesis To facilitate
comparison of my results against the results of these existing studies, I modelled my experimental
method on theirs.. After developing relevant data there are various agencies and governments willing
to fund assistive technologies. Due to the conditions this product was developed it’s very cost
effective and mainstream manufacturing would be a very close prospect as I have myself sought
manufacturing of the mechanical parts and will be designing a PCB board for the components in due
course.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
5
Aisling Lee C12358536
Introduction:
“Prosthesis (prosthetic device/product): externally applied device used to replace wholly, or in part,
an absent or deficient limb segment (plural: prostheses). Common examples are artificial legs or
hands.” [1]
When we think of (upper limb) prosthesis we tend to picture the
more recent robotic style aids available but prosthesis have been
utilised for many years. The oldest recorded prosthetic was that of a
wooden and leather toe (see figure 1) circa 950-710 BC originating from
ancient Egypt [2]. The earliest if not the first recorded upper limb
prosthesis is believed to have been specially made for and owned by
Gottfried "Götz" von Berlichingen circa 1508 [3] [4]. Due to loss of his
arm in battle he sought for replacement and had a smith manufacture
him one, as you can see in figure 2, which had the capabilities to grip a
sword. In the preceding years small but significant developments were
made in the area such as improved aesthetics and adding in the likes of
hooks or interchangeable utensils to allow the prosthesis to be more
useful. It wasn’t really until the late 1900s though that we began to see
big developments in the diversification in prosthetics.
Prosthetics have experienced a surge in advancements in recent
years thanks to cheaper and more accessible technologies allowing
many companies and even hobbyist’s to work on various different
problems. Some of the more impressive developments, such as the
BeBionic3 myoelectric hand by RSLSteeper (see figure 3), have multiple
capabilities and can execute various intricate movements that would
allow completion of tasks which, would normally require such fine
motor control of a biological hand. These which until recently could not
be matched. Now that ULP’s are beginning to match the capabilities of a
human arm the question many are asking is when it will exceed the
abilities of biological limbs.
My interest into upper limb prosthetics began in 2011 as part of my leaving cert project
whereby I began my initial studies into the field and even between then and now (2016) the rate of
advancement with the technologies available is in line with that of Moore’s law. The world of
prosthetics is a fascinating one but alas although there are many impressive solutions available to
users the cost of these options makes these technologies unattainable for many. Having researched
into the various directions the field is expanding into I decided that I wanted to, try contribute to this
field in the development of possibly a relatively cheap prosthetic that completes certain objectives
that many cheap low level models cannot. This goal includes the design and manufacturing of the
prosthesis in the most effective and simplest manner where by, the user can control the grip force
Figure 1 [25]
Figure 2 [26]
Figure 3 [27]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
6
Aisling Lee C12358536
applied to an object which would incorporate feedback and fail safes to prevent any unnecessary
damage to the prosthetic or the user.
To achieve this I elected to use electromyography or EMG to take measurements from both
the anterior and posterior muscles of the forearm. Utilising these signals and the ability of the user
to activate them individual and simultaneously I was able to devise a pattern of movements to which
I could base my control off of. Before I could begin inputting the signals into the microprocessor they
first required to be amplified and filtered to provide clean and clear signals. This was achieved by the
use of an instrumentation amplifier (of which its reference was provided by a unity gain buffer) to
produce one signal from the electrodes, this was passed then into a gain amplifier to further magnify
the signal. After the signal was at a desirable level it was filtered through an envelope detector
which reduced the smoothened out the signal. Lastly this was passed through a comparator which
allows a threshold to be created providing us with a simple on or off output. From the comparator
the signal is fed into a dsPIC30F4011 microprocessor which then takes the signals and with coding
allows the user muscle activations to control and actuate motors which in turn with automate an
end affecter in the form of a mechanical hand.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
7
Aisling Lee C12358536
Chapter 2: Research
The required knowledge for this project can be broken down into following headings,
anatomy (and its functionality), Measurement and recording of bio potential signals, control,
actuation and mechanics and lastly quantization and testing.
Worth noting, my selection of the transradial (below the elbow) amputation initially was due to
having already looked into transhumeral (above the elbow) but after my research it proved to be the
more suitable choice for this project, I will expand further on this in the following passage.
Anatomy
Before we can begin to attach electrodes and take measurement s
we must first gain insight into the muscular system of the body specifically
that of the forearm. This is so as to better locate stronger and more active
muscles but also to correlate which muscles should be activating with
certain hand gestures. Knowledge of the biological construct of the arm
will speed up location selection of the probes and remove any guess work.
From industry it is widely practiced to take 2 measurements from the
forearm due to the ability to activate or contract the anterior and
posterior muscles individually or simultaneously thus allowing for more
possible patterns to utilise as inputs.
The fore arm anterior (inside) consists of 3 levels of muscles, the
superficial, intermediate and deep compartments these are used mainly to
perform flexion at the wrist and fingers, and pronation [5]. Whereas the
posterior (outside) consists of only 2 compartments, superficial and deep,
of which they produce extension at the wrist and fingers [6].
Due to the nature under which the prosthetic will be used the
muscles selected to be measured will be required to be the stronger
more reliable and most easily utilised (the wearer must be able to easily
contract the muscles without any great difficulty). The muscles selected
would be the extensor carpi ulnaris located in the superficial layer of the
posterior forearm (as seen in figure 4) it is used in extension and
adduction of wrist. The Flexor Carpi Radialis, located in the superficial
compartment of the anterior forearm (see figure 5) for flexion and
abduction at the wrist.
The nature upon which these muscles will be intact and useable
would be in a below-elbow transradial amputation. These muscles due
to their nature do not require fine motor control to activate or flex them thus preventing further
issues in the operation of the prosthesis as selecting muscles such as the
extensor digitorum branch could result in too much concentration and
effort on the wearers behalf [7]. This makes what should be an aid to ease daily tasks a hindrance
and thus inhibits a prospective higher quality of life. Granted studies have shown over time subjects
Figure 4 [6]
Figure 5 [5]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
8
Aisling Lee C12358536
using myoelectric arms do develop ability and skill in the actuation of the prosthesis via muscle
activation [8]
Measurement and recording of bio potential signals
There are many methods available to measure biological
signals emanated from the body such as electrocardiogram (ECG),
electroencephalogram (EEG) and most widely known and readily
accessible being electromyography. More commonly referred to as
EMG, it is an electro diagnostic method commonly used in medical
industry for measuring and reading the electrical activity as a by-
product of the contraction within skeletal muscles. These electrical
impulses are generated when a motor neuron signal sent from the
brain through the spinal cord and arrives at a motor end plate (see
figure 6). When received it causes the muscle to release a chemical
called Acetylcholine [9] (ACh) which is a neuro transmitter [10]. This
chemical is released at the synaptic cleft (see figure 6.1) which is a
microscopic gap between neurons [11]. This causes a depolarization
referred to as action potential. This action potential is dispersed
downward electrically from the muscle surface in a transverse
tubule which is a pathway through the plasma membrane of skeletal
muscle [12] (see figure 6.2). This in turn causes a release of Calcium
Ions (Ca++) (see figure 6.3), this chemical reaction causes cross-
bridge binding [13] (see figure 6.4) and as a result the muscle
contracts (see figure 6.5). An EMG signal is measuring the
summation of the aforementioned action potentials from the
muscle fibres adjacent to where the electrode has been placed. Therefore the size and amount of
muscles fired or activated is in proportion to the size of the EMG signal recorded
There are two methods for obtaining an electrical connection to the muscles. Invasive via
insertion of needle like electrodes or the more commonly utilised non-invasive method of surface
mounted electrodes. As I am unqualified to use the former I did not continue my research into that
field. Surface mounted electrodes require careful placement as per the anatomy construct of the
limb you wish to measure from. As seen in figures 4 and 5 there are many muscle groups located in
the forearm and selection of which to use for activation is done on a case by case basis (there are
many influential variables) but for the purpose of this study the 2 groups mentioned above have the
desired level of activity and are more easily trained in subjects with residual limbs.
EMG signals operate within the millivolt range roughly between 0mv to 30mV [14] [15]
which require amplification for use in control circuits. As a result of outside disturbances, such as
low frequency electrical interferences e.g. power lines or radio frequencies. The resulting signal is a
combination of the EMG signal and the constant interference potential. Implementation of a
differential amplifier is required so as to only obtain the difference in voltage between the two
electrodes separately from the common mode interference [16]. To ensure that the common mode
interference is sufficiently rejected the amplification of the differential amp must not deviate by
Figure 6 [9]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
9
Aisling Lee C12358536
more than 1:100,000. This is referred to as the Common Mode Rejection Ratio or CMRR. This in
practice will not be perfectly attainable due to variables such as the impedances of the electrodes,
their application pressure, localised characteristics of the skin e.g. scar tissue, wrinkles and even the
chemical construct of the skin surface such as application of skin products or even sweating over
duration of use will change impedances of the skin-electrode connection. As a result of this some of
the common mode interference will be passed through with the signal.
Control
Many various solutions exist to control upper limb prosthesis. The main
distinction is between them are weather they fall into the categories of
mechanical and electro mechanical. Mechanical arms are controlled by the use
of harnesses, latches and release mechanisms. These are referred to as body
powered prosthesis (as seen in figure 7). Most recently prosthesis utilising
electromechanical movement have begun to appear more and with multiple
variations. Notable models include Ottobock’s “Michelangelo”. This hand
encompasses wrist control (extension, flexion or rigid) a posable thumb which
can operate about 2 axis’ , high gripping force and very fast operation times
between states [17], the aforementioned BeBionic3 myoelectric hand by
RSLSteeper which has incredible dexterity and high level control of individual fingers.
The next stage of control is the era of sensory prosthesis which provides touch [18] and/or
force sensitive feedback to the wearer in real time allowing them to adjust the control level or state
of the prosthesis. One such example is the latest DARPA hand which returns the sense of touch [19]
to the wearer as part of their revolutionising prosthesis’ program [20]. Research is even being done
on controlling computer systems with EMG taken from the forearm [21]. As time passes the
methods of controlling the actuation of an arm will evolve and become more refined. Currently
many potential candidates are ineligible for electromechanical arms due to weak or poor EMG
signals.
Figure 7 [28]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
10
Aisling Lee C12358536
Actuation and mechanics
There are various methods to control the actuation of upper limb prosthesis as can be seen
in table 1 published as a result of a study analysing the different methods to control the motion. I
have found companies elect to use DC motors due to the inexpensiveness for mass production, ease
of application and control. Many modern limbs (including those mentioned in table 1) focus on
actuation of individual fingers and wrist control affording the wearer multiple degrees of freedom
and grip variations. Also the mechanics seem to be similar in most systems (use of worm and worm
wheels) but there are some outliers notably servo motors which do not appear on this table but do
however receive mention within the article.
While seemingly absent from many of the high end prosthesis they
do however seem synonymous with the latest category of prosthesis, that
being the 3D printed models. These have become more prevalent in the last
few years due to more people gaining access to 3D printers and also being
able to customise and even completely design their own prosthesis. The
most common (hand) models are body powered using linkages to latch and
unlatch the prosthesis through open and closed positions. As time passes
though many are testing out usage of actuators in their own designs and
many “start-ups” 3D printing and developing their own
electromechanical hands can be found such as the EXII-Hackberry by
Wevolver. This is an open source project utilising 3D printing
technologies, simple circuitry and a raspberry pi controller, all of
which allow for this project to be very open to hobbyists to work and
develop from.
Figure 4 [23]
Figure 6 [29]
Figure 5 [30]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
11
Aisling Lee C12358536
Quantization and testing
This aspect of prosthesis’ is relatively new, currently in
Ireland there is no such method to quantify, compare and
contrast upper limb prosthesis. Only recently has a government
recognised program been developed for lower limb prosthesis.
Internationally however there has been some progress. With
reference to two particular studies, the first being a
comparative study between a body-powered prosthesis, a
myoelectric hook and a myoelectric hand [22]. This study
showed that the simpler means provided higher more desirable
results in usage over the short term but there was also a
correlation between the times tasks were completed in with
attempt numbers. The myoelectric hand was the poorest performance due to the users needing to
concentrate more to operate it but as mentioned the more attempts they completed the better they
performed.it is worth noting that all of the subjects were able bodied thus removing any possibility
of experience or skill in usage of any of the above mentioned prosthesis types.
Another interesting study was done to contrast the abilities
of people with what is commonly referred to as flailing arm
syndrome. This is a situation where by the subject has lost all or
majority of function and/or control of their arm. Such scenarios can
commonly result in the sufferer seeking out voluntary amputation. It
is such subjects that this study focuses on. It compares the subject
executing timed tasks with their affected arm, controlling a
myoelectric prosthesis pre amputation and finally completing the
tasks post amputation [23]. Due to the nature of the subject electing
to take part in the project we instantly see improvement in ability to
complete the tasks and the time taken to do so once the myo arm is
given to them. We also see another level of improvement once the subject has received their
amputation and is correctly fitted with their prosthesis. This is an interesting study as it is very easily
replicated which will be discussed later in regards to test development for this project.
Figure 8 [33]
Figure 7 [22]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
12
Aisling Lee C12358536
Chapter 3: Design
Circuitry
Due to the analogue nature of the signal combined with these possible interferences,
creating a clean and clear signal is vital. Also it must be noted that small or short muscle activation
can occur unintentionally which must be disregarded when it comes to the operation and activation
of the control system. Lastly if a conditioned analogue signal was to be utilised then the prosthesis
would be required to be specifically programmed as per the wearer and their individual muscle
abilities. As a result of the aforementioned factors I elected to implement circuitry to produce a
clean digital signal that can be calibrated to that of the wearer’s abilities before it is inputted into the
control circuitry.
The first stage of the instrumentation circuitry is connecting the EMG probes through 10KΩ
to the instrumentation amplifier. The resistor is to ensure safety of the subject although there
should be no dangerous current levels flowing throughout this circuit. The instrumentation amplifier
is achieved using an AD263 integrated chip consisting of two non-inverting op-amps and an inverting
amplifier (the construction and pin diagram of which can be seen in figure 18). The resistive values
for all resistors excluding the gain resistor (denoted as 𝑅 𝑔) on the schematic are preselected by the
manufacturer and fabricated internally in the IC. The internal wiring of which can be seen in figure
19. The rest of the amplifiers used will be located within an LM124n quad amp. This IC was selected
for this project was as a direct result of economy of space within the circuit board. From the AD263
(with a gain of 10) the voltage is stepped up from millivolts to volts with a gain buffer (figure21) also
with gain of 10. From there the signal is at a level that would be suitable for the micro controller but
with a lot of noise and very fast oscillations it’s not as easily utilised (see figure 10). From this point
using circuitry the signal is smoothened out and converted to a digital signal. It is first passed
through an envelope detector (figure 22), which in theory should produce a signal like that in red as
seen in figure 9.
Figure 9: Post Envelope Detector
Figure 10: Amplified EMG Signal
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
13
Aisling Lee C12358536
After the signal has been converted to a cleaner one through reducing the slew rate we then
pass the signal to the next stage. As part of the comparator (see figure 23) a threshold is then
introduced as seen in green in figure 11. This threshold is a variable controlled by a varistor, as
previously mentioned the strength of the EMG from each individual varies, after the signal has
attained a level equal to or greater than the threshold the op amp is saturated high giving the
appearance of a digital output which should appear same as the purple signal in figure 12.
As described above there are 2 op amps
being used in conjunction with the AD263 to condition the signal there is also another used to
generate a reference voltage see figure 22. This is a direct result of needing a reliable and noise free
signal but also as the system is operating between 0V to 6V the saturation voltages of the amps
selected is estimated to be around 3.5V, thus a reference of 1.33V is created.
The college provided me with electrode pads to aid in my
experimenting but unfortunately there were no electrode probes
available thus while also developing the circuit necessity required
construction of EMG electrodes to be constructed. While inspecting
the pads various methods to connect onto them came to mind but
none ensured a sound connection that could be guaranteed each
time the project required to be reset. I discovered the node onto
which you connect the probes to the electrode pad was very similar
to a commercial ECG monitor worn regularly by athletes. Upon investigation I further found the
reciprocal connection to be the same as a common snap button found used in modern textiles.
From these buttons I constructed a simple probe that provided good repeatable solid connections.
Figure 12: Introduction of threshold Figure 11: New Digital Output Signal
Figure 13: constructed EMG connector
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
14
Aisling Lee C12358536
Control
The control aspect of this project is based around a dsPIC30F4011 micro controller with the
program written to it in C. This chip was selected based on familiarity and sample codes already
written. Using the data sheet and family reference manual [22] the final state machine was realised.
Initially the design was to obtain signals from 2 different locations on the body e.g. bicep and
shoulder, but after discussions with a prosthetic and orthotics technician the focus shifted from this
to taking 2 independent signals from one location (the forearm) and utilisation of patterns to control
the state machine. The new locations (the anterior and posterior forearm) provides 2 independent
signals when individually activated but when both are contracted this can be utilised as a third
option.
The main body and layout of the code originated from code written for a workout timer [25].
It was from this the current system was adapted and expanded. As can be seen from the state table
(table 4) and flow chart in figure 16 the process for the prosthesis is as follows;
Main power on activates a start-up sequence flashing all lights to check each and operates
the servo to again check functionality. This sequence lasts a couple of seconds and after which the
arm enters standby which is indicated by a solid yellow light. When the user wants to switch state
they use a code contraction (contraction of both anterior and posterior muscles simultaneously). If
the contraction lasts longer than 3 seconds then the user will go straight to the closing state at
whatever the previous level set was (upon start-up it is set to 0). If the contraction lasts less than 3
seconds the state machine enters the grip set state (indicated by a flashing yellow light). Within this
state the user can select the level of force or grip they wish to apply ranging from 0 to 4 by
incrementing it with a posterior flexing motion or decrement it with an anterior flexing motion. Once
the desired level is achieved executing a code contraction will move the system from the grip set
state to the closing state, indicated by a flashing red light, the hand will tighten to close the
corresponding level selection while the level is also represented on a strip of red LEDs if however at
any point while the hand is closing the user decides to abort, a code contraction will return them to
the grip set state and an anterior motion will go straight to open. After the desired level has been
obtained the closed state is indicated by a solid green light. Once the user wishes to open the hand a
code contraction will do so the opening process is indicated by a solid red light.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
15
Aisling Lee C12358536
Mechanics
Due to a minimal background in mechanics but also a desire to create a
simple system I elected to operate the whole hand with ideally one motor. The final
solution utilises 2. The design for the hand started as a concept idea with the goal for
a manipulator that was biomimetic but again simple to control. I began looking into
various natural occurring mechanical systems that resembled human hand closure.
The motion and bend of a fishing rod brought about the first initial design as seen in
figure 13. The final implementation of the design came from a similar concept found
on Instructables [26]. The fingers consist of flexible conduit with notches cut out. A
piece of string is ran the length of the finger and affixed at the top. The other end of
the string leads down to a bell crank a concept sketch can be seen in figure 14. From
the bell crank only one string is required to manipulate the opening and closing of
the hand.
After a method for closing the hand was devised the mechanisms to do so
with were required. I opted to use a ratchet and pawl so as to capitalise on its ability
to hold position without requiring any activation of or putting strain on the
actuators. The ratchet and pawl (along with the bell crank) were drawn up using the
CAD software solid works and laser cut to custom fit the project.
Figure 14: finger close sketch
Figure 15: hand close sketch
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
16
Aisling Lee C12358536
Chapter 4: Testing and results
Cappagh IDS: Industry testing
IDS Cappagh is the fore front of prosthesis and orthopaedics in Ireland. In their hospital they
bring patients through all the required steps from consulting, analysis fitting and maintenance of
various types of prosthesis and orthopaedics. My connection with the hospital first began in 2011
when I visited it as part of research for my leaving cert technology project. I contacted them once
again upon confirmation of my project proposal approval in hopes to gain more first-hand industry
insight. Over the Easter mid-term I had 2 appointments the first being a consultation with one of
their foremost upper limb technicians. During this consultation I presented my project idea and
discussed how I hope to gain a greater understanding of the prosthetic process as a whole (from
initial consultations, to selection of prosthesis and follow up consultations).
I learned a great deal from my visits, one of the most crucial points being the method by which they
find and utilize the signals in the arm. Initially the patient flexes their muscles as the technician feels
around the residual limb. In my case the technician examined my forearm (as if I were a trans-radial
amputee), this is so as to find what they referred to as the belly of the desired muscle (or the
largest/ strongest part) in which the patient will ultimately use to control their prosthesis. After the
technician has found a desirable area they begin placing myoelectric electrodes at various points
within the area and sampling signals till they find the strongest one. The electrodes used during my
consultations were MyoBock Electrodes. Due to my desired operation within my own prosthetic I
was fitted with electrodes which measured my protagonist and antagonistic muscles within my
forearm. This allowed me to use each individually to open or close a simulated hand or
simultaneously (a code contraction) to switch the simulation state. I also partook in typical pre-
prosthesis training whereby I had to control a simulation hand and then play a game akin to "flappy
birds" with sole control of the cursor coming from the anterior and posterior signals taken from my
forearm.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
17
Aisling Lee C12358536
Circuitry
Testing of the control circuit proved quite straightforward. After initial construction I ran
simple code to test the wiring such as LED control. Also seeing as the circuit was very similar to that
used in the tabata timer [25] I ran that code to check the motors. After initial tests construction of
the instrumentation circuit then took place. As each stage was completed it was connected to an
oscilloscope to test the output resembled that of what was desired.
Some samples of early testing can be seen below.
The first set depicts the noisy signal obtained before the envelope detector during initial
stages of testing. The last graph depicts the events recorded with a test subject operating the arm
through all its state pre final parts assembly.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
18
Aisling Lee C12358536
Peak 635 -806
Peak 695 -796
0
100
200
300
400
500
600
700
800
900
0 1000 2000 3000 4000 5000 6000
Magnitude(du)
Time (ms)
Test 13/04/16 15:31 - Anterior positive flex
Series1
0
100
200
300
400
500
600
700
800
900
0 1000 2000 3000 4000 5000 6000
Magnitude(DU)
Time (ms)
Test 13/04/16 15:47 - Anterior Code
contraction
Series1
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
19
Aisling Lee C12358536
Peak 226/110
Signals recorded while user controls system
0
50
100
150
200
250
0 1000 2000 3000 4000 5000 6000
Magnitude(DU)
Time (ms)
Test 13/04/16 16:03 - Anterior antagonist flex
Series1
-200
0
200
400
600
800
1000
0 50000 100000 150000 200000 250000 300000 350000
Amplitude
Time (ms)
21-55-51 08/05/2016
Series1
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
20
Aisling Lee C12358536
Control
The control aspect was the most successful and easiest to test. Multiple pieces of footage of
the code being successfully executed were obtained and as a result I would deem it a solid model
from which to continue building.
A force measuring system which could have been used for hardware safeguarding but also
to place a tangible value on the force applied was developed but was not realised in this prototype
version. This application could also have added to the testing of the final assembly. The code would
read the following and would proceed the “if” statements in the closing state.
force_now = read_analog_channel(0);
if (stepper_target =! stepper_position) force_last ==
force_now;
force_now = read_analog_channel(0);
if (stepper_target =! stepper_position && abs(force_last-
force_now) < 5) closed = 1;
if (stepper_target == stepper_position) closed = 1;
If this piece of code were to have been included the flow chart to represent the state machine can
be seen in figure 17
Mechanics
The concept for controlling the hand (conduit and string connected to the bell crank) was
prototyped before the rest of the project began as how it functioned would have a huge impact on
the kind of circuit necessary and also where the focus of the project was to lie. Upon initial test the
hand open and close method seemed very promising granted that the mechanics and circuitry would
hold up.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
21
Aisling Lee C12358536
Full assembly
Unfortunately upon full assembly there were a few issues namely a circuit failure
which resulted in overheating and smoking of a component and at time of print it is yet to be
resolved. However the control aspect functions as expected and the hand is able to close albeit not
to the level I had envisioned this is due to the torque on the motor not being quite strong enough to
wind in the line but also the bonding method of the ratchet to the stepper is not as ridged as I
desired thus what force is being applied by the motor isn’t truly being outputted through the
mechanics.
Albeit a full functionality test did not get to be completed the final analysis would
have consisted of timed activities such as moving various objects through clear and obstacle paths to
a designated area. I do not have a pre-determined base line upon which to compare the project to as
a result of the nature of it as it would be unfair to solely compare it to the commercial arms but
ideally it could complete the tasks in relatively close enough times. Another block of tests I had
devised was to measuring the weight lifting capacity e.g. a mouse, an empty bottle, a glass and a full
glass and lastly ability to perform novelty tasks. Can the user adequately control the force level of
the arm so as; to shake the hand of another person, can they tie their shoe laces, to grip florists
foam and measure the indents. Completion of this exercise would be to judge force applied although
this would be mostly a visual gauge use of force sensors like force sensitive resistors would provide
relevant data to conclude any notable variation in grip strength
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
22
Aisling Lee C12358536
Conclusion
Due to a lack of data to analyse I cannot definitively declare this project a success nor
compare it against the previously mentioned speed and dexterity test but as I plan to further my
development and design of the prototype I believe that I should be able to do so with latter models.
The final prototype for this submission can be seen in the appendix. It is noteworthy that as
one of the first prototypes it is not as exactly envisioned, for example the outer shell is industrial
pipe as using thermoplastics was beyond the budget for this project. Also all aspect be it mechanical
or electrical show points requiring refinement. Not attaining this final fully functioning prototype,
including being tested, in time for publishing was due to falling behind schedule in the closing weeks.
This can be contributed to many factors such as delay in getting parts, time management e.g.
allowing oneself to become too immersed in one facet of the project thus neglecting the others and
lastly unforeseen circumstances of issues encountered mainly with the build as I had only completed
one prototype.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
23
Aisling Lee C12358536
Works Cited
[1] P. H. I. a. I. P. (. T. D. o. E. M. a. H. P. (. Chapal Khasnabis, “Standards for Prosthetics and
Orthotics Service Provision,” International Society for Prosthetics and Orthotics, 2015.
[2] R. Lorenzi, “Discovery News,” 02 October 2012 . [Online]. Available:
http://news.discovery.com/history/ancient-egypt/ancient-egypt-wooden-toes-prosthetics-
121002.htm. [Accessed 04 03 2016].
[3] N. Robinson, “myarmoury.com,” 25 June 2006. [Online]. Available:
http://myarmoury.com/talk/viewtopic.php?t=7161. [Accessed 04 03 2016].
[4] T. N. I. Encyclopædia, “WikiSource,” 1905. [Online]. Available:
https://en.wikisource.org/wiki/The_New_International_Encyclop%C3%A6dia/Berlichingen,_G%
C3%B6tz_von. [Accessed 04 03 2016].
[5] TeachMeAnatomy, “TeachMeAnatomy.info,” 1 April 2016. [Online]. Available:
http://teachmeanatomy.info/upper-limb/muscles/anterior-forearm/. [Accessed 5 April 2016].
[6] teachmeanatomy, “teachmeanatomy.info,” 1 April 2016. [Online]. Available:
http://teachmeanatomy.info/upper-limb/muscles/posterior-forearm/. [Accessed 5 April 2016].
[7] M. Douglas G. Smith, “amputee-coalition.org,” upper-limb-prosthetics-part-2, August 2007.
[Online]. Available: http://www.amputee-coalition.org/resources/upper-limb-prosthetics-part-
2/. [Accessed 25 03 2016].
[8] G. S. D. H. P. Liz Haverkate, “Assessment of body-powered upper limb prostheses by able-bodied
subjects, using the Box and Blocks Test and the Nine-Hole Peg Test.,” International Society for
Prosthetics and Orthotics, Delft, Netherlands, 2014.
[9] North Western University , “BME 366 Lab,” [Online]. Available:
http://smpp.northwestern.edu/bmec66/weightlifting/emgback.html. [Accessed 13 04 2016].
[10
]
A. G. F. D. Purves D, Neuroscience. 2nd edition., Sunderland (MA): Sinauer Associates, Inc, 2001.
[11
]
Brittanica, Inc, “Synaptic cleft Physiology,” Encyclopedia of brittanica, 2016. [Online]. Available:
http://www.britannica.com/science/synaptic-cleft. [Accessed 15 04 2016].
[12
]
Stedman's, Stedman's Medical Dictionary for the Health Professions and Nursing 7th Edition,
2011.
[13
]
Boundless Biology, “ATP and Muscle Contraction.,” 11 01 2016.. [Online]. Available:
https://www.boundless.com/biology/textbooks/boundless-biology-textbook/the-
musculoskeletal-system-38/muscle-contraction-and-locomotion-218/atp-and-muscle-
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
24
Aisling Lee C12358536
contraction-826-12069/. [Accessed 15 04 2016].
[14
]
Twente Medical Systems International, “tmsi.com,” Twente Medical Systems International,
[Online]. Available: http://www.tmsi.com/applications/item/electromyography. [Accessed 16 04
2016].
[15
]
M. H. F. M.-Y. M.B.I. Raez, “Techniques of EMG signal analysis: detection, processing,
classification and applications,” US National Library of Medicine, 2006.
[16
]
J. H. Nagel, “Biopotential amplifiers,” in Medical Devices and Systems, University of stuttgart.
[17
]
Ottobock, “ottobockus.com,” 2014. [Online]. Available:
http://www.ottobockus.com/media/local-media/prosthetics/upper-
limb/michelangelo/files/michelangelo-brochure.pdf. [Accessed 25 02 2016].
[18
]
R. F. Service, “sciencemag.org,” Sciencemag, 15 October 2015. [Online]. Available:
http://www.sciencemag.org/news/2015/10/sensors-may-soon-give-prosthetics-lifelike-sense-
touch. [Accessed 28 febuary 2016].
[19
]
Defense Advanced Research Projects Agency, “Neurotechnology Provides Near-Natural Sense of
Touch: Revolutionizing Prosthetics program achieves goal of restoring sensation,”
OUTREACH@DARPA.MIL, 2015.
[20
]
D. J. Sanchez, “darpa.mil,” Defense Advanced Research Projects Agency, [Online]. Available:
http://www.darpa.mil/program/revolutionizing-prosthetics. [Accessed 28 febuary 2016].
[21
]
D. S. T. D. M. R. B. T Scott Saponas, “Demonstrating the feasibility of using forearm
electromyography for muscle-computer interfaces,” Proceedings of the SIGCHI Conference on
Human Factors in Computing Systems, pp. 515-524, 2008.
[22
]
Microchip, dsPIC30F Family Reference Manual, Micro Chip Technologies Inc, 2006.
[23
]
J. L. S. A. M. D. R. F. W. Joseph T. Belter, “Mechanical design and performance specifications of
anthropomorphic prosthetic hands: A review,” Journal of Rehabilitation Research &
Development (JRRD), vol. 50, no. 5, p. 599 — 618, 2013.
[24
]
Fact Sheet No. 352, December 2015.
[25
]
S. Rey, “An artificial toe from Egypt-world’s first medical prosthetic?,” 20 December 2015.
[Online]. Available: http://solarey.net/an-artificial-toe-from-egypt/. [Accessed 04 03 2016].
[26
]
Mrjohncummings, “Artificial iron hand estimated to be from 1560–1600 (Wikipedia),” 28 August
2013. [Online]. Available: https://en.wikipedia.org/wiki/File:Iron_artificial_arm,_1560-
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
25
Aisling Lee C12358536
1600._(9663806794).jpg. [Accessed 05 03 2016].
[27
]
A. HODGEKISS, “The Daily Mail,” 05 November 2012. [Online]. Available:
http://www.dailymail.co.uk/health/article-2228107/The-bionic-arm-thats-sophisticated-touch-
type.html. [Accessed 06 03 2016].
[28
]
M. Chorost, “Wired.com,” 20 March 2012. [Online]. Available:
http://www.wired.com/2012/03/ff_prosthetics/. [Accessed 29 March 2016].
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
26
Aisling Lee C12358536
Table of Figures
FIGURE 1 [25] ............................................................................................................................................................5
FIGURE 2 [26] ............................................................................................................................................................5
FIGURE 3 [27] ............................................................................................................................................................5
FIGURE 4 [23] ..........................................................................................................................................................10
FIGURE 5 [30] ..........................................................................................................................................................10
FIGURE 6 [29] ..........................................................................................................................................................10
FIGURE 7 [22] ..........................................................................................................................................................11
FIGURE 8 [33] ..........................................................................................................................................................11
FIGURE 9: POST ENVELOPE DETECTOR...........................................................................................................................12
FIGURE 10: AMPLIFIED EMG SIGNAL............................................................................................................................12
FIGURE 11: NEW DIGITAL OUTPUT SIGNAL ....................................................................................................................13
FIGURE 12: INTRODUCTION OF THRESHOLD ....................................................................................................................13
FIGURE 13: CONSTRUCTED EMG CONNECTOR ................................................................................................................13
FIGURE 14: FINGER CLOSE SKETCH ................................................................................................................................15
FIGURE 15: HAND CLOSE SKETCH ..................................................................................................................................15
FIGURE 16 ...............................................................................................................................................................30
FIGURE 17 ...............................................................................................................................................................31
FIGURE 18: AD263 [34]............................................................................................................................................41
FIGURE 19: LM124N [35].........................................................................................................................................41
FIGURE 20: INSTRUMENTATION AMPLIFIER ....................................................................................................................42
FIGURE 21: GAIN BUFFER ...........................................................................................................................................42
FIGURE 22: VREF GENERATOR .....................................................................................................................................43
FIGURE 23: ENVELOPE DETECTOR.................................................................................................................................44
FIGURE 24: COMPARATOR ..........................................................................................................................................44
FIGURE 25: INSTRUMENTATION CIRCUIT ISOLATED...........................................................................................................45
FIGURE 26: INSTRUMENTATION CIRCUIT IC WIRING DIAGRAM............................................................................................45
FIGURE 27: CONTROL CIRCUIT ISOLATED........................................................................................................................46
FIGURE 28: FULL CIRCUIT............................................................................................................................................47
FIGURE 29: RATCHET .................................................................................................................................................48
FIGURE 30: PAWL .....................................................................................................................................................49
FIGURE 31: BELL CRANK .............................................................................................................................................49
FIGURE 32 ...............................................................................................................................................................51
FIGURE 33 ...............................................................................................................................................................51
FIGURE 34 ...............................................................................................................................................................51
FIGURE 35 ...............................................................................................................................................................52
FIGURE 36 ...............................................................................................................................................................52
FIGURE 37 ...............................................................................................................................................................52
FIGURE 38 ...............................................................................................................................................................52
FIGURE 39 ...............................................................................................................................................................52
FIGURE 40 ...............................................................................................................................................................52
FIGURE 41 ...............................................................................................................................................................52
FIGURE 42 ...............................................................................................................................................................52
FIGURE 43 ...............................................................................................................................................................52
FIGURE 44 ...............................................................................................................................................................52
FIGURE 45 ...............................................................................................................................................................52
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
27
Aisling Lee C12358536
Table of Tables
TABLE 1 [23]............................................................................................................................................................29
TABLE 2...................................................................................................................................................................30
TABLE 3...................................................................................................................................................................31
TABLE 4...................................................................................................................................................................32
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
28
Aisling Lee C12358536
Appendix
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
29
Aisling Lee C12358536
Reference Images
Table 1 [23]
Published general characteristics of commercial prosthetic hands.
Hand Developer
Weight
(g)
Overall
Size
Number
of
Joints
Degrees
of
Freedom
Number
of
Actuators
ActuationMethod
Joint
Coupling
Method
AdaptiveGrip
SensorHand(2011)
[8–9]
Otto Bock 350–500 Glove sizes
7–8 1/4*
2 1 1 DC Motor Fixed pinch No
Vincent Hand(2010)
[10]
Vincent
Systems
– – 11 6 6 DC Motor-Worm Gear Linkage
spanningMCP to
PIP
Yes–
iLimb
(2009) [11]
Touch
Bionics
450–615 180–182 mm
long, 80–75
mm wide,
35–41 mm
thick
11 6 5 DC Motor-Worm Gear Tendon linking
MCP to PIP
Yes–
iLimb Pulse(2010)
[11]
Touch
Bionics
460–465 180–182 mm
long,
80–75 mm
wide,
35–45 mm
thick
11 6 5 DC Motor-Worm Gear Tendon linking
MCP to PIP
Yes–
Bebionic
(2011) [12]
RSL
Steeper
495–539 198 mm long,
90 mm wide,
50 mm thick
11 6 5 DC Motor-
Lead Screw
Linkage
spanningMCP to
PIP
Yes–
Bebionic v2(2011)
[12]
RSL
Steeper
495–539 190–200 mm
long,
84–92 mm
wide,
50 mm thick
11 6 5 DC Motor-
Lead Screw
Linkage
spanningMCP to
PIP
Yes–
Michelangelo(2012)
[13]
Otto Bock ~420 – 6 2 2 – Cam design
withlinks to all
fingers
No
*
Otto Bock glove sizes measured in inches from base of palm to tip of middle finger.
–
Adaptive grip accomplished through electronic torque control, others from adaptive mechanical coupling.
DC = direct current, MCP = metacarpal phalange, PIP = proximal interphalange.
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
30
Aisling Lee C12358536
Flow chart
Table 2
Figure 16
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
31
Aisling Lee C12358536
Table 3
Figure 17
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
32
Aisling Lee C12358536
State table
Table 4
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
33
Aisling Lee C12358536
Code
// Code for Variable Grip Prosthetic Arm
// Written by Aisling Lee DT009/3
// Last Updated 27/04/16
//////////////////Name Libraries Required//////////////////
#include <xc.h>
#include <libpic30.h>
#include <stdio.h>
//////////////////Defining state numbers//////////////////
#define STANDBY 0
#define GRIP_SET 1
#define CLOSING 2
#define OPEN 3
//////////////////Define names for LED output pins//////////////////
#define GREEN _LATB3
#define RED _LATB2
#define YELLOW _LATB1
#define LEVEL_1 _LATB4
#define LEVEL_2 _LATB5
#define LEVEL_3 _LATB6
#define LEVEL_4 _LATB7
//////////////////Define names for input pins//////////////////
#define ANTERIOR _RC15
#define POSTERIOR _RC13
//////////////////Configuration settings for chip//////////////////
_FOSC(CSW_FSCM_OFF & FRC_PLL16); // Fosc=16x7.5MHz, i.e. 30 MIPS
_FWDT(WDT_OFF); // Watchdog timer off
_FBORPOR(MCLR_DIS); // Disable reset pin
//////////////////creating functions prototype///////////////////
void step_forward();
void step_backward();
void servo_angle(double angle);
void start_up_function();
unsigned int read_analog_channel(int channel);
//////////////////stating and initialising
variables////////////////////////////
int state = 0;
int ms_time = 0;
int unit = 256;
int step = 0;
int stepper_position = 0;
int stepper_target = 0;
int level = 0 ;
int scan_cycles = 0;
int printed = 0;
int closed = 0;
double second = 30000000;
double cycle = 30000;
double pw_ms;
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
34
Aisling Lee C12358536
double pdc_per_ms = 937.5;
// Timer 1: Interrupt service routine
void __attribute__((__interrupt__, __auto_psv__)) _T1Interrupt(void)
{
// Clear Timer 1 interrupt flag
IFS0bits.T1IF = 0;
// Increment millisecond count
ms_time = ms_time + 1;
// User feed back for grip level
if (level == 0) {LEVEL_1 = 0; LEVEL_2 = 0; LEVEL_3 = 0; LEVEL_4 = 0;}
//printf("Timer:level == 0 nn"); //monitoring
if (level == 1) {LEVEL_1 = 1; LEVEL_2 = 0; LEVEL_3 = 0; LEVEL_4 = 0;}
//printf("Timer:level == 1 nn"); //monitoring
if (level == 2) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 0; LEVEL_4 = 0;}
//printf("Timer:level == 2 nn"); //monitoring
if (level == 3) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 1; LEVEL_4 = 0;}
//printf("Timer:level == 3 nn"); //monitoring
if (level == 4) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 1; LEVEL_4 = 1;}
//printf("Timer:level == 4 nn"); //monitoring
//function for operating stepper
step = step + 1;
if (step == 3 ) //ms too fast to cycle through so creating a delay
{
step = 0;
if (stepper_position < stepper_target) step_forward(); // if the
position is behind move it forward
else if (stepper_position > stepper_target) step_backward(); // if
position is ahead move it back
}
}
int main()
{
ADPCFG= 0b1111111110111110; // Set Port B pins as digital i/o pins
TRISB = 0b0000000; // LATB digital output for LED's
TRISD = 0b0000; // LATD outputs for Stepper
// Configure analogue input
ADCON1 = 0; // Manually clear SAMP to end sampling, start
conversion
ADCON2 = 0; // Voltage reference from AVDD and AVSS
ADCON3 = 0x0005; // Manual Sample, ADCS=5 -> Tad = 3*Tcy = 0.1us
ADCON1bits.ADON = 1; // Turn ADC ON
// Configure PWM - enable pin PWM1H for Servo
// PWM period calculation = PTPER * pre scale * Tcy = 9470 * 64 *
33.33ns = 20ms
_PMOD1 = 0; // PWM channel 1 mode: 0 for complementary, 1 for
independent
_PEN1H = 1; // PWM1H pin enable: 1 to enable, 0 to disable
_PTCKPS = 3; // PWM pre scaler setting: 0=1:1, 1=1:4, 2=1:16, 3=1:64
PTPER = 20 * pdc_per_ms / 2.0; // Set PWM period to 20ms
PDC1 = 1.5 * pdc_per_ms; // Set PWM pulse width to 1.5ms
_PTEN = 1; // Enable PWM time base to start generating pulses
// Set-up UART for Machine monitoring
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
35
Aisling Lee C12358536
U1BRG = 48; // 38400 baud @ 30 MIPS
U1MODEbits.UARTEN = 1; // Enable UART
//Start up display
start_up_function();
printf("Start up nn"); //monitoring
// Configure Timer 1
// In this example, I'm setting PR1 and TCKPS for 8Hz
PR1 = 30000; // Set the Timer 1 period to 1ms
T1CONbits.TCKPS = 0; // Prescaler (0=1:1, 1=1:8, 2=1:64, 3=1:256)
IEC0bits.T1IE = 1; // Enable Timer 1 interrupt
T1CONbits.TON = 1; // Turn on Timer 1
//Configure Starting State
state = STANDBY;
// Main state machine loop
while (1)
{
while (state == STANDBY) //indicates power on and neutral state
{
if (printed < 1)
{
printed = 1;
printf("STANDBYn"); //monitoring
}
// LED Configuration
GREEN = 0;
RED = 0;
YELLOW = 1;
// Reset servo motor
servo_angle(10);
if (ANTERIOR == 1 && POSTERIOR == 1)
{
//Timer used to reset or retain level
ms_time = 0;
while(ANTERIOR == 1 && POSTERIOR == 1) //CODE CONTRACTION
__delay32(cycle);
if (ms_time < 2000) state = GRIP_SET;
if (ms_time > 2000) state = CLOSING;
printf(" Leaving Standbyt State = %dn", state);
//monitoring
printed = 0;
scan_cycles = 0; // reset scan_cycles
}
}
while (state == GRIP_SET) // Setting Grip Strength
{
if (printed < 1)
{
printed = 1;
printf("GRIP_SETn"); //monitoring
}
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
36
Aisling Lee C12358536
// LEDs
GREEN = 0;
RED = 0;
YELLOW = ((ms_time % 1000) > 500); //want to flash while in
state
if(ANTERIOR == 1 || POSTERIOR == 1)
{
__delay32(second/4);
if (ANTERIOR == 1 && POSTERIOR == 1) // Change state
{
GREEN = 1;
RED = 1;
YELLOW = 1;
while(ANTERIOR == 1 && POSTERIOR == 1); //CODE
CONTRACTION
__delay32(cycle);
state = CLOSING; //change state
ms_time = 0;
printed = 0 ;
printf("Leaving GRIP SETn"); //monitoring
}
else if (ANTERIOR == 0 && POSTERIOR == 1) //GO UP A LEVEL
{
while(ANTERIOR == 0 && POSTERIOR == 1); //POSTERIOR
CONTRACTION
__delay32(cycle);
level = level + 1;
printf(" level = level + 1n"); //monitoring
}
else if (ANTERIOR == 1 && POSTERIOR == 0) //GO DOWN A LEVEL
{
while(ANTERIOR == 1 && POSTERIOR == 0) //ANTERIOR
CONTRACTION
__delay32(cycle);
level = level - 1;
printf(" level = level - 1n"); //monitoring
}
}
}
while (state == CLOSING) //Gripping Item
{
if (printed < 1)
{
printed = 1;
printf("CLOSINGn"); //monitoring
printf("target = %dt position = %dt Level = %d n",
stepper_target, stepper_position, level); //stepper monitoring
}
// LEDs
GREEN = 0;
RED = ((ms_time % 1000) > 500); //want to flash while in
state
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
37
Aisling Lee C12358536
YELLOW = 0;
//__delay32(3000*second);
printf("target = %dt position = %dtn", stepper_target,
stepper_position); //stepper monitoring
if (ANTERIOR == 1 && POSTERIOR == 1) // Change state
{
while(ANTERIOR == 1 && POSTERIOR == 1); //CODE CONTRACTION
__delay32(cycle);
state = GRIP_SET; //change state
ms_time = 0; //reset counter
stepper_target = 0;
printf(" Leaving Closing for grip setn"); //monitoring
}
else if (ANTERIOR == 1 && POSTERIOR == 0) // Change state
{
while(ANTERIOR == 1 ) __delay32(cycle); //CODE CONTRACTION
printf(" Leaving Closing for openn"); //monitoring
printed = 0 ;
stepper_target = 0;
state = OPEN; //change state
}
else if (level == 0)
{
stepper_target = 0;//set hand to open
}
else if (level == 1)
{
stepper_target = 2*unit;//set hand to close
}
else if (level == 2)
{
stepper_target = 4*unit;//set hand to close
}
else if (level == 3)
{
stepper_target = 6*unit;//set hand to close
}
else if (level == 4 )
{
stepper_target = 8*unit;//set hand to close
}
else if (level < 0 )
{
state = GRIP_SET;
level = 0;
}
else if (level > 4 )
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
38
Aisling Lee C12358536
{
state = GRIP_SET;
level = 4;
}
while (closed == 1) //hand closed at desired level and waits
for user to open
{
GREEN = 1;
RED = 0;
YELLOW = 0;
if (printed < 1)
{
printed = 1;
printf(" Closed nn"); //monitoring
printf("target = %dt position = %dt Level = %d n",
stepper_target, stepper_position, level); //stepper monitoring
}
if (ANTERIOR == 1 && POSTERIOR == 1) // Change state
{
while(ANTERIOR == 1 && POSTERIOR == 1); //CODE
CONTRACTION
__delay32(cycle);
GREEN = 0;
RED = 1;
YELLOW = 0;
printf(" Leaving Closed for openn"); //monitoring
state = OPEN; //change state
closed = 0 ;
}
}
}
while (state == OPEN) //Open Grip
{
// LEDs
GREEN = 0;
RED = 1;
YELLOW = 0;
// servo motor moves pawl
servo_angle(180);
//set hand to open
stepper_target = 0;
printf("Openingn"); //monitoring
printf("%d %dn", stepper_target, stepper_position); //stepper
monitoring
if (stepper_target == stepper_position) //hand closed at
desired level and waits for user to open
{
printf("Openedn"); //monitoring
state = STANDBY;
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
39
Aisling Lee C12358536
}
}
}
}
// This function varies the PWM pulse width between
// 1ms for 0 degrees and 2ms for 180 degrees.
//
void servo_angle(double angle)
{
// conversion of pulse width from ms to pdc units for the servo
PDC1 = (0.5 + angle/180.0) * pdc_per_ms;
}
void step_forward()
{
// Move from the current winding to the next one
if (LATD == 0b1000) LATD = 0b0100;
else if (LATD == 0b0100) LATD = 0b0010;
else if (LATD == 0b0010) LATD = 0b0001;
else if (LATD == 0b0001) LATD = 0b1000;
else LATD = 0b0001; // just in case there was no winding previously
active
stepper_position=stepper_position +1; // update stepper position
}
void step_backward()
{
// Move from the current winding to the previous one
if (LATD == 0b1000) LATD = 0b0001;
else if (LATD == 0b0100) LATD = 0b1000;
else if (LATD == 0b0010) LATD = 0b0100;
else if (LATD == 0b0001) LATD = 0b0010;
else LATD = 0b0001; // just in case there was no winding previously
active
stepper_position=stepper_position -1; // update stepper position
}
void start_up_function()
{
//indicates when power is turned on (LEDs flash)
LATB = 0;
int counter = 24;
while(counter--)
{
if (LATB == 0) LATB = 0b10000000;
else LATB = LATB >> 1;
__delay32(second/20);
}
}
// This function reads a single sample from the specified
// analog input. It should take less than 2.5us if the chip
// is running at about 30 MIPS.
//https://roboted.wordpress.com/2015/10/06/uart-printing-example-for-
dspic30f4011-with-stepper-controlled-by-potentiometer/
unsigned int read_analog_channel(int channel)
{
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
40
Aisling Lee C12358536
ADCHS = channel; // Select the requested channel
ADCON1bits.SAMP = 1; // start sampling
__delay32(30); // 1us delay @ 30 MIPS
ADCON1bits.SAMP = 0; // start Converting
while (!ADCON1bits.DONE); // Should take 12 * Tad = 1.2us
return ADCBUF0;
}
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
41
Aisling Lee C12358536
Circuit diagrams
Instrumentation
Figure 18: AD263 [34]
Figure 19: LM124N [35]
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
42
Aisling Lee C12358536
Figure 20: Instrumentation Amplifier
Figure 21: Gain Buffer
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
43
Aisling Lee C12358536
Figure 22: Vref Generator
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
44
Aisling Lee C12358536
Figure 23: Envelope Detector
Figure 24: Comparator
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
45
Aisling Lee C12358536
Figure 25: Instrumentation Circuit Isolated
Figure 26: Instrumentation Circuit IC wiring diagram
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
46
Aisling Lee C12358536
Control
Figure 27: Control Circuit Isolated
From Instrumentation
Circuits
6V
0V
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
47
Aisling Lee C12358536
Complete circuit
Figure 28: Full Circuit
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
48
Aisling Lee C12358536
Working Drawings
Figure 29: Ratchet
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
49
Aisling Lee C12358536
Figure 31: Bell Crank
Figure 30: Pawl
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
50
Aisling Lee C12358536
Prototype
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
51
Aisling Lee C12358536
Figure 34
Figure 32 Figure 33
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
52
Aisling Lee C12358536
Figure 36
Figure 35
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
53
Aisling Lee C12358536
Figure 37
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
54
Aisling Lee C12358536
Figure 38
Figure 40
Figure 39
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
55
Aisling Lee C12358536
Figure 41
Figure 42
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
56
Aisling Lee C12358536
Figure 45
Figure 43
Figure 44
DT009 Actuation and Control of an Upper Limb
Prosthesis for a Transradial Amputee
57
Aisling Lee C12358536

Contenu connexe

En vedette

Rahul CV Latest Update
Rahul CV Latest UpdateRahul CV Latest Update
Rahul CV Latest UpdateRahul jain
 
Company Case Study
Company Case StudyCompany Case Study
Company Case Studyguestb148dca
 
Maleja pwwl
Maleja pwwlMaleja pwwl
Maleja pwwl1Marita
 
Type of companies
Type of companiesType of companies
Type of companiesJismy James
 
Employee relations; focusing on legislations that governs employment relation...
Employee relations; focusing on legislations that governs employment relation...Employee relations; focusing on legislations that governs employment relation...
Employee relations; focusing on legislations that governs employment relation...Judith Kinya
 
¿Es Joomla! usable? @ Joomla! Day 2010
¿Es Joomla! usable? @ Joomla! Day 2010¿Es Joomla! usable? @ Joomla! Day 2010
¿Es Joomla! usable? @ Joomla! Day 2010jordisan RamSys
 
"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns
"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns
"Buy Till You Die": New Perspectives on E-Commerce Buying PatternsLemonTree Fundraising
 
Maxillary Local Anesthesia
Maxillary Local AnesthesiaMaxillary Local Anesthesia
Maxillary Local AnesthesiaIAU Dent
 
Digestive System K-12 Lesson
Digestive System K-12 LessonDigestive System K-12 Lesson
Digestive System K-12 LessonAlskie Miguel
 
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.Theresa Lowry-Lehnen
 

En vedette (17)

ASMC-HLPT
ASMC-HLPTASMC-HLPT
ASMC-HLPT
 
Rahul CV Latest Update
Rahul CV Latest UpdateRahul CV Latest Update
Rahul CV Latest Update
 
Company Case Study
Company Case StudyCompany Case Study
Company Case Study
 
IFR-HU
IFR-HUIFR-HU
IFR-HU
 
RK-FMPC
RK-FMPCRK-FMPC
RK-FMPC
 
Ppt symbiosis
Ppt symbiosisPpt symbiosis
Ppt symbiosis
 
TPM-PRBH
TPM-PRBHTPM-PRBH
TPM-PRBH
 
Maleja pwwl
Maleja pwwlMaleja pwwl
Maleja pwwl
 
Type of companies
Type of companiesType of companies
Type of companies
 
IKWD-PIC
IKWD-PICIKWD-PIC
IKWD-PIC
 
Employee relations; focusing on legislations that governs employment relation...
Employee relations; focusing on legislations that governs employment relation...Employee relations; focusing on legislations that governs employment relation...
Employee relations; focusing on legislations that governs employment relation...
 
¿Es Joomla! usable? @ Joomla! Day 2010
¿Es Joomla! usable? @ Joomla! Day 2010¿Es Joomla! usable? @ Joomla! Day 2010
¿Es Joomla! usable? @ Joomla! Day 2010
 
"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns
"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns
"Buy Till You Die": New Perspectives on E-Commerce Buying Patterns
 
Maxillary Local Anesthesia
Maxillary Local AnesthesiaMaxillary Local Anesthesia
Maxillary Local Anesthesia
 
Digestive System K-12 Lesson
Digestive System K-12 LessonDigestive System K-12 Lesson
Digestive System K-12 Lesson
 
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.
Health Psychology. By Theresa Lowry-Lehnen. Lecturer of Psychology.
 
HEALTH PSYCHOLOGY
HEALTH PSYCHOLOGYHEALTH PSYCHOLOGY
HEALTH PSYCHOLOGY
 

Similaire à ALee_Thesis_print

IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using Artemis
IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using ArtemisIRJET- Powered Exoskeleton for Assisting Upper Limb Disability using Artemis
IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using ArtemisIRJET Journal
 
IRJET- IoT based Artificial CPR Device
IRJET-  	  IoT based Artificial CPR DeviceIRJET-  	  IoT based Artificial CPR Device
IRJET- IoT based Artificial CPR DeviceIRJET Journal
 
IRJET- Artificial Intelligence ARM- Review
IRJET- Artificial Intelligence ARM- ReviewIRJET- Artificial Intelligence ARM- Review
IRJET- Artificial Intelligence ARM- ReviewIRJET Journal
 
Report on automatic door
Report on automatic doorReport on automatic door
Report on automatic doorIndira Kundu
 
Portfolio of Sayeed Mohammed
Portfolio of Sayeed MohammedPortfolio of Sayeed Mohammed
Portfolio of Sayeed MohammedSayeed Mohammed
 
Electromagnetic actuator with variable compliance
Electromagnetic actuator with variable complianceElectromagnetic actuator with variable compliance
Electromagnetic actuator with variable complianceToscana Open Research
 
project second review.pptx
project second review.pptxproject second review.pptx
project second review.pptxMadhanGowdaK
 
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...IJECEIAES
 
Circuit Break Connect Monitoring to 5G Mobile Application
Circuit Break Connect Monitoring to 5G Mobile ApplicationCircuit Break Connect Monitoring to 5G Mobile Application
Circuit Break Connect Monitoring to 5G Mobile ApplicationAIRCC Publishing Corporation
 
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATION
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATIONCIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATION
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATIONijcsit
 
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERVenkata Sai Kalyan Routhu
 
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented Strength
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented StrengthIRJET- Exoskeleton Arm for Therapeutic Applications and Augmented Strength
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented StrengthIRJET Journal
 

Similaire à ALee_Thesis_print (20)

Lab Report, NasaLab
Lab Report, NasaLabLab Report, NasaLab
Lab Report, NasaLab
 
IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using Artemis
IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using ArtemisIRJET- Powered Exoskeleton for Assisting Upper Limb Disability using Artemis
IRJET- Powered Exoskeleton for Assisting Upper Limb Disability using Artemis
 
FINALE
FINALEFINALE
FINALE
 
6_P-I-D_Controller.pdf
6_P-I-D_Controller.pdf6_P-I-D_Controller.pdf
6_P-I-D_Controller.pdf
 
6_P-I-D_Controller.pdf
6_P-I-D_Controller.pdf6_P-I-D_Controller.pdf
6_P-I-D_Controller.pdf
 
IRJET- IoT based Artificial CPR Device
IRJET-  	  IoT based Artificial CPR DeviceIRJET-  	  IoT based Artificial CPR Device
IRJET- IoT based Artificial CPR Device
 
IRJET- Artificial Intelligence ARM- Review
IRJET- Artificial Intelligence ARM- ReviewIRJET- Artificial Intelligence ARM- Review
IRJET- Artificial Intelligence ARM- Review
 
Report on automatic door
Report on automatic doorReport on automatic door
Report on automatic door
 
Portfolio of Sayeed Mohammed
Portfolio of Sayeed MohammedPortfolio of Sayeed Mohammed
Portfolio of Sayeed Mohammed
 
EMBC Paper
EMBC PaperEMBC Paper
EMBC Paper
 
Electromagnetic actuator with variable compliance
Electromagnetic actuator with variable complianceElectromagnetic actuator with variable compliance
Electromagnetic actuator with variable compliance
 
NEETRAC (Chapter 14: Glossary)
NEETRAC (Chapter 14: Glossary)NEETRAC (Chapter 14: Glossary)
NEETRAC (Chapter 14: Glossary)
 
project second review.pptx
project second review.pptxproject second review.pptx
project second review.pptx
 
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...
Observer based dynamic control model for bilaterally controlled MU-LapaRobot:...
 
Circuit Break Connect Monitoring to 5G Mobile Application
Circuit Break Connect Monitoring to 5G Mobile ApplicationCircuit Break Connect Monitoring to 5G Mobile Application
Circuit Break Connect Monitoring to 5G Mobile Application
 
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATION
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATIONCIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATION
CIRCUIT BREAK CONNECT MONITORING TO 5G MOBILE APPLICATION
 
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLERREAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
REAL TIME HEART BEAT MONITORING SYSTEM USING PIC16F876 MICROCONTROLLER
 
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented Strength
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented StrengthIRJET- Exoskeleton Arm for Therapeutic Applications and Augmented Strength
IRJET- Exoskeleton Arm for Therapeutic Applications and Augmented Strength
 
6004312 0000 eng_a_w
6004312 0000 eng_a_w6004312 0000 eng_a_w
6004312 0000 eng_a_w
 
ise sensor
ise sensorise sensor
ise sensor
 

ALee_Thesis_print

  • 1. School of Electrical & Electronic Engineering Bachelor of Engineering Technology in Electrical and Control Systems Engineering (DT 009) Final Year Project 2016 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee Student Name Aisling Lee Student Number C1235856 Supervisor Dr Ted Burke
  • 2. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 1 Aisling Lee C12358536 DECLARATION I, the undersigned, declare that this report is entirely my own written work, except where otherwise accredited, and that it has not been submitted for a degree or other award to any other university or institution. Signed: _____________________________ Date: ________________
  • 3. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 2 Aisling Lee C12358536 Table of Contents Abstract:..................................................................................................................................................4 Introduction:...........................................................................................................................................5 Chapter 2: Research................................................................................................................................7 Anatomy..........................................................................................................................................7 Measurement and recording of bio potential signals.....................................................................8 Control ............................................................................................................................................9 Actuation and mechanics..............................................................................................................10 Quantization and testing...............................................................................................................11 Chapter 3: Design..................................................................................................................................12 Circuitry.............................................................................................................................................12 Control ..............................................................................................................................................14 Mechanics.........................................................................................................................................15 Chapter 4: Testing and results ..............................................................................................................16 Cappagh IDS: Industry testing...........................................................................................................16 Circuitry.............................................................................................................................................17 Control ..............................................................................................................................................20 Mechanics.........................................................................................................................................20 Full assembly.....................................................................................................................................21 Conclusion.........................................................................................................................................22 Works Cited...........................................................................................................................................23 Table of Figures.....................................................................................................................................26 Table of Tables......................................................................................................................................27 Appendix ...............................................................................................................................................28 Reference Images..............................................................................................................................29 Flow chart .........................................................................................................................................30 State table.........................................................................................................................................31 Code..................................................................................................................................................33 Circuit diagrams ................................................................................................................................41 Instrumentation............................................................................................................................41 Control ..........................................................................................................................................46 Complete circuit............................................................................................................................47 Working Drawings.............................................................................................................................48 ......................................................................................................................................................48
  • 4. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 3 Aisling Lee C12358536 Prototype ..........................................................................................................................................50 ..........................................................................................................................................................51
  • 5. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 4 Aisling Lee C12358536 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee Abstract: Using bio potential instrumentation, programming and some simple mechanics to achieved actuation and control of an upper limb prosthetic for a transradial amputee. The prosthesis designed allows for force control of the end effector in the form of a biomimetic hand. Designing the prosthetic required first identification of the muscles, the type of signal I desired to obtain and the conditioning of it. This has been achieved using EMG signals measured from the anterior and posterior upper forearm, passed through an instrumentation amplifier, gain buffer, envelope detector and a comparator. After having achieved a clear digital representation of the electrical activity of the muscle a simple state machine implemented using a dsPIC30F4011 microcontroller which facilitates the desired control of the actuators (a stepper and servo motor). This code provides the user with control over the opening and closing of the hand at any time and at any level desired. Failsafes are also included, lest the user should accidentally activate the closing process at the wrong time or wrong level allowing either a return to the grip level selection or a complete open. The most innovative side of this project is in how it allows a user control over the level of grip applied to a desired object while being easily calibrated to that of the strength of their own residual limb. Many of the modern electromechanical prostheses either require very strong muscles in the residual limb to provide grip control similar to that included in this system or they offer only open/close grip control to the user. My model also achieves all this with minimal thought required on the part of the user by utilising simple and intuitive combinations of muscle activation coupled with visual cues to inform the wearer as to the state or condition of the arm. The initial phase of this project involved a thorough review of the technology used in the design and control of modern electromechanical prostheses. This research yielded evidence of a significant demand for a product such as this. Current solutions are either too expensive, not as suitable for some candidates, or are simply too complex to control. To see this product realised and brought to market first will complete the prototype which is currently in its final stage of assembly and run final tests on it for functionality through base level activities which will allow for quantifying it. Studies have been carried out comparing various impaired arms and prosthesis To facilitate comparison of my results against the results of these existing studies, I modelled my experimental method on theirs.. After developing relevant data there are various agencies and governments willing to fund assistive technologies. Due to the conditions this product was developed it’s very cost effective and mainstream manufacturing would be a very close prospect as I have myself sought manufacturing of the mechanical parts and will be designing a PCB board for the components in due course.
  • 6. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 5 Aisling Lee C12358536 Introduction: “Prosthesis (prosthetic device/product): externally applied device used to replace wholly, or in part, an absent or deficient limb segment (plural: prostheses). Common examples are artificial legs or hands.” [1] When we think of (upper limb) prosthesis we tend to picture the more recent robotic style aids available but prosthesis have been utilised for many years. The oldest recorded prosthetic was that of a wooden and leather toe (see figure 1) circa 950-710 BC originating from ancient Egypt [2]. The earliest if not the first recorded upper limb prosthesis is believed to have been specially made for and owned by Gottfried "Götz" von Berlichingen circa 1508 [3] [4]. Due to loss of his arm in battle he sought for replacement and had a smith manufacture him one, as you can see in figure 2, which had the capabilities to grip a sword. In the preceding years small but significant developments were made in the area such as improved aesthetics and adding in the likes of hooks or interchangeable utensils to allow the prosthesis to be more useful. It wasn’t really until the late 1900s though that we began to see big developments in the diversification in prosthetics. Prosthetics have experienced a surge in advancements in recent years thanks to cheaper and more accessible technologies allowing many companies and even hobbyist’s to work on various different problems. Some of the more impressive developments, such as the BeBionic3 myoelectric hand by RSLSteeper (see figure 3), have multiple capabilities and can execute various intricate movements that would allow completion of tasks which, would normally require such fine motor control of a biological hand. These which until recently could not be matched. Now that ULP’s are beginning to match the capabilities of a human arm the question many are asking is when it will exceed the abilities of biological limbs. My interest into upper limb prosthetics began in 2011 as part of my leaving cert project whereby I began my initial studies into the field and even between then and now (2016) the rate of advancement with the technologies available is in line with that of Moore’s law. The world of prosthetics is a fascinating one but alas although there are many impressive solutions available to users the cost of these options makes these technologies unattainable for many. Having researched into the various directions the field is expanding into I decided that I wanted to, try contribute to this field in the development of possibly a relatively cheap prosthetic that completes certain objectives that many cheap low level models cannot. This goal includes the design and manufacturing of the prosthesis in the most effective and simplest manner where by, the user can control the grip force Figure 1 [25] Figure 2 [26] Figure 3 [27]
  • 7. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 6 Aisling Lee C12358536 applied to an object which would incorporate feedback and fail safes to prevent any unnecessary damage to the prosthetic or the user. To achieve this I elected to use electromyography or EMG to take measurements from both the anterior and posterior muscles of the forearm. Utilising these signals and the ability of the user to activate them individual and simultaneously I was able to devise a pattern of movements to which I could base my control off of. Before I could begin inputting the signals into the microprocessor they first required to be amplified and filtered to provide clean and clear signals. This was achieved by the use of an instrumentation amplifier (of which its reference was provided by a unity gain buffer) to produce one signal from the electrodes, this was passed then into a gain amplifier to further magnify the signal. After the signal was at a desirable level it was filtered through an envelope detector which reduced the smoothened out the signal. Lastly this was passed through a comparator which allows a threshold to be created providing us with a simple on or off output. From the comparator the signal is fed into a dsPIC30F4011 microprocessor which then takes the signals and with coding allows the user muscle activations to control and actuate motors which in turn with automate an end affecter in the form of a mechanical hand.
  • 8. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 7 Aisling Lee C12358536 Chapter 2: Research The required knowledge for this project can be broken down into following headings, anatomy (and its functionality), Measurement and recording of bio potential signals, control, actuation and mechanics and lastly quantization and testing. Worth noting, my selection of the transradial (below the elbow) amputation initially was due to having already looked into transhumeral (above the elbow) but after my research it proved to be the more suitable choice for this project, I will expand further on this in the following passage. Anatomy Before we can begin to attach electrodes and take measurement s we must first gain insight into the muscular system of the body specifically that of the forearm. This is so as to better locate stronger and more active muscles but also to correlate which muscles should be activating with certain hand gestures. Knowledge of the biological construct of the arm will speed up location selection of the probes and remove any guess work. From industry it is widely practiced to take 2 measurements from the forearm due to the ability to activate or contract the anterior and posterior muscles individually or simultaneously thus allowing for more possible patterns to utilise as inputs. The fore arm anterior (inside) consists of 3 levels of muscles, the superficial, intermediate and deep compartments these are used mainly to perform flexion at the wrist and fingers, and pronation [5]. Whereas the posterior (outside) consists of only 2 compartments, superficial and deep, of which they produce extension at the wrist and fingers [6]. Due to the nature under which the prosthetic will be used the muscles selected to be measured will be required to be the stronger more reliable and most easily utilised (the wearer must be able to easily contract the muscles without any great difficulty). The muscles selected would be the extensor carpi ulnaris located in the superficial layer of the posterior forearm (as seen in figure 4) it is used in extension and adduction of wrist. The Flexor Carpi Radialis, located in the superficial compartment of the anterior forearm (see figure 5) for flexion and abduction at the wrist. The nature upon which these muscles will be intact and useable would be in a below-elbow transradial amputation. These muscles due to their nature do not require fine motor control to activate or flex them thus preventing further issues in the operation of the prosthesis as selecting muscles such as the extensor digitorum branch could result in too much concentration and effort on the wearers behalf [7]. This makes what should be an aid to ease daily tasks a hindrance and thus inhibits a prospective higher quality of life. Granted studies have shown over time subjects Figure 4 [6] Figure 5 [5]
  • 9. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 8 Aisling Lee C12358536 using myoelectric arms do develop ability and skill in the actuation of the prosthesis via muscle activation [8] Measurement and recording of bio potential signals There are many methods available to measure biological signals emanated from the body such as electrocardiogram (ECG), electroencephalogram (EEG) and most widely known and readily accessible being electromyography. More commonly referred to as EMG, it is an electro diagnostic method commonly used in medical industry for measuring and reading the electrical activity as a by- product of the contraction within skeletal muscles. These electrical impulses are generated when a motor neuron signal sent from the brain through the spinal cord and arrives at a motor end plate (see figure 6). When received it causes the muscle to release a chemical called Acetylcholine [9] (ACh) which is a neuro transmitter [10]. This chemical is released at the synaptic cleft (see figure 6.1) which is a microscopic gap between neurons [11]. This causes a depolarization referred to as action potential. This action potential is dispersed downward electrically from the muscle surface in a transverse tubule which is a pathway through the plasma membrane of skeletal muscle [12] (see figure 6.2). This in turn causes a release of Calcium Ions (Ca++) (see figure 6.3), this chemical reaction causes cross- bridge binding [13] (see figure 6.4) and as a result the muscle contracts (see figure 6.5). An EMG signal is measuring the summation of the aforementioned action potentials from the muscle fibres adjacent to where the electrode has been placed. Therefore the size and amount of muscles fired or activated is in proportion to the size of the EMG signal recorded There are two methods for obtaining an electrical connection to the muscles. Invasive via insertion of needle like electrodes or the more commonly utilised non-invasive method of surface mounted electrodes. As I am unqualified to use the former I did not continue my research into that field. Surface mounted electrodes require careful placement as per the anatomy construct of the limb you wish to measure from. As seen in figures 4 and 5 there are many muscle groups located in the forearm and selection of which to use for activation is done on a case by case basis (there are many influential variables) but for the purpose of this study the 2 groups mentioned above have the desired level of activity and are more easily trained in subjects with residual limbs. EMG signals operate within the millivolt range roughly between 0mv to 30mV [14] [15] which require amplification for use in control circuits. As a result of outside disturbances, such as low frequency electrical interferences e.g. power lines or radio frequencies. The resulting signal is a combination of the EMG signal and the constant interference potential. Implementation of a differential amplifier is required so as to only obtain the difference in voltage between the two electrodes separately from the common mode interference [16]. To ensure that the common mode interference is sufficiently rejected the amplification of the differential amp must not deviate by Figure 6 [9]
  • 10. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 9 Aisling Lee C12358536 more than 1:100,000. This is referred to as the Common Mode Rejection Ratio or CMRR. This in practice will not be perfectly attainable due to variables such as the impedances of the electrodes, their application pressure, localised characteristics of the skin e.g. scar tissue, wrinkles and even the chemical construct of the skin surface such as application of skin products or even sweating over duration of use will change impedances of the skin-electrode connection. As a result of this some of the common mode interference will be passed through with the signal. Control Many various solutions exist to control upper limb prosthesis. The main distinction is between them are weather they fall into the categories of mechanical and electro mechanical. Mechanical arms are controlled by the use of harnesses, latches and release mechanisms. These are referred to as body powered prosthesis (as seen in figure 7). Most recently prosthesis utilising electromechanical movement have begun to appear more and with multiple variations. Notable models include Ottobock’s “Michelangelo”. This hand encompasses wrist control (extension, flexion or rigid) a posable thumb which can operate about 2 axis’ , high gripping force and very fast operation times between states [17], the aforementioned BeBionic3 myoelectric hand by RSLSteeper which has incredible dexterity and high level control of individual fingers. The next stage of control is the era of sensory prosthesis which provides touch [18] and/or force sensitive feedback to the wearer in real time allowing them to adjust the control level or state of the prosthesis. One such example is the latest DARPA hand which returns the sense of touch [19] to the wearer as part of their revolutionising prosthesis’ program [20]. Research is even being done on controlling computer systems with EMG taken from the forearm [21]. As time passes the methods of controlling the actuation of an arm will evolve and become more refined. Currently many potential candidates are ineligible for electromechanical arms due to weak or poor EMG signals. Figure 7 [28]
  • 11. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 10 Aisling Lee C12358536 Actuation and mechanics There are various methods to control the actuation of upper limb prosthesis as can be seen in table 1 published as a result of a study analysing the different methods to control the motion. I have found companies elect to use DC motors due to the inexpensiveness for mass production, ease of application and control. Many modern limbs (including those mentioned in table 1) focus on actuation of individual fingers and wrist control affording the wearer multiple degrees of freedom and grip variations. Also the mechanics seem to be similar in most systems (use of worm and worm wheels) but there are some outliers notably servo motors which do not appear on this table but do however receive mention within the article. While seemingly absent from many of the high end prosthesis they do however seem synonymous with the latest category of prosthesis, that being the 3D printed models. These have become more prevalent in the last few years due to more people gaining access to 3D printers and also being able to customise and even completely design their own prosthesis. The most common (hand) models are body powered using linkages to latch and unlatch the prosthesis through open and closed positions. As time passes though many are testing out usage of actuators in their own designs and many “start-ups” 3D printing and developing their own electromechanical hands can be found such as the EXII-Hackberry by Wevolver. This is an open source project utilising 3D printing technologies, simple circuitry and a raspberry pi controller, all of which allow for this project to be very open to hobbyists to work and develop from. Figure 4 [23] Figure 6 [29] Figure 5 [30]
  • 12. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 11 Aisling Lee C12358536 Quantization and testing This aspect of prosthesis’ is relatively new, currently in Ireland there is no such method to quantify, compare and contrast upper limb prosthesis. Only recently has a government recognised program been developed for lower limb prosthesis. Internationally however there has been some progress. With reference to two particular studies, the first being a comparative study between a body-powered prosthesis, a myoelectric hook and a myoelectric hand [22]. This study showed that the simpler means provided higher more desirable results in usage over the short term but there was also a correlation between the times tasks were completed in with attempt numbers. The myoelectric hand was the poorest performance due to the users needing to concentrate more to operate it but as mentioned the more attempts they completed the better they performed.it is worth noting that all of the subjects were able bodied thus removing any possibility of experience or skill in usage of any of the above mentioned prosthesis types. Another interesting study was done to contrast the abilities of people with what is commonly referred to as flailing arm syndrome. This is a situation where by the subject has lost all or majority of function and/or control of their arm. Such scenarios can commonly result in the sufferer seeking out voluntary amputation. It is such subjects that this study focuses on. It compares the subject executing timed tasks with their affected arm, controlling a myoelectric prosthesis pre amputation and finally completing the tasks post amputation [23]. Due to the nature of the subject electing to take part in the project we instantly see improvement in ability to complete the tasks and the time taken to do so once the myo arm is given to them. We also see another level of improvement once the subject has received their amputation and is correctly fitted with their prosthesis. This is an interesting study as it is very easily replicated which will be discussed later in regards to test development for this project. Figure 8 [33] Figure 7 [22]
  • 13. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 12 Aisling Lee C12358536 Chapter 3: Design Circuitry Due to the analogue nature of the signal combined with these possible interferences, creating a clean and clear signal is vital. Also it must be noted that small or short muscle activation can occur unintentionally which must be disregarded when it comes to the operation and activation of the control system. Lastly if a conditioned analogue signal was to be utilised then the prosthesis would be required to be specifically programmed as per the wearer and their individual muscle abilities. As a result of the aforementioned factors I elected to implement circuitry to produce a clean digital signal that can be calibrated to that of the wearer’s abilities before it is inputted into the control circuitry. The first stage of the instrumentation circuitry is connecting the EMG probes through 10KΩ to the instrumentation amplifier. The resistor is to ensure safety of the subject although there should be no dangerous current levels flowing throughout this circuit. The instrumentation amplifier is achieved using an AD263 integrated chip consisting of two non-inverting op-amps and an inverting amplifier (the construction and pin diagram of which can be seen in figure 18). The resistive values for all resistors excluding the gain resistor (denoted as 𝑅 𝑔) on the schematic are preselected by the manufacturer and fabricated internally in the IC. The internal wiring of which can be seen in figure 19. The rest of the amplifiers used will be located within an LM124n quad amp. This IC was selected for this project was as a direct result of economy of space within the circuit board. From the AD263 (with a gain of 10) the voltage is stepped up from millivolts to volts with a gain buffer (figure21) also with gain of 10. From there the signal is at a level that would be suitable for the micro controller but with a lot of noise and very fast oscillations it’s not as easily utilised (see figure 10). From this point using circuitry the signal is smoothened out and converted to a digital signal. It is first passed through an envelope detector (figure 22), which in theory should produce a signal like that in red as seen in figure 9. Figure 9: Post Envelope Detector Figure 10: Amplified EMG Signal
  • 14. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 13 Aisling Lee C12358536 After the signal has been converted to a cleaner one through reducing the slew rate we then pass the signal to the next stage. As part of the comparator (see figure 23) a threshold is then introduced as seen in green in figure 11. This threshold is a variable controlled by a varistor, as previously mentioned the strength of the EMG from each individual varies, after the signal has attained a level equal to or greater than the threshold the op amp is saturated high giving the appearance of a digital output which should appear same as the purple signal in figure 12. As described above there are 2 op amps being used in conjunction with the AD263 to condition the signal there is also another used to generate a reference voltage see figure 22. This is a direct result of needing a reliable and noise free signal but also as the system is operating between 0V to 6V the saturation voltages of the amps selected is estimated to be around 3.5V, thus a reference of 1.33V is created. The college provided me with electrode pads to aid in my experimenting but unfortunately there were no electrode probes available thus while also developing the circuit necessity required construction of EMG electrodes to be constructed. While inspecting the pads various methods to connect onto them came to mind but none ensured a sound connection that could be guaranteed each time the project required to be reset. I discovered the node onto which you connect the probes to the electrode pad was very similar to a commercial ECG monitor worn regularly by athletes. Upon investigation I further found the reciprocal connection to be the same as a common snap button found used in modern textiles. From these buttons I constructed a simple probe that provided good repeatable solid connections. Figure 12: Introduction of threshold Figure 11: New Digital Output Signal Figure 13: constructed EMG connector
  • 15. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 14 Aisling Lee C12358536 Control The control aspect of this project is based around a dsPIC30F4011 micro controller with the program written to it in C. This chip was selected based on familiarity and sample codes already written. Using the data sheet and family reference manual [22] the final state machine was realised. Initially the design was to obtain signals from 2 different locations on the body e.g. bicep and shoulder, but after discussions with a prosthetic and orthotics technician the focus shifted from this to taking 2 independent signals from one location (the forearm) and utilisation of patterns to control the state machine. The new locations (the anterior and posterior forearm) provides 2 independent signals when individually activated but when both are contracted this can be utilised as a third option. The main body and layout of the code originated from code written for a workout timer [25]. It was from this the current system was adapted and expanded. As can be seen from the state table (table 4) and flow chart in figure 16 the process for the prosthesis is as follows; Main power on activates a start-up sequence flashing all lights to check each and operates the servo to again check functionality. This sequence lasts a couple of seconds and after which the arm enters standby which is indicated by a solid yellow light. When the user wants to switch state they use a code contraction (contraction of both anterior and posterior muscles simultaneously). If the contraction lasts longer than 3 seconds then the user will go straight to the closing state at whatever the previous level set was (upon start-up it is set to 0). If the contraction lasts less than 3 seconds the state machine enters the grip set state (indicated by a flashing yellow light). Within this state the user can select the level of force or grip they wish to apply ranging from 0 to 4 by incrementing it with a posterior flexing motion or decrement it with an anterior flexing motion. Once the desired level is achieved executing a code contraction will move the system from the grip set state to the closing state, indicated by a flashing red light, the hand will tighten to close the corresponding level selection while the level is also represented on a strip of red LEDs if however at any point while the hand is closing the user decides to abort, a code contraction will return them to the grip set state and an anterior motion will go straight to open. After the desired level has been obtained the closed state is indicated by a solid green light. Once the user wishes to open the hand a code contraction will do so the opening process is indicated by a solid red light.
  • 16. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 15 Aisling Lee C12358536 Mechanics Due to a minimal background in mechanics but also a desire to create a simple system I elected to operate the whole hand with ideally one motor. The final solution utilises 2. The design for the hand started as a concept idea with the goal for a manipulator that was biomimetic but again simple to control. I began looking into various natural occurring mechanical systems that resembled human hand closure. The motion and bend of a fishing rod brought about the first initial design as seen in figure 13. The final implementation of the design came from a similar concept found on Instructables [26]. The fingers consist of flexible conduit with notches cut out. A piece of string is ran the length of the finger and affixed at the top. The other end of the string leads down to a bell crank a concept sketch can be seen in figure 14. From the bell crank only one string is required to manipulate the opening and closing of the hand. After a method for closing the hand was devised the mechanisms to do so with were required. I opted to use a ratchet and pawl so as to capitalise on its ability to hold position without requiring any activation of or putting strain on the actuators. The ratchet and pawl (along with the bell crank) were drawn up using the CAD software solid works and laser cut to custom fit the project. Figure 14: finger close sketch Figure 15: hand close sketch
  • 17. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 16 Aisling Lee C12358536 Chapter 4: Testing and results Cappagh IDS: Industry testing IDS Cappagh is the fore front of prosthesis and orthopaedics in Ireland. In their hospital they bring patients through all the required steps from consulting, analysis fitting and maintenance of various types of prosthesis and orthopaedics. My connection with the hospital first began in 2011 when I visited it as part of research for my leaving cert technology project. I contacted them once again upon confirmation of my project proposal approval in hopes to gain more first-hand industry insight. Over the Easter mid-term I had 2 appointments the first being a consultation with one of their foremost upper limb technicians. During this consultation I presented my project idea and discussed how I hope to gain a greater understanding of the prosthetic process as a whole (from initial consultations, to selection of prosthesis and follow up consultations). I learned a great deal from my visits, one of the most crucial points being the method by which they find and utilize the signals in the arm. Initially the patient flexes their muscles as the technician feels around the residual limb. In my case the technician examined my forearm (as if I were a trans-radial amputee), this is so as to find what they referred to as the belly of the desired muscle (or the largest/ strongest part) in which the patient will ultimately use to control their prosthesis. After the technician has found a desirable area they begin placing myoelectric electrodes at various points within the area and sampling signals till they find the strongest one. The electrodes used during my consultations were MyoBock Electrodes. Due to my desired operation within my own prosthetic I was fitted with electrodes which measured my protagonist and antagonistic muscles within my forearm. This allowed me to use each individually to open or close a simulated hand or simultaneously (a code contraction) to switch the simulation state. I also partook in typical pre- prosthesis training whereby I had to control a simulation hand and then play a game akin to "flappy birds" with sole control of the cursor coming from the anterior and posterior signals taken from my forearm.
  • 18. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 17 Aisling Lee C12358536 Circuitry Testing of the control circuit proved quite straightforward. After initial construction I ran simple code to test the wiring such as LED control. Also seeing as the circuit was very similar to that used in the tabata timer [25] I ran that code to check the motors. After initial tests construction of the instrumentation circuit then took place. As each stage was completed it was connected to an oscilloscope to test the output resembled that of what was desired. Some samples of early testing can be seen below. The first set depicts the noisy signal obtained before the envelope detector during initial stages of testing. The last graph depicts the events recorded with a test subject operating the arm through all its state pre final parts assembly.
  • 19. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 18 Aisling Lee C12358536 Peak 635 -806 Peak 695 -796 0 100 200 300 400 500 600 700 800 900 0 1000 2000 3000 4000 5000 6000 Magnitude(du) Time (ms) Test 13/04/16 15:31 - Anterior positive flex Series1 0 100 200 300 400 500 600 700 800 900 0 1000 2000 3000 4000 5000 6000 Magnitude(DU) Time (ms) Test 13/04/16 15:47 - Anterior Code contraction Series1
  • 20. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 19 Aisling Lee C12358536 Peak 226/110 Signals recorded while user controls system 0 50 100 150 200 250 0 1000 2000 3000 4000 5000 6000 Magnitude(DU) Time (ms) Test 13/04/16 16:03 - Anterior antagonist flex Series1 -200 0 200 400 600 800 1000 0 50000 100000 150000 200000 250000 300000 350000 Amplitude Time (ms) 21-55-51 08/05/2016 Series1
  • 21. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 20 Aisling Lee C12358536 Control The control aspect was the most successful and easiest to test. Multiple pieces of footage of the code being successfully executed were obtained and as a result I would deem it a solid model from which to continue building. A force measuring system which could have been used for hardware safeguarding but also to place a tangible value on the force applied was developed but was not realised in this prototype version. This application could also have added to the testing of the final assembly. The code would read the following and would proceed the “if” statements in the closing state. force_now = read_analog_channel(0); if (stepper_target =! stepper_position) force_last == force_now; force_now = read_analog_channel(0); if (stepper_target =! stepper_position && abs(force_last- force_now) < 5) closed = 1; if (stepper_target == stepper_position) closed = 1; If this piece of code were to have been included the flow chart to represent the state machine can be seen in figure 17 Mechanics The concept for controlling the hand (conduit and string connected to the bell crank) was prototyped before the rest of the project began as how it functioned would have a huge impact on the kind of circuit necessary and also where the focus of the project was to lie. Upon initial test the hand open and close method seemed very promising granted that the mechanics and circuitry would hold up.
  • 22. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 21 Aisling Lee C12358536 Full assembly Unfortunately upon full assembly there were a few issues namely a circuit failure which resulted in overheating and smoking of a component and at time of print it is yet to be resolved. However the control aspect functions as expected and the hand is able to close albeit not to the level I had envisioned this is due to the torque on the motor not being quite strong enough to wind in the line but also the bonding method of the ratchet to the stepper is not as ridged as I desired thus what force is being applied by the motor isn’t truly being outputted through the mechanics. Albeit a full functionality test did not get to be completed the final analysis would have consisted of timed activities such as moving various objects through clear and obstacle paths to a designated area. I do not have a pre-determined base line upon which to compare the project to as a result of the nature of it as it would be unfair to solely compare it to the commercial arms but ideally it could complete the tasks in relatively close enough times. Another block of tests I had devised was to measuring the weight lifting capacity e.g. a mouse, an empty bottle, a glass and a full glass and lastly ability to perform novelty tasks. Can the user adequately control the force level of the arm so as; to shake the hand of another person, can they tie their shoe laces, to grip florists foam and measure the indents. Completion of this exercise would be to judge force applied although this would be mostly a visual gauge use of force sensors like force sensitive resistors would provide relevant data to conclude any notable variation in grip strength
  • 23. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 22 Aisling Lee C12358536 Conclusion Due to a lack of data to analyse I cannot definitively declare this project a success nor compare it against the previously mentioned speed and dexterity test but as I plan to further my development and design of the prototype I believe that I should be able to do so with latter models. The final prototype for this submission can be seen in the appendix. It is noteworthy that as one of the first prototypes it is not as exactly envisioned, for example the outer shell is industrial pipe as using thermoplastics was beyond the budget for this project. Also all aspect be it mechanical or electrical show points requiring refinement. Not attaining this final fully functioning prototype, including being tested, in time for publishing was due to falling behind schedule in the closing weeks. This can be contributed to many factors such as delay in getting parts, time management e.g. allowing oneself to become too immersed in one facet of the project thus neglecting the others and lastly unforeseen circumstances of issues encountered mainly with the build as I had only completed one prototype.
  • 24. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 23 Aisling Lee C12358536 Works Cited [1] P. H. I. a. I. P. (. T. D. o. E. M. a. H. P. (. Chapal Khasnabis, “Standards for Prosthetics and Orthotics Service Provision,” International Society for Prosthetics and Orthotics, 2015. [2] R. Lorenzi, “Discovery News,” 02 October 2012 . [Online]. Available: http://news.discovery.com/history/ancient-egypt/ancient-egypt-wooden-toes-prosthetics- 121002.htm. [Accessed 04 03 2016]. [3] N. Robinson, “myarmoury.com,” 25 June 2006. [Online]. Available: http://myarmoury.com/talk/viewtopic.php?t=7161. [Accessed 04 03 2016]. [4] T. N. I. Encyclopædia, “WikiSource,” 1905. [Online]. Available: https://en.wikisource.org/wiki/The_New_International_Encyclop%C3%A6dia/Berlichingen,_G% C3%B6tz_von. [Accessed 04 03 2016]. [5] TeachMeAnatomy, “TeachMeAnatomy.info,” 1 April 2016. [Online]. Available: http://teachmeanatomy.info/upper-limb/muscles/anterior-forearm/. [Accessed 5 April 2016]. [6] teachmeanatomy, “teachmeanatomy.info,” 1 April 2016. [Online]. Available: http://teachmeanatomy.info/upper-limb/muscles/posterior-forearm/. [Accessed 5 April 2016]. [7] M. Douglas G. Smith, “amputee-coalition.org,” upper-limb-prosthetics-part-2, August 2007. [Online]. Available: http://www.amputee-coalition.org/resources/upper-limb-prosthetics-part- 2/. [Accessed 25 03 2016]. [8] G. S. D. H. P. Liz Haverkate, “Assessment of body-powered upper limb prostheses by able-bodied subjects, using the Box and Blocks Test and the Nine-Hole Peg Test.,” International Society for Prosthetics and Orthotics, Delft, Netherlands, 2014. [9] North Western University , “BME 366 Lab,” [Online]. Available: http://smpp.northwestern.edu/bmec66/weightlifting/emgback.html. [Accessed 13 04 2016]. [10 ] A. G. F. D. Purves D, Neuroscience. 2nd edition., Sunderland (MA): Sinauer Associates, Inc, 2001. [11 ] Brittanica, Inc, “Synaptic cleft Physiology,” Encyclopedia of brittanica, 2016. [Online]. Available: http://www.britannica.com/science/synaptic-cleft. [Accessed 15 04 2016]. [12 ] Stedman's, Stedman's Medical Dictionary for the Health Professions and Nursing 7th Edition, 2011. [13 ] Boundless Biology, “ATP and Muscle Contraction.,” 11 01 2016.. [Online]. Available: https://www.boundless.com/biology/textbooks/boundless-biology-textbook/the- musculoskeletal-system-38/muscle-contraction-and-locomotion-218/atp-and-muscle-
  • 25. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 24 Aisling Lee C12358536 contraction-826-12069/. [Accessed 15 04 2016]. [14 ] Twente Medical Systems International, “tmsi.com,” Twente Medical Systems International, [Online]. Available: http://www.tmsi.com/applications/item/electromyography. [Accessed 16 04 2016]. [15 ] M. H. F. M.-Y. M.B.I. Raez, “Techniques of EMG signal analysis: detection, processing, classification and applications,” US National Library of Medicine, 2006. [16 ] J. H. Nagel, “Biopotential amplifiers,” in Medical Devices and Systems, University of stuttgart. [17 ] Ottobock, “ottobockus.com,” 2014. [Online]. Available: http://www.ottobockus.com/media/local-media/prosthetics/upper- limb/michelangelo/files/michelangelo-brochure.pdf. [Accessed 25 02 2016]. [18 ] R. F. Service, “sciencemag.org,” Sciencemag, 15 October 2015. [Online]. Available: http://www.sciencemag.org/news/2015/10/sensors-may-soon-give-prosthetics-lifelike-sense- touch. [Accessed 28 febuary 2016]. [19 ] Defense Advanced Research Projects Agency, “Neurotechnology Provides Near-Natural Sense of Touch: Revolutionizing Prosthetics program achieves goal of restoring sensation,” OUTREACH@DARPA.MIL, 2015. [20 ] D. J. Sanchez, “darpa.mil,” Defense Advanced Research Projects Agency, [Online]. Available: http://www.darpa.mil/program/revolutionizing-prosthetics. [Accessed 28 febuary 2016]. [21 ] D. S. T. D. M. R. B. T Scott Saponas, “Demonstrating the feasibility of using forearm electromyography for muscle-computer interfaces,” Proceedings of the SIGCHI Conference on Human Factors in Computing Systems, pp. 515-524, 2008. [22 ] Microchip, dsPIC30F Family Reference Manual, Micro Chip Technologies Inc, 2006. [23 ] J. L. S. A. M. D. R. F. W. Joseph T. Belter, “Mechanical design and performance specifications of anthropomorphic prosthetic hands: A review,” Journal of Rehabilitation Research & Development (JRRD), vol. 50, no. 5, p. 599 — 618, 2013. [24 ] Fact Sheet No. 352, December 2015. [25 ] S. Rey, “An artificial toe from Egypt-world’s first medical prosthetic?,” 20 December 2015. [Online]. Available: http://solarey.net/an-artificial-toe-from-egypt/. [Accessed 04 03 2016]. [26 ] Mrjohncummings, “Artificial iron hand estimated to be from 1560–1600 (Wikipedia),” 28 August 2013. [Online]. Available: https://en.wikipedia.org/wiki/File:Iron_artificial_arm,_1560-
  • 26. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 25 Aisling Lee C12358536 1600._(9663806794).jpg. [Accessed 05 03 2016]. [27 ] A. HODGEKISS, “The Daily Mail,” 05 November 2012. [Online]. Available: http://www.dailymail.co.uk/health/article-2228107/The-bionic-arm-thats-sophisticated-touch- type.html. [Accessed 06 03 2016]. [28 ] M. Chorost, “Wired.com,” 20 March 2012. [Online]. Available: http://www.wired.com/2012/03/ff_prosthetics/. [Accessed 29 March 2016].
  • 27. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 26 Aisling Lee C12358536 Table of Figures FIGURE 1 [25] ............................................................................................................................................................5 FIGURE 2 [26] ............................................................................................................................................................5 FIGURE 3 [27] ............................................................................................................................................................5 FIGURE 4 [23] ..........................................................................................................................................................10 FIGURE 5 [30] ..........................................................................................................................................................10 FIGURE 6 [29] ..........................................................................................................................................................10 FIGURE 7 [22] ..........................................................................................................................................................11 FIGURE 8 [33] ..........................................................................................................................................................11 FIGURE 9: POST ENVELOPE DETECTOR...........................................................................................................................12 FIGURE 10: AMPLIFIED EMG SIGNAL............................................................................................................................12 FIGURE 11: NEW DIGITAL OUTPUT SIGNAL ....................................................................................................................13 FIGURE 12: INTRODUCTION OF THRESHOLD ....................................................................................................................13 FIGURE 13: CONSTRUCTED EMG CONNECTOR ................................................................................................................13 FIGURE 14: FINGER CLOSE SKETCH ................................................................................................................................15 FIGURE 15: HAND CLOSE SKETCH ..................................................................................................................................15 FIGURE 16 ...............................................................................................................................................................30 FIGURE 17 ...............................................................................................................................................................31 FIGURE 18: AD263 [34]............................................................................................................................................41 FIGURE 19: LM124N [35].........................................................................................................................................41 FIGURE 20: INSTRUMENTATION AMPLIFIER ....................................................................................................................42 FIGURE 21: GAIN BUFFER ...........................................................................................................................................42 FIGURE 22: VREF GENERATOR .....................................................................................................................................43 FIGURE 23: ENVELOPE DETECTOR.................................................................................................................................44 FIGURE 24: COMPARATOR ..........................................................................................................................................44 FIGURE 25: INSTRUMENTATION CIRCUIT ISOLATED...........................................................................................................45 FIGURE 26: INSTRUMENTATION CIRCUIT IC WIRING DIAGRAM............................................................................................45 FIGURE 27: CONTROL CIRCUIT ISOLATED........................................................................................................................46 FIGURE 28: FULL CIRCUIT............................................................................................................................................47 FIGURE 29: RATCHET .................................................................................................................................................48 FIGURE 30: PAWL .....................................................................................................................................................49 FIGURE 31: BELL CRANK .............................................................................................................................................49 FIGURE 32 ...............................................................................................................................................................51 FIGURE 33 ...............................................................................................................................................................51 FIGURE 34 ...............................................................................................................................................................51 FIGURE 35 ...............................................................................................................................................................52 FIGURE 36 ...............................................................................................................................................................52 FIGURE 37 ...............................................................................................................................................................52 FIGURE 38 ...............................................................................................................................................................52 FIGURE 39 ...............................................................................................................................................................52 FIGURE 40 ...............................................................................................................................................................52 FIGURE 41 ...............................................................................................................................................................52 FIGURE 42 ...............................................................................................................................................................52 FIGURE 43 ...............................................................................................................................................................52 FIGURE 44 ...............................................................................................................................................................52 FIGURE 45 ...............................................................................................................................................................52
  • 28. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 27 Aisling Lee C12358536 Table of Tables TABLE 1 [23]............................................................................................................................................................29 TABLE 2...................................................................................................................................................................30 TABLE 3...................................................................................................................................................................31 TABLE 4...................................................................................................................................................................32
  • 29. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 28 Aisling Lee C12358536 Appendix
  • 30. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 29 Aisling Lee C12358536 Reference Images Table 1 [23] Published general characteristics of commercial prosthetic hands. Hand Developer Weight (g) Overall Size Number of Joints Degrees of Freedom Number of Actuators ActuationMethod Joint Coupling Method AdaptiveGrip SensorHand(2011) [8–9] Otto Bock 350–500 Glove sizes 7–8 1/4* 2 1 1 DC Motor Fixed pinch No Vincent Hand(2010) [10] Vincent Systems – – 11 6 6 DC Motor-Worm Gear Linkage spanningMCP to PIP Yes– iLimb (2009) [11] Touch Bionics 450–615 180–182 mm long, 80–75 mm wide, 35–41 mm thick 11 6 5 DC Motor-Worm Gear Tendon linking MCP to PIP Yes– iLimb Pulse(2010) [11] Touch Bionics 460–465 180–182 mm long, 80–75 mm wide, 35–45 mm thick 11 6 5 DC Motor-Worm Gear Tendon linking MCP to PIP Yes– Bebionic (2011) [12] RSL Steeper 495–539 198 mm long, 90 mm wide, 50 mm thick 11 6 5 DC Motor- Lead Screw Linkage spanningMCP to PIP Yes– Bebionic v2(2011) [12] RSL Steeper 495–539 190–200 mm long, 84–92 mm wide, 50 mm thick 11 6 5 DC Motor- Lead Screw Linkage spanningMCP to PIP Yes– Michelangelo(2012) [13] Otto Bock ~420 – 6 2 2 – Cam design withlinks to all fingers No * Otto Bock glove sizes measured in inches from base of palm to tip of middle finger. – Adaptive grip accomplished through electronic torque control, others from adaptive mechanical coupling. DC = direct current, MCP = metacarpal phalange, PIP = proximal interphalange.
  • 31. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 30 Aisling Lee C12358536 Flow chart Table 2 Figure 16
  • 32. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 31 Aisling Lee C12358536 Table 3 Figure 17
  • 33. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 32 Aisling Lee C12358536 State table Table 4
  • 34. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 33 Aisling Lee C12358536 Code // Code for Variable Grip Prosthetic Arm // Written by Aisling Lee DT009/3 // Last Updated 27/04/16 //////////////////Name Libraries Required////////////////// #include <xc.h> #include <libpic30.h> #include <stdio.h> //////////////////Defining state numbers////////////////// #define STANDBY 0 #define GRIP_SET 1 #define CLOSING 2 #define OPEN 3 //////////////////Define names for LED output pins////////////////// #define GREEN _LATB3 #define RED _LATB2 #define YELLOW _LATB1 #define LEVEL_1 _LATB4 #define LEVEL_2 _LATB5 #define LEVEL_3 _LATB6 #define LEVEL_4 _LATB7 //////////////////Define names for input pins////////////////// #define ANTERIOR _RC15 #define POSTERIOR _RC13 //////////////////Configuration settings for chip////////////////// _FOSC(CSW_FSCM_OFF & FRC_PLL16); // Fosc=16x7.5MHz, i.e. 30 MIPS _FWDT(WDT_OFF); // Watchdog timer off _FBORPOR(MCLR_DIS); // Disable reset pin //////////////////creating functions prototype/////////////////// void step_forward(); void step_backward(); void servo_angle(double angle); void start_up_function(); unsigned int read_analog_channel(int channel); //////////////////stating and initialising variables//////////////////////////// int state = 0; int ms_time = 0; int unit = 256; int step = 0; int stepper_position = 0; int stepper_target = 0; int level = 0 ; int scan_cycles = 0; int printed = 0; int closed = 0; double second = 30000000; double cycle = 30000; double pw_ms;
  • 35. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 34 Aisling Lee C12358536 double pdc_per_ms = 937.5; // Timer 1: Interrupt service routine void __attribute__((__interrupt__, __auto_psv__)) _T1Interrupt(void) { // Clear Timer 1 interrupt flag IFS0bits.T1IF = 0; // Increment millisecond count ms_time = ms_time + 1; // User feed back for grip level if (level == 0) {LEVEL_1 = 0; LEVEL_2 = 0; LEVEL_3 = 0; LEVEL_4 = 0;} //printf("Timer:level == 0 nn"); //monitoring if (level == 1) {LEVEL_1 = 1; LEVEL_2 = 0; LEVEL_3 = 0; LEVEL_4 = 0;} //printf("Timer:level == 1 nn"); //monitoring if (level == 2) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 0; LEVEL_4 = 0;} //printf("Timer:level == 2 nn"); //monitoring if (level == 3) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 1; LEVEL_4 = 0;} //printf("Timer:level == 3 nn"); //monitoring if (level == 4) {LEVEL_1 = 1; LEVEL_2 = 1; LEVEL_3 = 1; LEVEL_4 = 1;} //printf("Timer:level == 4 nn"); //monitoring //function for operating stepper step = step + 1; if (step == 3 ) //ms too fast to cycle through so creating a delay { step = 0; if (stepper_position < stepper_target) step_forward(); // if the position is behind move it forward else if (stepper_position > stepper_target) step_backward(); // if position is ahead move it back } } int main() { ADPCFG= 0b1111111110111110; // Set Port B pins as digital i/o pins TRISB = 0b0000000; // LATB digital output for LED's TRISD = 0b0000; // LATD outputs for Stepper // Configure analogue input ADCON1 = 0; // Manually clear SAMP to end sampling, start conversion ADCON2 = 0; // Voltage reference from AVDD and AVSS ADCON3 = 0x0005; // Manual Sample, ADCS=5 -> Tad = 3*Tcy = 0.1us ADCON1bits.ADON = 1; // Turn ADC ON // Configure PWM - enable pin PWM1H for Servo // PWM period calculation = PTPER * pre scale * Tcy = 9470 * 64 * 33.33ns = 20ms _PMOD1 = 0; // PWM channel 1 mode: 0 for complementary, 1 for independent _PEN1H = 1; // PWM1H pin enable: 1 to enable, 0 to disable _PTCKPS = 3; // PWM pre scaler setting: 0=1:1, 1=1:4, 2=1:16, 3=1:64 PTPER = 20 * pdc_per_ms / 2.0; // Set PWM period to 20ms PDC1 = 1.5 * pdc_per_ms; // Set PWM pulse width to 1.5ms _PTEN = 1; // Enable PWM time base to start generating pulses // Set-up UART for Machine monitoring
  • 36. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 35 Aisling Lee C12358536 U1BRG = 48; // 38400 baud @ 30 MIPS U1MODEbits.UARTEN = 1; // Enable UART //Start up display start_up_function(); printf("Start up nn"); //monitoring // Configure Timer 1 // In this example, I'm setting PR1 and TCKPS for 8Hz PR1 = 30000; // Set the Timer 1 period to 1ms T1CONbits.TCKPS = 0; // Prescaler (0=1:1, 1=1:8, 2=1:64, 3=1:256) IEC0bits.T1IE = 1; // Enable Timer 1 interrupt T1CONbits.TON = 1; // Turn on Timer 1 //Configure Starting State state = STANDBY; // Main state machine loop while (1) { while (state == STANDBY) //indicates power on and neutral state { if (printed < 1) { printed = 1; printf("STANDBYn"); //monitoring } // LED Configuration GREEN = 0; RED = 0; YELLOW = 1; // Reset servo motor servo_angle(10); if (ANTERIOR == 1 && POSTERIOR == 1) { //Timer used to reset or retain level ms_time = 0; while(ANTERIOR == 1 && POSTERIOR == 1) //CODE CONTRACTION __delay32(cycle); if (ms_time < 2000) state = GRIP_SET; if (ms_time > 2000) state = CLOSING; printf(" Leaving Standbyt State = %dn", state); //monitoring printed = 0; scan_cycles = 0; // reset scan_cycles } } while (state == GRIP_SET) // Setting Grip Strength { if (printed < 1) { printed = 1; printf("GRIP_SETn"); //monitoring }
  • 37. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 36 Aisling Lee C12358536 // LEDs GREEN = 0; RED = 0; YELLOW = ((ms_time % 1000) > 500); //want to flash while in state if(ANTERIOR == 1 || POSTERIOR == 1) { __delay32(second/4); if (ANTERIOR == 1 && POSTERIOR == 1) // Change state { GREEN = 1; RED = 1; YELLOW = 1; while(ANTERIOR == 1 && POSTERIOR == 1); //CODE CONTRACTION __delay32(cycle); state = CLOSING; //change state ms_time = 0; printed = 0 ; printf("Leaving GRIP SETn"); //monitoring } else if (ANTERIOR == 0 && POSTERIOR == 1) //GO UP A LEVEL { while(ANTERIOR == 0 && POSTERIOR == 1); //POSTERIOR CONTRACTION __delay32(cycle); level = level + 1; printf(" level = level + 1n"); //monitoring } else if (ANTERIOR == 1 && POSTERIOR == 0) //GO DOWN A LEVEL { while(ANTERIOR == 1 && POSTERIOR == 0) //ANTERIOR CONTRACTION __delay32(cycle); level = level - 1; printf(" level = level - 1n"); //monitoring } } } while (state == CLOSING) //Gripping Item { if (printed < 1) { printed = 1; printf("CLOSINGn"); //monitoring printf("target = %dt position = %dt Level = %d n", stepper_target, stepper_position, level); //stepper monitoring } // LEDs GREEN = 0; RED = ((ms_time % 1000) > 500); //want to flash while in state
  • 38. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 37 Aisling Lee C12358536 YELLOW = 0; //__delay32(3000*second); printf("target = %dt position = %dtn", stepper_target, stepper_position); //stepper monitoring if (ANTERIOR == 1 && POSTERIOR == 1) // Change state { while(ANTERIOR == 1 && POSTERIOR == 1); //CODE CONTRACTION __delay32(cycle); state = GRIP_SET; //change state ms_time = 0; //reset counter stepper_target = 0; printf(" Leaving Closing for grip setn"); //monitoring } else if (ANTERIOR == 1 && POSTERIOR == 0) // Change state { while(ANTERIOR == 1 ) __delay32(cycle); //CODE CONTRACTION printf(" Leaving Closing for openn"); //monitoring printed = 0 ; stepper_target = 0; state = OPEN; //change state } else if (level == 0) { stepper_target = 0;//set hand to open } else if (level == 1) { stepper_target = 2*unit;//set hand to close } else if (level == 2) { stepper_target = 4*unit;//set hand to close } else if (level == 3) { stepper_target = 6*unit;//set hand to close } else if (level == 4 ) { stepper_target = 8*unit;//set hand to close } else if (level < 0 ) { state = GRIP_SET; level = 0; } else if (level > 4 )
  • 39. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 38 Aisling Lee C12358536 { state = GRIP_SET; level = 4; } while (closed == 1) //hand closed at desired level and waits for user to open { GREEN = 1; RED = 0; YELLOW = 0; if (printed < 1) { printed = 1; printf(" Closed nn"); //monitoring printf("target = %dt position = %dt Level = %d n", stepper_target, stepper_position, level); //stepper monitoring } if (ANTERIOR == 1 && POSTERIOR == 1) // Change state { while(ANTERIOR == 1 && POSTERIOR == 1); //CODE CONTRACTION __delay32(cycle); GREEN = 0; RED = 1; YELLOW = 0; printf(" Leaving Closed for openn"); //monitoring state = OPEN; //change state closed = 0 ; } } } while (state == OPEN) //Open Grip { // LEDs GREEN = 0; RED = 1; YELLOW = 0; // servo motor moves pawl servo_angle(180); //set hand to open stepper_target = 0; printf("Openingn"); //monitoring printf("%d %dn", stepper_target, stepper_position); //stepper monitoring if (stepper_target == stepper_position) //hand closed at desired level and waits for user to open { printf("Openedn"); //monitoring state = STANDBY;
  • 40. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 39 Aisling Lee C12358536 } } } } // This function varies the PWM pulse width between // 1ms for 0 degrees and 2ms for 180 degrees. // void servo_angle(double angle) { // conversion of pulse width from ms to pdc units for the servo PDC1 = (0.5 + angle/180.0) * pdc_per_ms; } void step_forward() { // Move from the current winding to the next one if (LATD == 0b1000) LATD = 0b0100; else if (LATD == 0b0100) LATD = 0b0010; else if (LATD == 0b0010) LATD = 0b0001; else if (LATD == 0b0001) LATD = 0b1000; else LATD = 0b0001; // just in case there was no winding previously active stepper_position=stepper_position +1; // update stepper position } void step_backward() { // Move from the current winding to the previous one if (LATD == 0b1000) LATD = 0b0001; else if (LATD == 0b0100) LATD = 0b1000; else if (LATD == 0b0010) LATD = 0b0100; else if (LATD == 0b0001) LATD = 0b0010; else LATD = 0b0001; // just in case there was no winding previously active stepper_position=stepper_position -1; // update stepper position } void start_up_function() { //indicates when power is turned on (LEDs flash) LATB = 0; int counter = 24; while(counter--) { if (LATB == 0) LATB = 0b10000000; else LATB = LATB >> 1; __delay32(second/20); } } // This function reads a single sample from the specified // analog input. It should take less than 2.5us if the chip // is running at about 30 MIPS. //https://roboted.wordpress.com/2015/10/06/uart-printing-example-for- dspic30f4011-with-stepper-controlled-by-potentiometer/ unsigned int read_analog_channel(int channel) {
  • 41. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 40 Aisling Lee C12358536 ADCHS = channel; // Select the requested channel ADCON1bits.SAMP = 1; // start sampling __delay32(30); // 1us delay @ 30 MIPS ADCON1bits.SAMP = 0; // start Converting while (!ADCON1bits.DONE); // Should take 12 * Tad = 1.2us return ADCBUF0; }
  • 42. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 41 Aisling Lee C12358536 Circuit diagrams Instrumentation Figure 18: AD263 [34] Figure 19: LM124N [35]
  • 43. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 42 Aisling Lee C12358536 Figure 20: Instrumentation Amplifier Figure 21: Gain Buffer
  • 44. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 43 Aisling Lee C12358536 Figure 22: Vref Generator
  • 45. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 44 Aisling Lee C12358536 Figure 23: Envelope Detector Figure 24: Comparator
  • 46. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 45 Aisling Lee C12358536 Figure 25: Instrumentation Circuit Isolated Figure 26: Instrumentation Circuit IC wiring diagram
  • 47. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 46 Aisling Lee C12358536 Control Figure 27: Control Circuit Isolated From Instrumentation Circuits 6V 0V
  • 48. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 47 Aisling Lee C12358536 Complete circuit Figure 28: Full Circuit
  • 49. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 48 Aisling Lee C12358536 Working Drawings Figure 29: Ratchet
  • 50. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 49 Aisling Lee C12358536 Figure 31: Bell Crank Figure 30: Pawl
  • 51. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 50 Aisling Lee C12358536 Prototype
  • 52. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 51 Aisling Lee C12358536 Figure 34 Figure 32 Figure 33
  • 53. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 52 Aisling Lee C12358536 Figure 36 Figure 35
  • 54. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 53 Aisling Lee C12358536 Figure 37
  • 55. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 54 Aisling Lee C12358536 Figure 38 Figure 40 Figure 39
  • 56. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 55 Aisling Lee C12358536 Figure 41 Figure 42
  • 57. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 56 Aisling Lee C12358536 Figure 45 Figure 43 Figure 44
  • 58. DT009 Actuation and Control of an Upper Limb Prosthesis for a Transradial Amputee 57 Aisling Lee C12358536