Ever felt like what your MCU of choice misses is a way to read the electrical signals from your muscles? In that case [Deepak Khatri] over at Upside Down Labs has got your back with the BioAmp EMG Pill. Described as an affordable, open source electromyography (EMG) module, based around a TL074 quad low-noise JFET-input opamp. At just over 32×10 millimeters, it’s pretty compact as well.
The onboard opamp ensures that the weak electrical signals captured from the muscles when they move are amplified sufficiently that the ADC of any microcontroller or similar can capture the signal for further processing. Some knowledge of how to set up an EMG is required to use the module, of course, and the TL074 opamp prefers an input voltage between 7-30 V. Even so, it has all the basics onboard, and the KiCad project is freely available via the above linked GitHub project.
In addition, [Deepak] also tweeted about working on an affordable, open source active prosthetics controller (and human augmentation device), which has us very much interested in what other projects may come out of Upside Down Labs before long. After, all we’re no strangers to hacking with biosignals.
48 thoughts on “Listening In On Muscles With The BioAmp EMG Pill”
Ooh it’s such an amazing project! I’ve seen this on Twitter and this perfectly fits an idea we’ve been discussing with a friend for the last month.
We want to make a smartphone interface where you don’t even need to hold your phone and can input things with your finger movements. She is convinced it will take a while to polish the tech so that it works without mistakes, and I for now just collect great hardware ideas like these!
I talked to Deepak recently and he told me he’ll be bringing this project to CrowdSupply this year. He’s still figuring out the things needed to launch such a campaign from India, but he’s found someone who’s done this already and I hope it will be able to launch soon.
BTW, if you’re interested in topics like these, you should check out his YouTube, Patreon and Tindie.
Thanks for sharing the link CRImier <3
Hackaday won’t let the links through but he has a YouTube/Patreon/Tindie too, check his Twitter account at @lorforlinux for these =)
It´s rather a poor choice for an opamp., with that awful power requirement.
A simple selection here https://www.ti.com/amplifier-circuit/op-amps/products.html should give better alternatives.
Actually it’s not, I have worked with this chip for a very long period of time and it’s works very well. The voltage rating is 4.5 – 40 V for the variant I have used https://www.ti.com/product/TL074H
See the result when I used it for recording ECG at 5v with Arduino Nano
Hi, I have used the new and updated TL074H chip from Texas Instruments thus module works at 4.5 – 40 V. You can easily use it with your Arduino UNO/Nano board. I have even created a prototype at home and by just changing 2 capacitor values (band-pass filter cutoff) used it for recording ECG with my Arduino Nano board. You can find the prototype image and recorded ECG here https://drive.google.com/drive/folders/1cFXzcOOiGTjZWoP1Amhinbz3w-NzLMwL?usp=sharing
Thank you very much for your generous support, it means a lot to me <3
You can join our discord server if you are interested in helping us with the development and for general Q&A, https://discord.gg/eC3KKZhW
Would this scale and be adaptable to do an EEG, EKG, E*G?
Yes that’s the plan, I tried using it for recording ECG, see the results
What about electrical isolation from the mains?
Note that PSUs for medical devices have special characteristics to ensure there is no current leakage, and they are correspondingly expensive.
“Beginners and amateurs think about how things work. Professionals think about how things fail”
The chip used (https://www.ti.com/product/TL074H) has quad FET-Input Operational Amplifiers which ensures the input current limiting. The module when used with your desired MCU which might be connected to Laptop/Computer/Mobile has another level of protection from the device. Most people will be using it for Battery operated gadgets and that is very safe, the safest i would say. Let me know if you think differently OR have something to add here, thanks :)
I will add proper HV isolation testing information to the Github repo soon… stay tuned :)
Also, the chip has very high ESD (1.5 kV, Human Body Model) rating.
That was a very generous reply.
Good to know that you liked it :)
>has quad FET-Input Operational Amplifiers which ensures the input current limiting.
Nope!!! This person has no idea the concept of isolation nor understand the medical safety requirement.
>the chip has very high ESD (1.5 kV, Human Body Model) rating
The protection is for the device, not the person. So ESD rating are pointless.
Datasheet: 6.1 Absolute Maximum Ratings: TL07xH
Signal input pins – (VCC–) – 0.5 | (VCC+) + 0.5 V
This suggests there are ESD diodes connected to the power rails, so they can conduct when inputs (your body) are above or below the device ower rails. i.e. It is not isolated as the ESD diodes will be the conductive path.
>The module when used with your desired MCU which might be connected to Laptop/Computer/Mobile has another level of protection from the device.
Only when the laptop and arduino are running on batteries and not connected to other things such as chargers, AC outlet or other devices. i.e. that’s the only protection.
> Nope!!! This person has no idea the concept of isolation nor understand the medical safety requirement.
There will always be a better way to put things but, It should make sense to the majority of people, right?
As It is pointed in the article below that “JFET-input amplifiers include an input differential pair using JFETs which enable a very large amplifier input impedance”, This very high input impedance is much more than 10M, which is what we require for a good Biopotential amplifier. This high input impedance not only ensures minimal loading on the skin but also provides a very weak path of an incoming current surge to pass through the electrodes, which is what we want for our device.
> This suggests there are ESD diodes connected to the power rails, so they can conduct when inputs (your body) are above or below the device ower rails. i.e. It is not isolated as the ESD diodes will be the conductive path.
That is the case here, Input pins are diode-clamped to the power-supply rails. That is a method of patient protection used in circuits for Bio-potential amplification circuits. A similar circuit is in the image link below. It’s also called Defibrillator Protection Circuit.
These two factors i.e. high input impedance and protection/clamp diodes with each input are the basic requirements for patient protection in Bio-potential amplification devices. To double down on these protection techniques, An extra step here would be to include 100k series resistors and for protection BAV99/BAT54 diodes with each Input.
The very high input impedance of Instrumentation Amplifier of BioAmp EMG Pill and already available clamping diodes provides good protection for the end-user of the circuit. If you think differently please let us know what can be done to ensure safety and to even make it more secure, my OpenSource design is open for feedback.
The user/patient is often not grounded in the EXG systems it’s the same with EMG Pill. A Driven Right Leg (DRL) circuit is included in the design. The circuit also helps to increase the patient’s safety. If an abnormally high voltage should appear between the patient and ground due to electrical leakage or other means, the auxiliary op−amp in the right leg circuit saturates. This effectively ungrounds the patient since the amplifier can no longer drive the right leg. The resistance between the patient and ground is usually several MΩ and is therefore large enough to protect the patient. With a 5 MΩresistor, for example, and a supply voltage of 5 V, the amplifier will saturate at a current of approximately 1 μA. For more info please refer to the document below.
> Only when the laptop and Arduino are running on batteries and not connected to other things such as chargers, AC outlets, or other devices. i.e. that’s the only protection.
Indeed, operating the device with a battery instead of it connected to AC is the best measure for ensuring the safety of the patient. I would say using any device which is taking power from your computer (connected to mains) and making a contact with your body can be a bit dangerous in extreme situations, no doubt on that. These devices also include your development boards like Arduino UNO which you might touch get shocked from. The problem I believe is inherently not in the BioAmp, It’s the problem of a computer/Laptop that has a faulty power supply unit. Don’t you think the manufacturers of the computers/laptops thought about AC isolation for the safety of end-user?
If you agree with me that they did think about it and every Computer/Laptop has some type of protection then, don’t you think that provides another layer of protection on top of the high input impedance and input protection/clamping diodes of TL074H based Instrumentation Amp?
If the Computer/Laptop is already giving you shocks then it will be a foolish thing to use it with anything like BioAmp EMG Pill anyway. There are risks and there will be risks but, please don’t make it seem like there is a very high probability of happening anything serious. I believe very sophisticated engineers (maybe like you) design the electronics involved in “AC PSU Laptop” and they have considered the worst that could happen, you agree with me with this right?
The device I have created here is not meant to be for any Life critical situation and certainly doesn’t comply with what a medical device would need. The whole purpose of the EMG pill is to sense muscle signals and the protection is there within the module.
I think you and Tom G know things better than me and I appreciate your comments. It’s good to see that you are concerned about the proper protection measures of others. I have made the design OpenSource and good feedback is what I need to make it better with each iteration, This pushes me to improve on my design further. As a learner myself I want dedicated and knowledgeable people like you guys to correct me if I am wrong so that I can make things right.
Let me know if there is something we can add to the project to improve patient protection, I will make sure to include the required things with the next revision.
You appear to be a well-meaning person, but one who completely misinterprets the significance of a circuit’s operation, and cannot consider failure modes and consequences.
This is an example of the Duning-Kruger syndrome.
>An extra step here would be to include 100k series resistors and for protection BAV99/BAT54 diodes with each Input.
BTW that’s the minimum thing to do, BUT still causes problem as that excess energy have to be dissipated some how. i.e. Injecting that current into a power rail raises it, so you’ll need to clamp it.
> The protection is for the device, not the person. So ESD rating are pointless.
Totally agreed but, the way i see this is that the chip includes protection diodes and we don’t necessarily have to include extra ESD protection diodes for inputs. Attaching clamping/protection diodes on inputs is a way of patient protection used in the Bio-potential amplification device designs. I suppose now it’s clear what i meant by listing the fact that the chip has good ESD protection.
You are misinterpreting the ‘defibrillator protection’ circuit. The resistor and diodes on the input are meant to protect the op/inamp by clamping the high-voltage generated by a defibrillator, it does not protect the patient. Actually, it can even lead to a low-impedance path as explained by tekkieneet.
A faulty device will lead to danger for the end user and if we are protecting the device we are setting up a precautionary measure for preventing the danger right?
I believe you’ll agree with that Wouter.
> it can even lead to a low-impedance path
It would be awesome if you could share some document backing/explaining this :)
BTW ESD protection has a different pulse and energy profile than defibrillator – it is much shorter pulse and a few orders of magnitudes lower nergy. i.e. what works for ESD will not work for defibrillator.
>the chip includes protection diodes and we don’t necessarily have to include extra ESD protection diodes for inputs
Failure to see that shows the lack of basic understanding of ESD human model nor how input protection works. Might want to read up a bit. Run that in Spice and see if it exceeds Absolute Maximum Rating.
BTW diodes fail short circuit.
>It would be awesome if you could share some document backing/explaining this
The fact that you don’t understand that diodes can conduct when they are biased…
– look up V vs I curve for diode
– understand what it means to conduct
– understand what it means for low impedance
Too little knowledge on the basic subjects makes you a very dangerous person as you don’t know how wrong you are.
BTW might want to read the fine prints on the datasheet that you missed.
>Enhanced Product: TL072-EP, TL072-EP, TL074-EP, TL074-EP
>• Enhanced Product – Supports Defense, Aerospace and Medical Applications
Do you know enough to look for that?
What about it? Obviously it’s related, but it’s like you’ve seen an article about electronics and said “soldering irons are hot!”
I think the simplicity of the design is making people think that it must be lacking the protection. If they do some own research they would find exactly the same thing with other projects, others have much more things in the schematic and I don’t. The EMG Pill has equal amount of isolation and protection that others are offering. It’s just that i have improved the design over years of work and have analyzed many circuits, read articles, watched lectures on Bio Potential amplification, and tested my designs before making EMG Pill. I am ready to hear what that have to say if they have any backing document with them, Just saying things will not result into any improvement in the design thus it’s a waste of their and my own time. I hope they understand this soon enough.
“he module when used with your desired MCU which might be connected to Laptop/Computer/Mobile has another level of protection from the device.”
What does that mean? What is the extra level? What is the degree of protection – numbers, not adjectives.
“I will add proper HV isolation testing information to the Github repo soon”
Old aphorism: you can’t test quality into a product – it has to be designed it.
“The chip usedhas quad FET-Input Operational Amplifiers which ensures the input current limiting.”
“Also, the chip has very high ESD (1.5 kV, Human Body Model) rating.”
Completely irrelevant. Those comments make me suspect you haven’t a clue about safety engineering.
You, and anybody that thinks of connecting such a device to a living body, would benefit from understanding
1) how components can *fail*, either by poor design or during use
2) how components designed for one purpose are not sufficient for others (especially PSUs)
3) the safety standards for medical equipment; there will be many surprising specifications, which encapsulate hard-won experience over the decades.
No, I am not going to *badly* summarise what might happen – you need to do your research.
Agree. Also see my reply above. There are no protections nor isolation.
It is concerning that he does not realise the depth of his misunderstandings.
tekkieneet and Tom G,
Please provide a rough design to provide the requisite safety.
It doesn’t help to bash him, just provide the relevant documentation and sample designs.
If you better research, experience, and understanding, please share it.
> What does that mean? What is the extra level? What is the degree of protection – numbers, not adjectives.
This basically means that your Computer/Laptop comes with some type of AC isolation and will work as a protection layer.
> Old aphorism: you can’t test quality into a product – it has to be designed it.
The quality is indeed designed into the TL074 chip and EMG pill improves it’s quality further. The Instrumentation Amp design of EMG Pill provides very high input impedance and the DRL circuit provides patient isolation from current surge, Please see the reply on tekkieneet’s message above for more information on this.
> Completely irrelevant. Those comments make me suspect you haven’t a clue about safety engineering.
Actually it’s not irrelevant, The ESD protection that TL074H comes with does help in patient protection. It’s a protection method to include clamping diodes to the power-supply rails in BioAmp designs. TL074H pins are diode-clamped to the power-supply rails internally which provide ESD and input/patient protection. Please try not to do any prejudgement based on a single comment I posted to clarify some things in simple words. As i said above there will always be a better way to put things but, It should make sense to the majority of people, right?
> You, and anybody that thinks of connecting such a device to a living body, would benefit from understanding
I admire your concern for the protection of living body connected to EMG Pill, the TL074 chip is very robust and i have done some rigorous tests on it at different voltages and with different power supplies. Still I can not guarantee anything, nobody can and we can just include protection circuitry to make sure if anything fails the connected living body will not be harmed. Instrumentation Amp + DRL of EMG pill design protects the body. There are some standard practices for isolation and protection which EMG pill also uses. Even with the protection, I don’t recommend it for any medical use.
> No, I am not going to *badly* summarise what might happen – you need to do your research.
I have done my research and the design is the product of that. If you think i missed something please be more specific and it would be awesome if you could read the reply on tekkieneet ‘s comment before saying anything.
Your “research” is completely inadequate, and research != experience != understanding. Other people have commented on your cluelessness, I’ll merely highlight your response…
“This basically means that your Computer/Laptop comes with some type of AC isolation and will work as a protection layer.”
Why are you expecting features of a power supply in a device that is not a power supply? Why do you think this device is special? You should either be commenting this on all electronic hacks that someone might touch or none.
That’s a very good question Shannon, I am curious what they have to say on this :)
>Why do you think this device is special?
>Medical equipment can expose patients and caregivers to potential electrical hazards. Several international standards exist to ensure adequate protection is incorporated into equipment designs.
>Medical electrical equipment is provided with no more than one connection to a particular mains supply and is intended to:
> diagnose the patient
> make physical or electrical contact with the patient
>The use of electricity for medical diagnostic, measurement and therapy equipment potentially exposes patients and even caregivers to the risk of electrical shock, burns, internal organ damage, and cardiac arrhythmias directly due to leakage current resulting from improper grounding and electrical isolation. The electrical conductivity of body fluids and the presence of various conductive solutions and gels in the patient care system make this environment even more vulnerable.
But it’s not a medical equipment, It’s just an analog front-end for EMG.
The name you give it is irrelevant — electrons won’t take any notice of your name!
Any leads on how to protect yourself from your end? Any inputs or ideas where we can make safe?
Don’t swallow it!
Should I include this and “Age 8 and above” in the repository?
Need to cover all bases, so better do a “Not recommended for rectal insertion” and “Crushing this up, filling a pipe with it and applying flame may release toxic vapors” as well.
You guys are hilarious 🤣🤣🤣🤣
Have you looked into the OpenBCI project rather then trying to roll your own? They are open source as well and seem to have a much more mature implementation for biopontential applications such as emg and ecg.
Yes, I have looked into the project. It’s quite expensive actually that’s one of the reason of making this project.
They do have a mature implementation and we can learn from them to improve our own platform.
Could this sensor be used to measure the electrical activity of plants?
If we know the frequency band of the signal we can definitely configure the circuit to measure the electrical activity of plants.
This video, though aimed at not blowing up your oscilloscope with a ground loop, gives some insight into electrical isolation.
I teach biomedical engineering technology at the community college level and we build some crude instruments. Here are a few simple things I do in cases involving human contact potentials:
1.) Battery-powered circuits only (maximum +/- 9V)
2.) Current limiting series resistors in all contact paths.
–a.) 18V/1Meg = 18uA
3.) Complete isolation from human contact electronics to instruments. microcontrollers, etc.
–a.) linear optocouplers, isolation amplifiers
–b.) battery powered instruments (scopes, meters, sources) can still be a problem.
In implementing a DRL circuit for ECG, double and triple check your paths. Keep it below 10uA.
Analog Devices (and others) have helpful application notes and there are available schematics “out there” for verifying what others have been saying above.
Hey, is there any way how to output sound from any EMG device? I mean directly listen to what muscles sound like not converting EMG signals to sound through MIDI or synth.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)