emg robot arm: helping hand · emg bionic arm initial validation (frequency response curves): must...

7
ENGN/PHYS 207—Fall 2019 Final Project (option A): Helping Hand EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 Dec 2019 (firm deadline!) Final proof of concept (live demo): must be completed by end of your lab period Thurs, O5 Dec 2019 (firm deadline!) Final Report Due Date: Noon, Tues 10 Dec 2019 Figure 1: Touch Bionics iLimb Ultra. Dexterity is sufficient to squish a foam ball. The motion/grip of the prosthetic hand is driven by the EMG measured on the existing part of the amputee’s forearm. Image credit: http://www.touchbionics.com/products/active-prostheses/i-limb-ultra EMG Robot Arm: Helping Hand The prosthetics field has been undergoing somewhat of a revolution the past decade, thanks to advances in miniaturized electronics, high performance batteries, and machine learning techniques (for example, see Figure 1). As discussed in class, one common control paradigm is to use to measure the electromyogram (EMG)—electrical activity associated with muscular contractions— and actuate in the prosthetic hand according to the EMG analog signal measurements. The prerequisite for such a prosthetic device is to non-invasively measure the electrical activity associated with muscle contractions. Electrodes placed on the skin can measure the electrical signal associated with muscular activity, if the signal is properly filtered and amplified. This is the Electromyogram (EMG). The EMG is processed and interpreted by a computer or microprocessor to convert a pattern of muscular activity measured with electrodes on the skin surface into commands that move motors in a desired manner. For instance, flexing the biceps twice in quick succession might be interpreted as: “Move robotic arm forward-right to grab green squishy ball.” A good prosthetic hand can help perform functions like grasping a water bottle, picking up a pencil, and buttoning clothes, thus restoring a high-quality of life to an amputee. So wouldn’t it be cool to.... build the EMG hardware that measures electrical signals generated by muscular activity and program a microcontroller to do something when a contraction is detected, such as actuate a motor to turn a robot arm? So, welcome to this final project, which gives you the opportunity to do exactly that! 1

Upload: others

Post on 07-Aug-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

ENGN/PHYS 207—Fall 2019Final Project (option A): Helping Hand

EMG Bionic Arm

Initial validation (frequency response curves): must be completed by 5pm Tues, 03Dec 2019 (firm deadline!)

Final proof of concept (live demo): must be completed by end of your lab periodThurs, O5 Dec 2019 (firm deadline!)

Final Report Due Date: Noon, Tues 10 Dec 2019

Figure 1: Touch Bionics iLimb Ultra. Dexterity is sufficient to squish a foam ball. The motion/gripof the prosthetic hand is driven by the EMG measured on the existing part of the amputee’s forearm.Image credit: http://www.touchbionics.com/products/active-prostheses/i-limb-ultra

EMG Robot Arm: Helping Hand

The prosthetics field has been undergoing somewhat of a revolution the past decade, thanks toadvances in miniaturized electronics, high performance batteries, and machine learning techniques(for example, see Figure 1). As discussed in class, one common control paradigm is to use tomeasure the electromyogram (EMG)—electrical activity associated with muscular contractions—and actuate in the prosthetic hand according to the EMG analog signal measurements.

The prerequisite for such a prosthetic device is to non-invasively measure the electrical activityassociated with muscle contractions. Electrodes placed on the skin can measure the electricalsignal associated with muscular activity, if the signal is properly filtered and amplified. This is theElectromyogram (EMG). The EMG is processed and interpreted by a computer or microprocessor toconvert a pattern of muscular activity measured with electrodes on the skin surface into commandsthat move motors in a desired manner. For instance, flexing the biceps twice in quick successionmight be interpreted as: “Move robotic arm forward-right to grab green squishy ball.” A goodprosthetic hand can help perform functions like grasping a water bottle, picking up a pencil, andbuttoning clothes, thus restoring a high-quality of life to an amputee. So wouldn’t it be coolto.... build the EMG hardware that measures electrical signals generated by muscular activity andprogram a microcontroller to do something when a contraction is detected, such as actuate a motorto turn a robot arm? So, welcome to this final project, which gives you the opportunity to doexactly that!

1

Page 2: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

Design Problem Statement

Figure 2: Cheers! EMG-driven robot arm will grip surrogate cup and a second “elbow” joint willrotate upward to position the refreshing beverage for imbibation. Image credits: 123rf.com andAdeept Arduino compatible arm available on Amazon.com.

Develop and implement a system which suitably measures EMG signals to control the angleof servo motors. The servo motor sequence will allow a robot pincer grip + elbow joint to grip afoam cup and raise it up so as if consuming a beverage. In essence, you are tasked with building asimplified prosthetic limb driven by electrical signals generated via muscle contractions.

Phase I—Initial Validation: Your task is to design, build, characterize, and perform proof ofconcept experiments for a circuit that is capable of cleanly measuring the EMG signal.

The net result of Phase I should be sufficient evidence to establish proof-of-concept of: 1)appropriate filtering; 2) appropriate amplification; 4) Arduino measures and displays EMG signalenvelope. This evidence needs to be presented by showing appropriate decibel gain vs. frequencydata, and a quick live-demo with the Arduino serial plotter.

Phase II—Final Proof of Concept: Your system will incorporate an Arduino microcontrollerthat makes analog reads of the EMG signal envelope. In response, the Arduino will output com-mands to a servo motor by an angle proportional to the strength of the measured muscle contraction.In essence, the higher the intensity of the EMG signal, the larger the angle the servo rotation.

The net result of this phase should be a live-demo of your muscle contractions appropriatelycontrolling a robot arm!

Please do NOT tear down your circuit until you get the OK to do so.

Safety Considerations

For safety reasons, under no circumstances should you connect your EMG circuit to ahuman subject without first consulting the instructor! When you are ready the instructorwill consult with you to properly connect EMG skin surface electrodes as well as help safely connect

2

Page 3: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

power supplies to the robot arm motors. The risk of your ever hurting yourself is very low, but stilllet’s play it safe in the lab!

Design Constraints

This section lists various constraints and related considerations:

1. All circuitry must fit on a single breadboard module; the overall footprint on the breadboardshould be relatively small and tidy. Wiring should be neat and tidy, kept to a minimum.

2. Your design may incorporate a maximum of two AD623 instrumentation amps; and oneTLC227x quad op-amp (4 amplifiers total inside one chip).

3. You should design for single power supply operation at +5V and ground, supplied by theArduino or BK precision lab power supply.

4. Arduino ADC input voltages must be strictly unipolar between 0-5 V. Negative voltages canfry the Arduino; ditto for analog inputs > 5 V.

5. You may use any other components you find in the Circuit’s lab (Howe 111). If you desire acomponent or tool which is not present, or you cannot find, please consult with the instructor.

1 EMG Signal Measurement

Electrical signals are generated by the ion flow of Na+,K+, Ca++ necessary to contract muscles.This current flow passes through very small mechanical channels of saline solution distributedthroughout the muscle and surrounding layers. These mechanical channels have some resistanceand capacitance, hence we get a voltage drop thanks to Ohm’s law (V = IZ). It is this small, butdetectable EMG signal we want to appropriately capture. From previous studies, we know thecharacteristic amplitude and frequency range of muscle contractions measured with skin surfaceelectrodes1 and how they need to be manipulated to control a robot arm:

1. EMG signal frequency range is ≈ 10 − 500 Hz. The low frequency noise components (f ≤ 10Hz) often exhibit large amplitudes and need to be more strongly filtered out than the highfrequency noise components (f ≥ 500 Hz). So, the low-frequency components need to be beattenuated at 40 dB/dec. The high frequency noise should be attenuated at 20 dB/dec.

2. EMG signal magnitude measured on the skin surface is typically in the range of ≈ 100−1000µV. In order to be accurately measured and usefully processed by an Arduino to commanda motor to rotor, the amplified EMG signal magnitude should be about 1-2 V oscillationcentered around a 2.5V offset (the midway point in a system powered by 5V and ground).

1c.f. De Luca CJ, The Use of Surface Electromyography in Biomechanics, J. Applied Biomechanics, 1997: 13,135,163. http://delsys.com/decomp/078.pdf

3

Page 4: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

Figure 3: Example EMG (black trace) measured from the forearm over 5 contractions of the forearmmuscle with increasing strength. The average signal intensity trace (orange) is shown overlaid. Itis a rectified and smoothed version of the EMG trace. Green and red triangles indicate on andoff times of each contraction. The inset at bottom left shows the fine temporal detail of the 3rdcontraction. The labels As and An indicate the signal and the noise levels from which the SNR iscomputed.

Don’t amplify too much—the Arduino saturates at 0V and 5 V. Your system must includea single knob that allows the end-user to easily set the voltage gain to satisfy the amplitudeconstraints.

3. Prosthetic hands are often programmed to recognize the the time-averaged intensity ofthe EMG signal. Time averaging (aka rectifying + smoothing) can be accomplished withrectifying (diode) and smoothing (RC circuit). The orange colored trace in Figure 3 is anexample of a smoothed EMG signal with a smoothing time scale of ≈0.1 s = 100 ms.

2 Digital Servo Motors Controlled by EMG signal

In phase II of this project, you’ll interface your EMG measurement circuitry to an Arduino micro-controller. The Arduino will 1) make an analog measurement the EMG signal and 2) actuate amotor to rotate according to the strength of the contraction. There are several considerations tobe aware of when interfacing the analog and digital sides.

4

Page 5: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

1. Analog signal acquisition: Analog signals measured by the Arduino must be in the rangeof 0-5 V. Exceeding either of these limits can fry the Arduino in part or whole. Leave thebbq sauce at home; it doesn’t go well on burnt plastic.

2. It is typical to center the EMG signal about a ≈ 2.5 V reference offset. That allows us to seepositive and negative swings in the input signal. Doing so requires careful implementation ofop-amp biasing using rail-splitting .

3. You must be able to cleanly view the the raw and time-averaged EMG analog signalsusing the Serial Plotter feature in the Arduino IDE. So your Arduino code needs to beprogrammed accordingly to output that data in a format suitable for displaying 2 plots inreal-time.

4. The rectified and time-averaged (smoothed) EMG signal will ultimately be used tocontrol the robot arm. We’ve previously implemented a rectifier + RC smoother in our AMradio receiver build. We will modify that circuitry here to prevent sacrificing the ≈ 0.7Vdiode voltage drop (a significant loss/waste in this case). See Figure 4. Notice the diode isnow wired in the feedback path of the op-amp, which otherwise looks like a buffer. Show thatthe input-output relation for this op-amp circuitry is:

Vout = Vin + Vdiode ≈ Vin + 0.7V.

In other words, the output of the op-amp recovers the approximately 0.7V that would other-wise be lost!

Figure 4: Smoothing Circuit based on diode and RC discharge. The time constant = the smoothingwindow: τ = R1C1.

5. Servo Motor Control: The Arduino will be used to rotate servo motors to a desired positionbased on the strength of the EMG signal. The servo motor, in turn, actuates an articulatedjoint or gripper and/or robotic (prosthetic) arm. We have accomplished very similar operationof a servo in labs from earlier this year (e.g. flex-sensor gesture sensing).

6. Power Supply Considerations: The Arduino power supply will power your analog cir-cuitry only. Its power supply is typically limited to a max current of about 500 mA—-justbarely enough power for a relatively wimpy servo. So we’ll use a separate high-current LiPobattery (or lab bench power supply) to power some beefy servo motors, which typically draw≈ 2 to 3 A max current.

5

Page 6: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

3 Final Report—What to Turn In

Your final report must include standard written work plus one nicely narrated proof-of-conceptvideo. You should present the the following core elements. The full report, including all graphics,must not exceed 8 pages. Figures should be numbered sequentially, with a caption. The Appendixdoes not count toward the 7 page limit; it may be of any length necessary.

1. Introduction:

(a) What circuit system are you building? What is its intended purpose/application, andwhy is it relevant/important?

(b) Brief overview of the system design.

(c) Highlights of main final results achieved

2. System Design and Rationale:

(a) Final circuit diagram(s). You may have one diagram for the analog sensing circuitry;and another for the Arduino + servo digital side of the design. In both cases, clearlylabel all component values. Delineate individual functional blocks and how they areintegrated as a whole (a la Axani’s muon detector circuit diagram we have reviewed inclass).

(b) Provide detailed description of what functional block does, and provide quantitativedesign rationale. For example:

Stage [B] is an active band pass filter. We chose to set the gain to 20x because..., and we set the band pass range to x to y Hz because ... The values for Rand C were chosen based on the following principles/equations....”

(c) Describe how individual functional blocks are integrated into a complete sensing side ofsystem. Justify why you arranged the functional pieces in the manner chosen, tradeoffsinvolved, etc. For example:

We implemented an active band pass filter at each of the EMG electrodeinputs (functional block [A]) and then connected the respective outputs to aninstrumentation amplifier. We opted for this design strategy for two reasons.Firstly, each band-pass filter re-centers the output to a baseline of 2.5 V. Thisis advantageous because the INA 126 instrumentation amplifier configured forsingle-supply operation (0 to +5V operation) shown in stage [C] requires thatinputs be centered around Vcc/2 = 2.5V. Second, this design offers an addedbenefit of an initial filtering and amplification of EMG signals. Thus, the INA126 will only amplify signal components in the EMG range, not noise. Onepotential limitation is that the two active BPFs must be carefully matched tohave the same gain and cutoff frequencies. If the active BPFs are not (near)identical, an unwanted phase shift will be introduces, which iswill be furtheramplified by the INA126 downstream.

(d) Digital/servo design and algorithm: Describe how you mapped the measured EMG signalonto the servo rotation angle.

6

Page 7: EMG Robot Arm: Helping Hand · EMG Bionic Arm Initial validation (frequency response curves): must be completed by 5pm Tues, 03 ... of the prosthetic hand is driven by the EMG measured

3. System Validation Results. This section should show quantitative results which describe,illustrate, and quantify the actual behavior of the circuit. It should also provide sufficientanalysis of the results: Does the circuit work as intended? How did actual performancecompare to theory? Be sure to include:

(a) Pretty plot of the decibel gain vs. frequency, G(f) vs. log10 f for relevant portion ofthe system is crucial here. This graphic must display and compare both theory andexperimental data. Sufficient data should be acquired to establish the system works asdesigned, and properly performs the required filtering and amplification.

(b) A photograph/screenshot/graphic of similar ilk illustrating this diode + RC smoothingportion of the circuit works as advertised.

(c) Proof of concept. Demonstrate via (pretty) figures that the system works as required.

Additionally, post a video of your circuit in action. Provide a live narration and/ordescriptive text that walks the user through the demo. This demo video should clearlyestablish that your design allows you to clearly measure a signal directly related to thestrength of muscle contraction.

4. Conclusion and future work.

How well did your system work overall? What were benefits and limitations of the design?Include at least 2 substantive suggestions for an improved design. Remember to both identifyand issue, and propose a concrete solution for it.

5. Appendix. The appendix has no page limit and should include:

(a) Include input-output relations (transfer functions) for each functional block, which arenot already fully elucidated in the main text.

(b) Theoretical work deriving input-output relationships that we have not previously seenin class.

(c) Arduino code

(d) Matlab code

7