Electromyography (EMG) is the measurement of nerve impulses to your muscles. Probably the most popular consumer device using EMG is the Myo, which is an armband that lets you do gesture control- check out their website to see some cool demos of why EMG is exciting.
The principle behind EMG is pretty simple: nerve impulses are electrical signals on the order of millivolts, and you can read those millivolts through your skin using electrodes.
You can also find this project written up somewhat differently here: https://projects.tessel.io/projects/emg-over-the-gpio
Step 1: Materials
You will need:
Step 2: Make the circuit
You will need to build a circuit to process the incoming signal from the electrodes.
This circuit takes input from five electrodes, amplifies the signal and applies some filtering, and sends it as an analog output. Specifically, it's set up to feed the analog output into the pins of Tessel's GPIO bank as two channels of information, with gains adjustable via the potentiometers.
You can breadboard this. We were kind of fancy and got a custom PCB printed, and then assembled with surface-mount components.
Step 3: Place electrodes
You need three electrodes to get a signal:
By now, you should have electrodes stuck to your arm, the snap-on electrode leads hooked up from your arm to the circuit, and the circuit wired in to Tessel's GPIO bank.
Step 4: Code
Plug your Tessel in to your computer with a microUSB cable.
Now you're going to work from the command line. (If you've never done that before, it's not that hard. Here's a one-minute primer: Mac | Windows)
If you haven't used Tessel before, follow the instructions at tessel.io/start to install and get it up and running.
Now, clone my Github repo: https://github.com/Frijol/Tessel-GPIO-EMG (in the command line, enter: git clone https://github.com/Frijol/Tessel-GPIO-EMG.git)
Change directory into that folder of code (cd Tessel-GPIO-EMG).
Ok. Now here's what you have:
Run test.js with this command: tessel run test.js
Your terminal should spit out some numbers. Try flexing! The numbers on one of the channels should change noticeably when you're flexing vs. relaxed.
Play! Hook up that output to something and control the something with your muscles.
Here's me hooked up to a robot snake.
Here's Jon demonstrating strength-meter.