Question about Designing EMG data acquisition

In summary, the article recommends using a differential input amplifier to suppress electrical noise from power lines and fluorescent lights.
  • #1
Mo_Tuk
28
8
Hello

I'm working on project called"design & implementation of EMG data acquisition",after I search on these systems i really confused about what the gain and the filter type that i have to use.

at the first stage i use instrumentation amplifier to amplify the signal, so how much the gain of this stage should be? and i use Band-Pass Filter in the second stage which is eliminating the unwanted frequency components, which type of filter is suitable to get a very clean EMG signal? Is sallen-key or butterworth good enough for that? and how much should the order of filter be?

the attached image for my design for now in Multisim, I will add proper ADC to it...thanks...
 

Attachments

  • Design 1.PNG
    Design 1.PNG
    25.1 KB · Views: 834
Last edited:
Engineering news on Phys.org
  • #2
You work from both ends to the middle. You need the peak voltage before your input amplifier. You need the input voltage specification for your analog/digital converter. Divide. That gives you the gain you need. Then you need the source impedance of your input signal, from which you calculate the minimum input impedance of the input amplifier.

Then you define the requirements of your filter. Allowable ripple in the passband, maximum allowable gain in the stopband, minimum range of passband frequencies, maximum range of stopband frequencies, allowable phase lag, allowable phase variation. That will give you the minimum rolloff (attenuation rate), from which you can find the minimum filter order. The gain, ripple, and phase specifications will determine the best type of filter.

A Google search using search terms analog filter had many good hits. The hits from Sensors Online and Analogue Devices (analog.com) are a good place to start.
 
  • Like
Likes davenn
  • #3
I searched on this phrase
EMG data acquisition
and found this surprisingly informative article by an outfit that manufactures such gear.
https://delsys.com/Attachments_pdf/download/tutorials/01_fundamental-concepts-in-emg-signal-acquisition.pdf

Another hit was this sensor
http://www.biometricsltd.com/surface-emg-sensor.htm
which has built in gain of 100 or 1000.
Does your instrumentation amplifier have to include that gain, or are you handing it signal from such a sensor ?

i think you'll have to resort to trial and error with whatever sensors you've picked and whatever is your subject...

One experiment is worth a thousand expert opinions.

If this is for a product development effort, check out http://www.ti.com/product/ADS1298
 
  • Like
Likes Mo_Tuk, dlgoff, jrmichler and 1 other person
  • #4
This applies at a hobbyist or "I'm curious" level. As such it is simplified and is incomplete for serious research usage.

I built one way back when I was in high school (grade 10 or 11). I strongly recommend to use a differential input amplifier to suppress the electrical noise from the electrical power lines and from fluorescent lights. EMG signals are essentially 0.5 to 1mS spikes of around 50μV to 1mV at the skin surface and can exceed 50mV with electrodes embedded in the muscle. The repetition rate and amplitude increase with increased muscle activity.

Depending on the usage environment, you may need:
  • Low frequency gain rolloff, or even a notch filter to suppress the power line hum.
  • To suppress the power line third harmonic frequency if it is a problem, probably with a notch filter as it is getting into the signal bandwidth.
  • A lower first stage gain to avoid overloading from the power line noise. Worst case would be a passive filter before the first amplifier, but that should be a last resort.
  • Low noise shielded cable from the electrodes. Most wires and shielded cables will generate a tiny voltage when moved/bent. Even Oscilloscope probes have this problem. Low noise microphone cable is available to minimize this. There may be other cable sources too.

What is the intended usage of your device?

Hope this helps.

Tom
 
  • Like
Likes berkeman, dlgoff, jrmichler and 2 others
  • #5
Tom.G said:
This applies at a hobbyist or "I'm curious" level. As such it is simplified and is incomplete for serious research usage.

I built one way back when I was in high school (grade 10 or 11). I strongly recommend to use a differential input amplifier to suppress the electrical noise from the electrical power lines and from fluorescent lights. EMG signals are essentially 0.5 to 1mS spikes of around 50μV to 1mV at the skin surface and can exceed 50mV with electrodes embedded in the muscle. The repetition rate and amplitude increase with increased muscle activity.

Depending on the usage environment, you may need:
  • Low frequency gain rolloff, or even a notch filter to suppress the power line hum.
  • To suppress the power line third harmonic frequency if it is a problem, probably with a notch filter as it is getting into the signal bandwidth.
  • A lower first stage gain to avoid overloading from the power line noise. Worst case would be a passive filter before the first amplifier, but that should be a last resort.
  • Low noise shielded cable from the electrodes. Most wires and shielded cables will generate a tiny voltage when moved/bent. Even Oscilloscope probes have this problem. Low noise microphone cable is available to minimize this. There may be other cable sources too.

What is the intended usage of your device?

Hope this helps.

Tom
Thanks for your response, the goal of my project is that after complete designing this system, I have to classified four different hand movements like up,down,right,and left, so could this possible with and INA114 "instrumentation amplifier" and 1st order band-pass filter ?
please, if you could see the screenshot that I've attached of my design and tell me if this good enough to reach the goal of different hand movements?
 
  • #6
Mo_Tuk said:
I've attached of my design and tell me if this good enough to reach the goal of different hand movements?

Both @jim hardy and @Tom.G told you that you must think of things beyond the schematic on your screen. Not all problems can be solved using only a schematic design tool.

I think you need more direct help from an advisor or a mentor rather than written questions/answers on the Internet. Are there teachers or other students there who can help you?
 
  • Like
Likes berkeman and Mo_Tuk
  • #7
Mo_Tuk said:
please, if you could see the screenshot that I've attached of my design and tell me if this good enough to reach the goal of different hand movements?

I never built one of those so have no idea.

I do know that arriving at a successful design is trial and error,

We learn by doing not by reading about doing, e.g. the Wright Brothers...

My advice is build it.
1. Make gain adjustable perhaps R1 a 5K rheostat?
That way if noise is overwhelming you can turn down the gain and look at it with the 'scope.

2. If noise is high try a driven shield as in fig 10 of that datasheet @Tom.G linked. (EDIT i thought he linked it - anyhow it's at http://www.ti.com/lit/ds/symlink/ina114.pdf )
upload_2018-9-3_10-6-51.png
 

Attachments

  • upload_2018-9-3_10-6-51.png
    upload_2018-9-3_10-6-51.png
    10 KB · Views: 911
  • Like
Likes Tom.G, jrmichler, Mo_Tuk and 1 other person
  • #8
Hi @Mo_Tuk,

I think what you have done so far is a fair start.
In the spirit of helping you to learn, you should build the circuit you designed and find out how well it works. If there are problems look at the ideas in my post #4 and in post #7 by @jim hardy to help you figure out what is needed. There is no need to add an ADC at this point, that will only make things harder to understand. Use an oscilloscope to look at the output of the circuit.

As @anorlunda said, an advisor, teacher, or other students there to actually see what you have built and what it is doing can help much faster and better than we can. Of course if you and your helpers need extra help, we are still here to advise.

Don't get discouraged. As Jim said:
jim hardy said:
I do know that arriving at a successful design is trial and error

Please let us know about your progress, it sounds like an interesting project.

Cheers,
Tom
 
  • Like
Likes jim hardy and Mo_Tuk
  • #9
Tom.G said:
Hi @Mo_Tuk,

I think what you have done so far is a fair start.
In the spirit of helping you to learn, you should build the circuit you designed and find out how well it works. If there are problems look at the ideas in my post #4 and in post #7 by @jim hardy to help you figure out what is needed. There is no need to add an ADC at this point, that will only make things harder to understand. Use an oscilloscope to look at the output of the circuit.

As @anorlunda said, an advisor, teacher, or other students there to actually see what you have built and what it is doing can help much faster and better than we can. Of course if you and your helpers need extra help, we are still here to advise.

Don't get discouraged. As Jim said:Please let us know about your progress, it sounds like an interesting project.

Cheers,
Tom
Thanks a lot, off course I will give you a feedback of any progress I do, now I'm interesting only on simulation because in this month I can't reach to the instruments such as oscilloscope but I will try to get one these days.
 
  • Like
Likes Tom.G and jim hardy
  • #10
Mo_Tuk said:
I will try to get one these days.
mine is an antique Ebay find HP180. Real simple .

https://www.ebay.com/itm/HP-Hewlett-Packard-180-C-OSCILLOSCOPE/123304604812?hash=item1cb586f48c:g:UZ0AAOSwElZanHR0
 
  • Like
Likes Mo_Tuk
  • #11
I started to build the circuit and make some tests but Should I build protection circuit before connecting the electrodes to instrumentation amplifier ?
 
  • #12
i don't think you'll need it. What killed early ECGs was defribillators.
Of course use good sense -
power it from batteries or a power supply with medical grade isolation , that's for the safety of your subject
and before hooking it up touch both it and whatever (whomever?) you're connecting the electrodes to so there's no static charge.

old jim
 
  • Like
Likes berkeman, Mo_Tuk and dlgoff
  • #13
Hi @jim hardy

I need to use only one battery to supply the INA114 with +4.5V as reference. in the design in multisim I connected +9V(Vdd) and +4.5V(Ref pin) of INA and Vss to ground. and the input signal is 10mV.
the gain is 101 and the output voltage should be 1.01V centered at +4.5V, But the result is just dc voltage at +4V (red line) and not sinusoidal. the question is: How to get a correct sinusoidal output centered at +4.5V ??

I hope you understand me.
Cheers.
 
  • #14
Mo_Tuk said:
I need to use only one battery to supply the INA114 with +4.5V as reference. in the design in multisim I connected +9V(Vdd) and +4.5V(Ref pin) of INA and Vss to ground(? jh). and the input signal is 10mV.

Been aaway a few days, wasn't ignoring you.

it is not clear to me what you connected to the REF pin.
The REF pin should be connected to a constant source of about elf the difference between V+(Vdd) and V-(Vss) pins.
If you connected REF pin to +4.5 volts that is correct and the circuit ought to work.
If you connected the REF pin to V-(Vss pin) that won;t work.

The fellows who wrote the datasheet have a mindset that it's being used with a balanced dual supply, where GND is halfway between the V+ and V- "supply rails".

upload_2018-9-23_21-18-23.png


GND is NOT V- in their minds.

But that might not be your problem.
Did i ask my question clearly?

If indeed you connected REF to 4.5 volts,
then
try reducing GAIN to 1 and see if the circuit will reproduce a 1 volt differential signal. Output will appear between OUT and REF pins.
They're telling you right here that input voltage must remain a couple volts above V- and a couple volts below V+
upload_2018-9-23_21-25-57.png
 

Attachments

  • upload_2018-9-23_21-18-23.png
    upload_2018-9-23_21-18-23.png
    11.5 KB · Views: 672
  • upload_2018-9-23_21-25-57.png
    upload_2018-9-23_21-25-57.png
    16.4 KB · Views: 638
  • Like
Likes Mo_Tuk
  • #15
Thanks @jim hardy
I really appreciate your effort, you helped me a lot.
I will supply the INA with + and - 9V and about the reference pin as in datasheet Is that mean I Should connect 5 ohm resistor to it ?
 
  • #16
Mo_Tuk said:
I will supply the INA with + and - 9V
Good ! The junction of your +9 and - 9 volt supplies becomes "GND " ..

...and about the reference pin as in datasheet Is that mean I Should connect 5 ohm resistor to it ?
No, the datasheet is telling you that it takes only as little as 5 ohms to cause you trouble.

REF needs to be held at mid-supply voltage.
It is important that the two resistors i circled in red be very closely matched. Any resistance in series with REF pin adds to the bottom resistor making them unequal.
upload_2018-9-25_0-46-32.png


REF needs to be held near mid-supply voltage. Midpoint of your dual supply is the best place to connect it.

You would do well to master the "Difference Amplifier" for that's what A3 is. See http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/opampvar6.html#c3 , or any number of tutorials from a search.

and study figure 4 of the INA114 datasheet.

Keep up the good work -

old jim
 

Attachments

  • upload_2018-9-25_0-46-32.png
    upload_2018-9-25_0-46-32.png
    7.7 KB · Views: 690
  • Like
Likes Mo_Tuk
  • #17
Thanks @jim hardy

I will use battery to avoid any issues of power line (I mean 60 Hz noise)
but if I use function generator (+9,-9v) is there any possibility to harm my body or not ?
 
  • #18
Mo_Tuk said:
but if I use function generator (+9,-9v) is there any possibility to harm my body or not ?
Wait, what? Where are you going to connect this to your body? I haven't been following this thread for a while, but just saw your post. Why are you trying to drive a signal into your body? That is not what EMG sensors do. Hopefully I've misunderstood your post. Thanks.
 
  • #19
berkeman said:
Wait, what? Where are you going to connect this to your body? I haven't been following this thread for a while, but just saw your post. Why are you trying to drive a signal into your body? That is not what EMG sensors do. Hopefully I've misunderstood your post. Thanks.

you misunderstood,
I mean I will use battery to supply my circuit so that when I connect the electrodes to my arm I hope no leakage current exists and I will be in safe side.
 
  • Like
Likes berkeman
  • #20
Mo_Tuk said:
but if I use function generator (+9,-9v) is there any possibility to harm my body or not ?

Not so long as the function generator's insulation system is in good shape,
and so long as the wall outlet that you plug it into is wired correctly, is properly earthed, and has nothing else plugged into it that has an internal fault.

So yes, there is a possibility. .
 
  • Like
Likes Mo_Tuk
  • #21
Has anyone defined what is meant by EMG, Electromyography? Are you sensing electrical muscle RMS noise directly, or are you able to monitor the electrical changes that result from a physically active muscle in an elastic-resistive glove.

Not much will have changed on the signal acquisition side since I was designing polygraph components in the early 1980s. The instrumentation amplifiers will use less power, have better balance with greater CMRR and much lower drift. Only the anti-aliasing filters should be integrated into the amplifier chain. Once the signal is digitised, the problem will become software estimates of signal power in a particular bandwidth determined by signal processing software. That needs to be in software to be flexible.

You may need to consider ways to measure all signals as differential against each other. That may help eliminate problems due to contact variation and reduce gain errors. Look for common electrode positions that can be used for sensing several muscles.

Safety regulations will probably require an isolation barrier between your electronics and the human body. Isolation amplifiers are now available for that job. We used back-to-back depletion mode FETs as current limiters.
 
  • Like
Likes jim hardy
  • #22
Hi @jim hardy

i connected the circuit (pre-amplification stage using INA114 + Filtering stage of BPF) and then connected the electrodes to my bicep muscle and try to detect some signal as shown in attached screenshots on the oscilloscope. I set the gain of INA to 2 "next time the gain will be 10" and the BPF has a gain of 100 and frequency band from about 20 to 700 Hz

I used the inputs of INA114 directly to the electrode with no isolation circuit ,Should I add isolation circuit or not since I supply my circuit with two 9v batteries?
 

Attachments

  • TEK0000.JPG
    TEK0000.JPG
    54.6 KB · Views: 373
  • TEK0003.JPG
    TEK0003.JPG
    49.9 KB · Views: 606
  • #23
Mo_Tuk said:
Hi @jim hardy

i connected the circuit (pre-amplification stage using INA114 + Filtering stage of BPF) and then connected the electrodes to my bicep muscle and try to detect some signal as shown in attached screenshots on the oscilloscope. I set the gain of INA to 2 "next time the gain will be 10" and the BPF has a gain of 100 and frequency band from about 20 to 700 Hz

I used the inputs of INA114 directly to the electrode with no isolation circuit ,Should I add isolation circuit or not since I supply my circuit with two 9v batteries?
Looks mostly like 60Hz noise...
 
  • Like
Likes Mo_Tuk
  • #24
berkeman said:
Looks mostly like 60Hz noise...

can I use notch filter to remove 60Hz noise?
 
  • #25
Mo_Tuk said:
can I use notch filter to remove 60Hz noise?
It's better to design your circuit to reject that common-mode noise (hopefully it's not getting into the circuit in differential mode)...
 
  • Like
Likes jim hardy and Mo_Tuk
  • #26
berkeman said:
It's better to design your circuit to reject that common-mode noise (hopefully it's not getting into the circuit in differential mode)...

Thanks, @berkeman
for the screenshot of INA, what the benefit of using two 15k resistors?
 

Attachments

  • Capture.PNG
    Capture.PNG
    13.6 KB · Views: 344
  • #27
Mo_Tuk said:
for the screenshot of INA, what the benefit of using two 15k resistors?
They look like they are just supplying the bias voltages for the two inputs.

Can you post a diagram of your complete circuit, including the battery power supply, amp circuit, patient connections, and Earth Ground scheme?
 
  • Like
Likes Mo_Tuk
  • #28
berkeman said:
They look like they are just supplying the bias voltages for the two inputs.

Can you post a diagram of your complete circuit, including the battery power supply, amp circuit, patient connections, and Earth Ground scheme?

I connected the circuit exactly as shown in screenshot:
 

Attachments

  • Capture1.PNG
    Capture1.PNG
    19.3 KB · Views: 295
  • #29
Mo_Tuk said:
for the screenshot of INA, what the benefit of using two 15k resistors?

If we're talking about the image attached to that post,
the two 15K resistors establish a reference that's halfway between the amplifier's supply voltage pins.
It's known as "virtual ground"
and if you're powering from two 9v batteries you could instead use for reference their junction.

nitpicking here - the noise is line frequency which for us is 60 hz but apparently for you 50 hz,

old jim
 
  • Like
Likes Mo_Tuk
  • #30
jim hardy said:
If we're talking about the image attached to that post,
the two 15K resistors establish a reference that's halfway between the amplifier's supply voltage pins.
It's known as "virtual ground"
and if you're powering from two 9v batteries you could instead use for reference their junction.

nitpicking here - the noise is line frequency which for us is 60 hz but apparently for you 50 hz,

old jim

Thanks @jim hardy
do you mean that I can just connect the circuit as shown in the screenshot below.
and about the 50Hz noise, How could I remove it ? and also do I have to add isolation circuit ?
 

Attachments

  • Capture.PNG
    Capture.PNG
    17 KB · Views: 308
  • #31
Mo_Tuk said:
Should I add isolation circuit or not since I supply my circuit with two 9v batteries?
I don't think you need it . You have no home-made equipment in between you and wall power that's likely to cause a short circuit. Your oscilloscope chassis should be tied to the the Earth grounding plug of your power cord. I would suggest check your outlet with an inexpensive receptacle checker, here's what they look like in USA :
.
upload_2018-10-16_13-30-8.png


Remaini aware you are relying on the internal insulation of any line connected equipment to protect you, so check it carefully for leakage current to Earth ground.

Mo_Tuk said:
and then connected the electrodes to my bicep muscle and try to detect some signal as shown in attached screenshots on the oscilloscope.
Try touching a moistened finger on your other hand to oscilloscope common (outside of the BNC connector if it's metal).
If that reduces noise then you know you need a reference connection to your body.

Mo_Tuk said:
do you mean that I can just connect the circuit as shown in the screenshot below.
Not quite.
That screenshot shows a wire shorting out your signal. Take it out of your sketch and connect REF to power supply common.

old jim
 

Attachments

  • upload_2018-10-16_13-30-8.png
    upload_2018-10-16_13-30-8.png
    34.9 KB · Views: 514
  • #32
Mo_Tuk said:
i connected the circuit (pre-amplification stage using INA114 + Filtering stage of BPF) and then connected the electrodes to my bicep muscle and try to detect some signal as shown in attached screenshots on the oscilloscope.
berkeman said:
Can you post a diagram of your complete circuit, including the battery power supply, amp circuit, patient connections, and Earth Ground scheme?
Mo_Tuk said:
I connected the circuit exactly as shown in screenshot:
Your circuit that you posted is very confusing for me. I asked to see the circuit that you said you connected to your bicep, but your schematic shows instruments, not a pair of patient connections as input. I also don't see Earth ground, and I see very different biasing compared to your latest differential amplifier questions.

Are you using a single 9V battery for power, or two to give you +/-9V? Please always show your power supply configuration in your schematics. What electrodes were you using to connect to your bicep? What brand, and how old are they? I assume they are single-use disposable, right?

When you flexed your bicep, did you see any response at all out of the amplifier string? It should have been much lower frequency than your 50/60Hz interference.

This is more like a circuit diagram that I would expect you to be posting...

https://greenhecktech.files.wordpress.com/2016/09/schematic4.png?w=748

schematic4.png
 

Attachments

  • schematic4.png
    schematic4.png
    20.6 KB · Views: 1,088
  • Like
Likes dlgoff and jim hardy
  • #33
berkeman said:
Your circuit that you posted is very confusing for me. I asked to see the circuit that you said you connected to your bicep, but your schematic shows instruments, not a pair of patient connections as input. I also don't see Earth ground, and I see very different biasing compared to your latest differential amplifier questions.

Are you using a single 9V battery for power, or two to give you +/-9V? Please always show your power supply configuration in your schematics. What electrodes were you using to connect to your bicep? What brand, and how old are they? I assume they are single-use disposable, right?

When you flexed your bicep, did you see any response at all out of the amplifier string? It should have been much lower frequency than your 50/60Hz interference.

This is more like a circuit diagram that I would expect you to be posting...

https://greenhecktech.files.wordpress.com/2016/09/schematic4.png?w=748

View attachment 232292
Yes, I'm using two +/-9V batteries to supply the circuit, and I used surface electrodes "BioProtech Electrodes" which shown in attached image.
Although the signal is 50Hz noise but when I flexed my bicep the amplitude increased but the signal still almost the same "50Hz noise"
 

Attachments

  • BioProtech electrode.png
    BioProtech electrode.png
    38 KB · Views: 330
  • Like
Likes berkeman
  • #34
Mo_Tuk said:
Although the signal is 50Hz noise but when I flexed my bicep the amplitude increased but the signal still almost the same "50Hz noise"
Okay, there are two things that you should approach this with, IMO:
  • You should look more at shielding and balancing your probe lines to cut down on the AC Mains noise pickup -- if you post your full circuit diagram including Earth ground connections and shielding, we should be able to help with that
  • You should consider digitizing the waveform output from your circuit and doing DSP processing to filter out the AC Mains noise. You can do much higher order filters and adaptive filtering with DSP routines. Do you have experience with programming microcontrollers (uCs) in C or Assembly code?
 
Last edited:
  • Like
Likes dlgoff, jim hardy and Mo_Tuk
  • #35
berkeman said:
Okay, there are two things that you should approach this with, IMO:
  • You should look more at shielding and balancing your probe lines to cut down on the AC Mains noise pickup -- if you post your full circuit diagram including Earth ground connections and shielding, we should be able to help with that
  • You should consider digitizing the waveform output from your circuit and doing DSP processing to filter out the AC Mains noise. You can do much higher order filters and adaptive filtering with DSP routines. Do you have experience with programming microcontrollers (uCs) in C or Assembly code?

Thanks @berkeman
I hope this screenshot of the circuit would be clear, and about the DSP part for now I just want to see clear EMG signal from my bicep muscle and then I will move to programming part using Arduino.
and about the electrode cables would you suggest any specific type of cable that less noise produced ??
 

Attachments

  • Circuit Diagram.PNG
    Circuit Diagram.PNG
    24 KB · Views: 325

Similar threads

Back
Top