Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

MAE20002 Digital and Data Systems – Projects Guide

Project B: Wearable EMG-Controlled Robotic Claw

1. Project Description

An electromyogram (EMG) measures the electrical activity of muscles at rest and during contraction. EMG signals can be analysed to detect diseases that damage muscle tissue, nerves, or the junctions between nerve and muscle and to find the cause of weakness, paralysis, or muscle twitching. The signals can be also used as a control signal for prosthetic devices such as prosthetic hands, arms, and lower limbs in order to help patients regain regular body function.

In this project, your team is to use an EMG sensor to create two applications. The first application is to create an instant heart rate monitor which should be able to accurately keep track of users heart rate. The second application is to build a wearable EMG- controlled robotic claw which can be worn on the user’s forearm and controlled through the user’s muscle contraction to grasp objects. You should make use of the EMG sensor to measure the muscle  contraction.  This  device  is  expected to help patients with mobility issues to grasp and pick up objects.

This project is relevant to the disciplines of biomedical, electrical and robotics and mechatronics engineering.

2. Design Requirements

1)  Follow the design steps of Engineering Design Process as provided in the Section of General Information.

2)   The  heart  rate  monitor  should  display  the  BPM  (beats  per  minute)  value  in MATLAB environment and allow users to store the BPM recordings. The heart rate measurement should be as accurate as possible and its reading should be updated no less frequently than once every five seconds for live tracking users’ heart rate.

3)   The EMG-controlled robotic claw should be able to be worn on the user’s forearm at a comfortable level by using straps or in the form of glove. The user is allowed to  open  and  close  the  robotic  claw  through  the  control  of his  or  her  muscle contraction at the wrist extensors. The EMG sensor should be used to measure the muscle contraction. The robotic claw could assist the user to grasp a puck (refer to Section 4 for the dimension of the puck) and allow the user to move the grasped object from one location to another.

4)   The robotic  claw  should be made  as  lightweight  as possible  and  aesthetically resemble a human hand. It should be controlled by the supplied motor. Additional components for building the robotic claw mechanism may be supplied subject to the approval of the tutor.

5)   In the design of the two applications, you should use signal filtering techniques to process the measured EMG sensor data.

6)  You may use MATLAB and/or LabVIEW to test and validate the design concepts during your design process. However, you must use MATLAB ONLY to create computer programs to implement your final solution.

3. Demonstration

1)   The performance of your heart rate monitor will be judged by its accuracy. A qualified  heart  rate  monitor  will  be  used  to  measure  the  user’s  heart  rate concurrently with your designed monitor. Their measuring difference will be used to assess your design. You will be given three attempts to demonstrate your heart rate  monitor  and  the  accuracy  of your  design  is  evaluated  by  the  following performance index:

where BPM1 and BPM0 indicate the measurement of your design and the qualified heart rate monitor, respectively; and i indicates the ith attempt.

2)   The performance  of the  robotic  claw  will  be judged by  its  functionality  and reliability. You are required to wear the robotic claw, control it to grasp the puck, and then move it to another position 50cm away. In this demonstration, you should move five pucks sequentially and stack the pucks on top of each other at the destined position. The performance ofyour design will be evaluated by the following index:

PI2  = 20 × N1 + 10 × N2 − 5 × N3

where N1 is the number of pucks successfully delivered and stacked; N2 is the number of pucks successfully delivered to the destined position but not stacked; N3 is the number of times that you need to adjust or repair your robotic claw during the demonstration. For any pucks dropping off from the claw during the delivery, there are no points awarded.

There is only one attempt for this demonstration.

3)  You should demonstrate the understanding of the design details, particularly the filtering design, and clarify the questions raised by the tutor or the class.

4)   The decision of the tutor will be final in any case.

4. Project Components

NI myDAQ ×1

This component includes one NI myDAQ kit and accessories. The control of motors and acquisition of sensors data will be implemented through myDAQ.

Motor driver ×1

The motor driver includes a servo motor driver and the connector for connecting with the sensor. The motor driver can be turned on or off with a switch. The power is supplied through a battery pack.

Do NOT change the wiring between the motor driver and myDAQ.

EMG sensor kit (including 1 EMG sensor and 10 electrodes)

The EMG sensor kit (or called as EKG or ECG sensor) is made by Vernier. It is used to  measure  cardiac  electrical  potential  waveforms  (voltages  produced  during  the contraction of the heart) and to make standard 3-lead EMG tracings to record electrical activity in the heart. It can also be used to collect surface EMG recordings to study contractions in muscles in your arm, leg or jaw. This sensor kit consists of one EMG sensor and a package of disposable electrodes. This sensor should be connected to the analogue input port (AI#0) on the motor driver.

You may be supplied additional electrodes for your project need.

Servo motor ×1

The servo motor allows for precision control of angular position with respect to a given input command. The servo motor should be connected to the pins (indicated with Yellow, Red, Black) on the motor driver. The servo motor is controlled through the analogue output port (AO#0) on myDAQ.

LEGO parts

A collection ofLEGO parts is supplied to each group to design different types ofrobotic claw. Strings and rubber bands are allowed to use in your design.

Straps ×2

The straps are supplied to make the robotic claw wearable on the forearm. You may design other forms of wearables but materials will not be supplied in this project.

Puck ×2

The pucks are supplied to simulate an object for the robotic claw to grasp. The puck is of a diameter of 65mm and a height of 25mm.

Battery pack ×1

The battery pack is supplied to provide powers to the motor driver.

Charger ×1

This charger can charge four batteries at the same time.

Container ×1

The container is supplied to hold all the items in the kit.

5. Some Background Knowledge

This section is to help you explore some important background knowledge relevant to this design project. You are required to expand your background research from other resources such as library, internet, research paper, etc.

5.1 How the EMG Sensor Works

Muscle  cells  are  polarized  at  rest.  This  means  the  cells  have  slightly  unequal concentrations of ions across their cell membranes. An excess of positive sodium ions on the outside of the membrane causes the outside of the membrane to have a positive charge relative to the inside of the membrane. The inside of the cell is at a potential of about 90 millivolts (mV) less than the outside of the cell membrane.  The 90 mV difference  is  called  the resting potential.  The  typical  cell  membrane  is relatively impermeable to the entry of sodium. However, stimulation of a muscle cell causes an increase in its permeability to sodium. Sodium ions migrate into the cell through the opening of voltage-gated sodium channels. This causes a change (depolarization) in the electrical field around the cell. This change in cell potential from negative to positive and back is a voltage pulse called an action potential. In muscle cells, action potential triggers muscle contractions.

Other ions and charged molecules are involved in the depolarization and repolarization of cardiac muscle. These include potassium, calcium, chlorine, and charged protein molecules.  The   sum  action  potential  generated  during  the  depolarization  and repolarization of the cardiac muscle can be recorded by electrodes at the surface of the skin. A recording of the heart’s electrical activity is called an electrocardiogram (ECG). The  cells  of the  heart’s  conducting  system  will  depolarize  spontaneously.  This spontaneous  depolarization  is  most  apparent  in  a  cluster  of cardiac-muscle  cells embedded in the upper wall of the right atrium. This group of cells is called the pacemaker (also known as the sinoatrial or SA node). Depolarization of the pacemaker generates a current that leads to the depolarization of all other cardiac-muscle cells. The wave of depolarization travels from the right atrium to the left atrium quickly enough that both atria contract at essentially the same time.

The atria and the ventricles are isolated from each other electrically by connective tissue that acts like the insulation on an electric wire. The depolarization of the atria does not directly affect the ventricles. There is another group of cells in the right atria, called the atrioventricular or AV node, that will conduct the depolarization of the atria down a special bundle of conducting fibers (called the Bundle of His) to the ventricles. In the muscle wall of the ventricles are Purkinjefibers, which are a special system of muscle fibers that bring depolarization to all parts of the ventricles almost simultaneously. This process causes a small time delay, so there is a short pause after the atria contract and before the ventricles contract. Because the cells of the heart muscle are interconnected,

this wave of depolarization, contraction, and repolarization spreads across all of the connected muscle of the heart.

When a portion of the heart is polarized and the adjacent portion is depolarized, an electrical current is created that moves through the body. This current is greatest when one half of the connected portion of the heart is polarized and the adjacent half is not polarized. The current decreases when the ratio of polarized tissue to nonpolarized tissue is less than one to one. The changes in these currents can be measured, amplified, and plotted over time. The EKG represents the summation of all the action potentials from  the  heart,  as  detected  on the  surface  of the body.  It  does  not  measure  the mechanical contractions of the heart directly.

The impulse originating at the SA node causes the atria to contract, forcing blood into the ventricles. Shortly after this contraction, the ventricles contract due to the signal conducted to them from the atria. The blood leaves the ventricles through the aorta and pulmonary artery. The polarity of the cardiac-muscle cells returns to normal and the heart cycle starts again.

5.2 Electrocardiogram Signals

The electrocardiogram (ECG or EKG) is a graphic tracing of the heart’s electrical activity. A typical tracing consists of a series of waveforms occurring in a repetitive order. These waveforms arise from a flat baseline called the isoelectric line. Any deflection from the isoelectric line denotes electrical activity.

The five major deflections on a normal ECG are designated by the letters P, Q, R, S, and T as shown in the figure below. One heart cycle is represented by a group of

waveforms beginning with the P wave, followed by the QRS wave complex, and ending with the T wave.

The P wave represents the depolarization of the atria and is associated with their contraction.  The  QRS  wave  complex  consists  of three  waves.  The  first  negative deflection is the Q wave and is followed by a positive deflection called the R wave. The complex ends with a negative deflection known as the S wave. The QRS wave complex denotes depolarization of the ventricles and is associated with their contraction. Atrial repolarization occurs during the depolarization of the ventricles. For this reason, the waveform associated with atrial repolarization is undetectable on an ECG. The last wave is called the T wave, and is usually represented by a positive deflection. The T wave indicates ventricular repolarization.

Electrical energy is also generated by skeletal muscle, and can be seen as muscle artefacts if your arm is moved while the ECG is attached. The sequence from P wave to P wave represents one heart cycle. The number of cycles in a minute is called the heart rate and is typically 70-80 beats per minute (BPM) at rest.

Some typical times for portions of the EKG are:

P-R interval 0.12 to 0.20 seconds

QRS interval less than 0.1 seconds

Q-T interval less than 0.38 seconds

If your ECG does not correspond to the above numbers, DO NOT BE ALARMED! These numbers represent typical averages and many healthy hearts have data that fall outside of these parameters. To read an ECG effectively takes considerable training and skill. This sensor is NOT intended for medical diagnoses.

5.3 EMG Signals

To create voluntary muscle movement, an action potential must travel from initiation in the brain to the target muscle. It travels from the brain, into the spinal cord, and then to an efferent nerve which  synapses on the target muscle  fibre. One neuron may innervate several hundred muscle fibres; however, each muscle fibre is innervated by a single neuron.

There are two methods the body uses to recruit muscle force. These methods are temporal and spatial summation. For most muscle contractions, the firing rate of action potentials is usually higher than 8 Hz, but not usually higher than 25 Hz during times of concentrated contraction. This method of summing the action potentials to create muscle contraction is known as temporal or frequency summation. As the frequency of the neural input to the muscle increases, the force output of the muscle increases. Another method of recruiting muscle contractions is through spatial summation. Spatial summation occurs when several muscle fibres are recruited in parallel, causing greater contractile force than the contraction ofa single muscle fibre. Combining both temporal and spatial summation will lead to a strong contraction of the muscle.

The force output of a muscle can be related to the amplitude of the recorded EMG signal. For weaker contractions, fewer muscle fibres are recruited, and as a result, the EMG signal is relatively small. However, for large forces, spatial summation is used to recruit more muscle fibres, and consequently the EMG signal is larger. The EMG signal is a summation of the signal produced by many muscle fibres at the same time. All of these fibres do not fire synchronously. The action potential produced by each fibre has both positive and negative components, so this summation produces a waveform that is essentially random but whose overall amplitude is related to the number, size, and frequency of recruited motor units. EMG signals are typically measured in the millivolts

range.

Processing the EMG Signal

EMG from skeletal muscle recorded from the surface of the skin has a frequency range of 2-500 Hz and the amplitude can range from 50µV to 5mV. There are many different techniques for processing a raw EMG signal. Movement artefacts typically occur at a frequency much lower than that of the EMG information. Therefore, the EMG signal can be high pass filtered to help reduce motion artefacts. In addition, when an EMG signal is used as a control signal, low pass filtering can help to provide smooth control by removing high frequency noise and jitter.

There are several methods that can used to process the EMG signal. Filtering can be useful to eliminate unwanted noise from biopotentials. High and low pass filtering are commonly used to process EMG for use as a control signal. In order to remove high

frequency noise, a low-pass filter can be applied to the EMG data. This will effectively smooth the EMG signal. When used as a control signal, low pass filtering can provide smooth control and remove noise and jitter. On the other hand, a high-pass filter can be applied to remove low frequency noise such as motion artefacts. A high pass filter will not provide smooth control, but will increase the response time of the system to allow for quick transitions. There are many tradeoffs  between using a high pass and low pass filters in signal processing. The example below (see figure below) shows a raw EMG signal and then the same signal low pass filtered at 25 Hz and high pass filtered at  25  Hz.  Notice  how  low  pass  filtering  the  EMG  signal  removes  much  of the information content of the signal. Notice how the high pass filter removes the low frequency noise from the signal.

Another simple method for processing the EMG signal is rectification. Rectification simply computes the absolute value of a signal. Electronically, rectification is typically done with a set of diodes, but in a computer, it is quite simple to take the absolute value of all the  samples. After rectifying,  one  can  find the  average value  of the EMG waveform.

Another way to process the EMG signal is to find the average signal power. In order to quantify the average power in the EMG signal, a type ofprocessing known as root mean square (RMS) power is performed. The RMS power of a periodic waveform (PRMS) is defined as:

where T0 is the duration of the region of the signal of interest and f(n) is the measured data.

This means that the waveform is first squared (a different way of rectifying the signal) and then the average value of the squared waveform is calculated. Finally, the square root of that number is calculated yielding the RMS (root mean square). For a waveform, the RMS value provides a descriptor of the average power in a signal. The equation above uses a summation instead of the more traditional integral since the data being acquired is discrete. For continuous signals, replace the summation with an integral.

Bin integration can also be performed after rectification. Bin integration is another way to quantify the EMG signal. Bin integration works by taking a small window over the EMG recording, say 5 points, and integrating the area in that window. Then the window is  slid to the next 5 points, and integration is performed again. The result of bin integration is a time varying waveform that describes the muscle contraction from the EMG recording.

There can be several problems with using the EMG signal as a control source. First, normalization  can  be  an  issue.  Normalization  refers  to  finding  a  maximum  and minimum value for the EMG signal and then normalizing all values to those levels so that your control source varies between 0 and 1. If the subject is not completely relaxed during  the  initial  calibration  or  they  did  not  generate  a  maximum  force,  the normalization during the control will be affected. Additionally, muscles fatigue over time. Muscle fatigue causes the frequency of the EMG signal to decrease, but the amplitude of the EMG signal to increase. Therefore, the original calibration may not be valid if the subject is using the system for a long time and fatigue  occurs.

During this project development, you will measure the EMG from your arm  and investigate how signal filtering can be used to remove motion artefacts. EMG from your wrist extensors will be used to control the grasp of a real robotic claw.

Some useful MATLAB functions are:

sum

sqrt

butter

filtfilt

5.4 Connecting the EMG Sensor to a Person

Use three electrode patches per subject. The electrodes can be reused, but they tend to absorb moisture (they are very hygroscopic) and, therefore, reuse is not recommended.

Note: Once opened, the electrodes should be kept refrigerated in a clean, dry, air-tight container for storage. Even with air-tight storage, opened electrode packages cannot be stored from one year to the next.

Connecting for heart rate measurement

•   Because the electrical signal produced by the heart and detected at the body’s surface is so small, it is very important that the electrode patch makes good contact with the skin. Scrub the areas of skin where the patches will be attached with a paper towel to remove dead skin and oil.

•   Peel  three  electrode  patches  from  the  backing  paper.  Firmly  place  the  first electrode on the right wrist. See the diagram below.

•   Place a second electrode on the inside of the right elbow.

•   Place a third electrode on the inside of the left elbow.

•   Place each electrode so it is on the inside part of the arm (closer to the body) and the tab on the edge of the electrode patch points down. This way, the wire of the sensor can hang freely without twisting the edge of the electrode patch.

•   Connect the micro alligator clips from the sensor to the tabs on the edges of the electrode patches.

•   Connect the black (or “reference”) alligator clip to the right wrist electrode patch. This is the reference point for the isoelectric line (baseline).

•   Connect the green (or negative) alligator clip to the right elbow electrode patch.

•   Connect the red (or positive) alligator clip to the left elbow electrode patch.

•   There  are  several  different  ways  to  connect  the  ECG  sensor.  This  simple arrangement is appropriate for the classroom.

•   For best results, disconnect the computer (if laptop is used) from A/C power, keep the sensor away from the computer monitor, and hold the senor box in the palm of your hand.

Connecting for wrist extensor muscle contraction measurement

•   Follow the same procedure above. Attach two electrodes about 10 centimetre apart on the wrist extensors (these muscles are located on the dorsal side of the forearm about half way between the wrist and elbow), and attach one electrode to the bony part of the elbow to use as the reference and ground electrode.

•   After the electrodes have been placed on the subject, connect the three alligator clips as indicated in the diagram below.

•   During the experiment, you may have the subject to squeeze an object tightly in the palm. Then you should see the EMG signals increase.

Refer to the online videos for tutorials:

http://www.vernier.com/products/sensors/ekg-bta/

5.5 Suggested Experiments

Resting ECG

Record the ECG of a person who is at rest. The person whose ECG is being recorded should remain calm and relaxed. Encourage the person to breath normally. Using the displayed graph, record the following information:

ECG after mild exercise

Using the EMG Sensor, record an ECG of a person who is initially at rest. Disconnect the sensor wires from the electrode patches, but leave the patches on the person being monitored. Have the person exercise for three minutes by jogging  in place or by “stepping in time.” Reattach the sensor wires to the electrodes on the person when they have finished exercising and record a new ECG. Compare the resting ECG to the ECG after mild exercise.

ECG and different body positions

Use body position as your independent variable. Record the resting ECG as before. Then have the person sit, stand, or lie down. Make no other changes. Compare your results with your resting ECG. Note any changes in heart rate, interval times, height of R wave, etc.

ECG and mild stimulants

Drink a couple of cups of caffeinated coffee or cola. Record an ECG. Compare your results with those at rest and following mild exercise. Note: This might show less effect on people who are accustomed to large amounts of caffeine.

ECG and electrode position: The Axis of the Heart

Different arrangements of electrode patches will change the shape and intensity of the measured  signal.  Each  arrangement  is  called  a  “lead.”  Each  lead  reveals  unique information based on the lead’s orientation relative to the axis of the heart.

make an approximation ofthe axis ofyour heart; that is, the orientation ofthe centreline of the mass of your heart.

Comparative experiments

•   Conduct a Lead I EMG. Conduct a Lead II EMG. Finally, conduct a Lead III EMG. Compare the results. Determine which lead yields the maximum R-wave amplitude.

•   If the  maximum  R  wave  is  with  Lead  I,  then  the  axis  of your  heart  is approximately at 0 degrees as measured from the horizontal and your left. If the maximum R wave is with Lead II, then the axis of the heart is approximately 60 degrees down from the horizontal and to the left.

•   If the maximum R wave is with Lead III, then the axis is approximately 120 degrees from the horizontal and your left.

•   You can make a further refinement in your estimate by noting the relative proportion ofR wave strength between the two leads with the largest R wave.

•   If the Lead II and the Lead III R waves are about equal, then the axis is about halfway between the 60-degree angle and the  120-degree angle. You could therefore estimate the axis of the heart to be nearly vertical.

The heart’s axis tends to vary with general body shape. Very slender and elongated     people tend to have a more vertical heart. Short and stocky people tend to have a more horizontal axis for their heart.