DIY Muscle Sensor / EMG Circuit for a Microcontroller

 by Gundanium
Featured
Muscle Sensor / EMG Circuit Board Kit.JPG
Measuring muscle activation via electric potential, referred to as electromyography (EMG) , has traditionally been used for medical research and diagnosis of neuromuscular disorders. However, with the advent of ever shrinking yet more powerful microcontrollers and integrated circuits, EMG circuits and sensors have found their way into prosthetics, robotics and other control systems. Yet, EMG systems remain expensive and mostly outside the grasp of modern hobbyist.

This instructable will teach you how to make your own muscle sensor / EMG circuit to incorporate into your next project. Use it to control video games, robot arms, exoskeletons, etc.

Click on the video below for a demonstrations on how to hook up and use your EMG circuit board!

You can now also purchase  EMG circuit boards, sensors, kits, cables and electrodes at www.AdvancerTechnologies.com!
Muscle Sensor Kit......includes all circuit parts
Muscle Sensor............fully assembled sensor (international shipping available)

Note: This sensor is not intended for use in the diagnosis of disease or other conditions, or in the cure, mitigation treatment, or prevention of disease, in a man or other animals.

About Advancer Technologies 
Advancer Technologies is a company devoted to developing innovative game-changing biomedical and biomechanical technologies and applied sciences. Additionally, Advancer Technologies promotes all forms of interest and learning into biomedical technologies. To help culture and educate future great minds and concepts in the field, they frequently post informative instructions on some of their technologies. For more information, please visit www.AdvancerTechnologies.com .

 
Remove these adsRemove these ads by Signing Up

Step 1: Materials

Materials.png
Click on the links to go to where you can buy items/order free samples.

Circuit Chips

3x TL072 IC Chip  - Free Samples
1x INA106 IC Chip  - Free Samples

Cables and Electrodes
1x EMG Cables   (set of 3)... Note: you could optionally connect the alligator clips directly to the electrodes.
3x EMG Electrodes  

Power
2x 9V Battery
2x 9V battery clips  

Capacitors
• 2x 1.0 uF Tant 
• 1x 0.01 uF Ceramic Disc  
• 1x 1.0 uF Ceramic Disc   

Resistors
• 3x 150 kOhm 1%  
• 2x 1 MOhm 1% 
• 2x 80.6 kOhm 1%  
• 6x 10 kOhm 1%
• 1x 100 kOhm Trimmer 
• 1x 1 kOhm 1%

Misc
• 2x 1N4148 Diode  
Jumper wires
• 3x Alligator clip cables

Optional
• 1x Oscilloscope
• 1x Multimeter
1-40 of 122Next »
Gundanium (author) in reply to nittaJul 19, 2011. 7:20 AM
Hmm I'm not sure I've got a clear understanding of the situation.

An external power supply for this circuit shouldn't effect any other sensors interfaced with your Arduino as long as your power supply's ground is connected to the Arduino ground pin.

However, if you're sure an external power supply won't work for your circuit, then you could split your 3.3V power supply using a voltage divider to power this circuit. This would give you +-1.15V. Your signal resolution would be severely effected though since your drastically reducing the number of valid ADC steps.

Does the Arduino FIO have 10bit ADCs? If so you'd be reducing your sample points from 1024 down to ~235. If its 8bit, it would be even less.
nitta in reply to GundaniumJul 21, 2011. 1:38 AM
My plan was to use only one power supply unit...my intention is to build a "wearable" system so i would like to keep it simple and small...

Thanks anyway for your advices ;)
Gundanium (author) in reply to nittaJul 21, 2011. 9:36 AM
I just looked up the specs for the Arduino Vio. You could power both this circuit and the Arduino with the +-9V setup described in my instructions since the Arduino Vio's input voltage range is 3.35V to 12V. 
Christine Kuo says: May 22, 2013. 5:17 AM
May I know why the cut off frequency of the active high pass filter is set to 106Hz in step 4? As I know EMG signals range from 0 to 500Hz, if the high pass filter cut off at 106Hz, then almost half of the EMG signal will be gone. Also, is gel pad electrode suitable to use for EMG signal? thank you in advance.
Gundanium (author) in reply to Christine KuoMay 22, 2013. 6:07 AM
I haven't found any that have worked with this circuit. They are usually used for TENS units not for measurement systems.
Gundanium (author) in reply to Christine KuoMay 22, 2013. 6:04 AM
You're right that the range is between 0-500Hz but the usable energy of the EMG signal is between 50-150 Hz. 106Hz gives a cleaner signal so I went with that.
qzahoor says: May 15, 2013. 1:03 AM
Does your circuit eliminates or suppresses 50 HZ noise and it's harmonics?
I am interested to buy your circuit and further integrate in my project.
Gundanium (author) in reply to qzahoorMay 22, 2013. 5:58 AM
Yes, since it uses a differential amplifier any noise common to both input lines is removed from the signal.
mhamdy2 says: May 17, 2013. 9:45 AM
please can i replace INA106 using one of this op-amp
http://ram-e-shop.com/oscmax/catalog/index.php?cPath=21_96
wan zul says: May 15, 2013. 6:47 AM
why we need to amplify using inverting amplifier with gain -15.i have read your instructables and it say it amplify your signal but also invert it...what it means??..when i test using oscilloscope output signal from inverting amplifier become lower than input signal...can explain to me...thanks
wan zul says: May 14, 2013. 4:16 AM
hello,i'm having trouble to understand about frequency of signal by using this circuit..why use active low pass filter..it cut off frequency about 2 hz...can u explain it...
Gundanium (author) in reply to wan zulMay 14, 2013. 7:01 AM
Reread step 6. It explains why we use a low pass filter.
wan xi says: Apr 16, 2013. 12:55 AM
which port did you use in arduino as the output from the circuit to arduino...??..please help
Gundanium (author) in reply to wan xiMay 14, 2013. 6:59 AM
I don't understand your question. By "port" do you mean which "pin" on the arduino?
Nithinreddyc says: Apr 11, 2013. 8:53 AM
Would it be possible to use a single sensor board to control multiple gestures. Would one sensor be able to control left, right, up and down movements?
Gundanium (author) in reply to NithinreddycMay 14, 2013. 6:57 AM
A single sensor board measures a single muscle. You could use one muscle to control two control states (e.g. up/down, left/right) depending on the muscle state (flex/relaxed). Four states wouldn't be very practical.. you'd have to map certain flexing magnitudes to the four states. For example, no flex = right, light flex = left, medium flex = up, hard flex = down.
cholan1986 says: Apr 3, 2013. 3:53 AM
First of all Thanks for the wonderful tutorial.
I’m doing exactly what you mentioned but I’m getting the output voltage 6 to 9V even without connecting the Electrode. Even if I connect the electrode it’s giving the same voltage. Kindly guide me.
I checked the output using multimeter. Also I checked my connection seems everything is ok.
I’m having only one doubt, the Electrode cable. it has two leads on the other end. I’m using only one (pls check the image I uploaded) and I don’t know what to do with the other one so i left it. Kindly correct me if I’m doing anything wrong.
Kindly any one help me.

Thanks
Cholan.P
Gundanium (author) in reply to cholan1986Apr 3, 2013. 6:07 AM
I really recommend checking each phase of your circuitry with an oscilloscope. A multimeter isn't very helpful. Also, what do you have the gain potentiometer set at?
cholan1986 says: Apr 3, 2013. 3:59 AM
I have uploaded the Image of the electrode cable. In which you can see the one which i'm using and the other which i'm not using. Kindly guide me.
ElectrodeCable.png
Gundanium (author) in reply to cholan1986Apr 3, 2013. 6:05 AM
The lead you aren't using is simply EMF shielding. You could optionally connect this to ground.
9677055601 says: Mar 31, 2013. 10:10 PM
kindly let me know the output of each phase in
phase A of INA106,
phase B of TL072,
phase C of TL072,
phase D of TLO72.
wan xi says: Mar 28, 2013. 7:19 AM
How you get the gain of INA106??can show me the calculation
Gundanium (author) in reply to wan xiMar 28, 2013. 7:42 AM
Gain = (1MOhm+ 100kOhm)/10kOhm = 110
9677055601 says: Mar 28, 2013. 3:03 AM
Nice tutorial… but sorry It didn’t work for me.

I gave the connection as you mention. I’m getting output value as 12 every time while stressing and not stressing the muscle. If I change the variable resistor it’s giving some other value like 25 or 30. But it’s not changing with my muscle’s activity.
I cross checked the connection. It’s all ok. But I’m not sure about the electrode cable, there are two wires coming on the other end (1. Copper core (center cable), 2. Shield (outer cable)). I’m using only the center cable. Don’t know about the other one. So simply I left it. Kindly guide me if I’m doing anything wrong.
I’m using arduino uno, and analog pin 0. Please check the code below.
//code
int potPin = 0;
int val = 0;
void setup()
{
Serial.begin(9600);
}
void loop()
{
val=analogRead(potPin); // just reading the analog pin value
Serial.println(val);
delay(100);
}
I’m struggling for a week. Kindly guide me.
Gundanium (author) in reply to 9677055601Mar 28, 2013. 7:31 AM
I'd go back and double check each phase one at a time. Use an oscilloscope to check the output of each phase. Your code looks fine to me.
alexyong says: Mar 21, 2013. 10:27 PM
Thank you for your guidance. what about the reference electrode input? should i connect it to ground or just leave it like that?

Gundanium (author) in reply to alexyongMar 22, 2013. 5:02 AM
You can connect it to ground as well.
alexyong says: Mar 20, 2013. 10:20 PM
Hi, good day! I have some questions to ask. If i remove the rectifier phase of this circuit, then the output of the circuit will be raw EMG signal,it is possible to display the waveform of the EMG signal by using processing software? And if i test the circuit by using function generator, should i feed 2 different dummy signals into the circuit?

TQ.
Gundanium (author) in reply to alexyongMar 21, 2013. 6:08 AM
You'd need to take out the rectifier and smoothing phases to get the raw waveform. Also, if you're using a microcontroller, you'll have to add a DC offset to get the positive and negative sides of the waveform.

For a function generator, connect the negative (muscle end) pin to ground and feed the generated signal into the positive (mid muscle) pin.
lnorooz says: Mar 1, 2013. 9:43 PM
Very cool! Thanks for the tutorial!

I'm not sure if you can answer this, but I was wondering if you think this would work as a breathing sensor? Technically there are muscles that bring air into your lungs, so I wanted to see if maybe I could measure that. But then I thought that the heart might get in the way of calculating all this since it's a huge muscle in itself. What do you think?
grannyjones says: Feb 26, 2013. 9:52 AM
OMG!
This would be awesome for my friend who is a quadraplegic.!
alexyong says: Feb 17, 2013. 9:11 PM
This is awesome. I'm using this EMG sensor in my project. However, my lecturer requests us to send the data to the computer wirelessly by using a pair of XBEE. Is the program you used in the arduino demo still can be used?

Thank you.
Gundanium (author) in reply to alexyongFeb 18, 2013. 6:59 AM
I'm not familiar with the XBEE interface. Does it connect to the computer via serial com? If so, then the program should work. Might have to modify it a bit...
gian.marchesini says: Feb 5, 2013. 11:14 AM
Hi,

I'm from Brazil and can't find the INA 106, can you teel me if there is any IC that i could replace with?

Thank you
scci says: Jan 28, 2013. 7:43 PM
HELP

I did the circuit Perfectally but it won't work

Could it be : I have a bunch of jumper wires

My ina106 says kp and my tl072 says cp

(I think ik what those mean but idk could be a problem)


I have a jumper to an aligator clip to 22 gauge copper wire to another aligator befor connecting to the electrodes

It's outputting a voltage depending on my trimmer and won't respond to my muscles tensing
Gundanium (author) in reply to scciFeb 3, 2013. 10:05 AM
I'd suggest going through the circuit phase by phase to make sure each phase is working properly before wiring the whole circuit. If you don't have a oscope it'll make debugging extremely difficult.
scci in reply to GundaniumFeb 4, 2013. 6:50 AM
Correction I found a 1 mega ohm potentiometer in my desk
scci in reply to GundaniumFeb 4, 2013. 6:50 AM
Correction I found a 1 mega ohm potentiometer in my desk
scci in reply to GundaniumFeb 4, 2013. 6:46 AM
Sadly I do not have an osiliscope


I have tested all of the chips an they are working as amps


My only conclusion is it is detecting it, but it is amplifying to much?


When I took it appart piece by peace with only the ina106 and one tl072 it hovers around 5v and when I attach it to the electrodes it jumps up and stays at 7.50, which would be the power supply with a voltage drop wouldn't it


So I'm building a potentiometer box that goes from zero- ten million to test it, something I have been procrastinating
mipro says: Dec 16, 2012. 12:08 PM
Hi, which software do you use to make the virtual breadboard?
The real breadboard will be better if we make a virtual one.
1-40 of 122Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!