Thursday, November 17, 2016

PROJECT: EMG Amplifier, Update #1

Sometime around mid this year I decided to make an Electromyography (EMG) amplifier circuit. This idea came alive because I like the though of human augmentation, and making something along these lines would be super neat.


Research

So I set out on my journey of learning, reading many Masters/PhD papers to try and see what exactly makes an EMG signal and how to successfully amplify/capture it. From this I found:
  • The easiest way to capture an EMG signal is by using an Instrumentation Amplifier (IA), this is because unlike normal amplifiers these have a super high input impedance which does not collapse the waveform.
  • Another neat thing about IA's is that they have a high Common Mode Rejection Ratio (CMMR), this means that any unwanted signal present on both inputs (such as the annoying 50Hz hum) will get automatically attenuated/"removed".
  • One way which you can further process the signal is by using an active filter, this allows you to filter out any frequencies that you are not interested in. For example the range I was interested in was 50Hz ➝ 200Hz.

Simulation

With that knowledge in hand I then designed the active filter circuit with the help of the electrical engineering bible (The Art of Electronics), and simulated the circuit in LTSpice:


Results

After a few more iterations and additions I then decided to jump the gun and design an actual PCB:
Board all laid out and ready for OSH Park.

Breadboarding, what I should have done at the start...

My Band Pass Filter almost working as expected :D


Reflection

Though this was the densest board I have made to date (2-layer 50mm x 30mm) rushing and making the board without first prototyping the circuit turned out to be a big mistake, as I learned:
  • Trying to assemble a board full of tiny components is tedious, especially if you don't have a solder paste stencil. 
  • Not all components are designed equal and some can withstand heat better than others, this is what happened to the heart of the circuit as all amplifiers were cooked to death ; - ; luckily I had a few boards and components to spare.
  • Trying to debug a busy board like this is not fun. In the future I should either make it on breadboard first, or add lots of jumpers to be able to bring sections in/out, plus lots of accessible test-points would not hurt as well.
  • Experimenting too soon can really mess things up. My downfall was that I decided to try and use two SIM card contacts as the EMG contact, when instead I should have started off with something that I knew would work (like this). Again this made debugging harder as I did not know if it was the circuit or contacts at fault.
  • As I mentioned earlier your IA needs to have a high input impedance, using the INA827 instrumentation amplifier was not good enough. Something like the INA826 (yeah I'm cheap) would have been better, 
  • If you do decide to power your circuit from a single rail (as in Vcc to GND not Vcc to Vss) make sure your amplifiers are designed for it. With my circuit I initially went with TL974 when I should have gone with something like MCP6004.
  • An addition to above, make sure that any active elements are also designed to work from a single rail. For my circuit the active full-wave rectifier was designed to work from a dual rail supply...
So now the project is on hold as other things have taken over, but I do look forward to coming back and getting this thing finally working :D

No comments:

Post a Comment