EMG Biofeedback

This biofeedback setup uses an EMG sensor to represent muscle tension as a series of beeps and allows you to train your body to adjust muscle tension at will. In short, the more tense you are, the faster the beeps become, and the more relaxed, the slower. Using this device you can learn how to regulate your body to speed up and slow down the beeps; hence increasing and decreasing muscle tension. With some practice, you will have enough understanding of your body to be able to control muscle tension without use of the device. This is cool because it allows you to consciously control a part of the body you would not normally be able to otherwise sense or easily control.

I set mine up to monitor the muscles in my shoulder and neck that are responsible for tension headaches, but you can place them on just about any muscle group. I recommend experimenting with the placement of the sensors and seeing what is possible.

Step 1: Go get stuff

EMG Biofeedback

You will need:
- An EMG sensor
- Electrode cables
- Electrodes
- An Arduino
- A +/- 5V regulated supply board***
- 3-Pin female header
- 9V battery snap
- 1/4" stereo jack
- Headphones with 1/4" plug
- European-style terminal strip
- Red, green, and black 22 awg solid core wire

***+/-5V is the bottom range for the sensor board. I found two 9V batteries wired in series worked better than this board. The single red Wire is +9V, the junction where the two batteries meet is ground, and the lone black wire is -9V. Alternately, you can get a +/-12v mini board from Futurlec. However, I have not tried this.

Step 2: EMG Board

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
Show All 9 Items

Assembled the EMG board with the parts provided as labeled.

Note that it comes with 5-band resistors and those are read differently from the typical 4-band resistors.

Step 3: Prepare the cables

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

Take a razor blade or other sharp object and cut around the circumference of the center of the cables plug to expose a metal tip.

Repeat this for all three cables.

Step 4: Power connector

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

Solder a red, green, and black wire to the 3-pin socket.

Make certain the black wire is in the center. The other two wire can be on either side.

When you are done, you may want to reinforce the connections with a bit of hot glue (or similar).

Step 5: Plug things

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

Plug the three wires from the socket into the +/- 5V power supply such that green is going to -5V, black is going to ground, and red is going to +5V.

Also plug the 9V battery snap wires into the power-in connector. Make certain that the red wire is going to the pin labeled "VIN".

Step 6: Program the Arduino

EMG Biofeedback
Program the Arduino with the following code:


/* EMG Biofeedback Plays a beep that corresponds in legnth to the reading received from an EMG sensor. The more tense the muscle becomes, the longer the beep legnth. Based on two Arduino examples by Tom Igoe This example code is in the public domain. */ const int analogInPin = A0; // Analog input pin int sensorValue = 0; // value read from the sensor #define NOTE_C4 262 //defines the note as middle C int melody = NOTE_C4; //sets variable to middle C void setup() { // initialize serial communications at 9600 bps: Serial.begin(9600); } void loop() { // read the analog in value: sensorValue = analogRead(analogInPin); // print the results to the serial monitor: Serial.print("sensor = " ); Serial.println(sensorValue); int noteDuration = (sensorValue); //states the note duration is the sensor reading tone(8, melody,noteDuration); //plays note for legnth of sensor reading on pin 8 // to distinguish the notes, set a minimum time between them. // the note's duration + 30% seems to work well: int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); // stop the tone playing: noTone(8); }

Step 7: Audio jack

EMG Biofeedback
EMG Biofeedback

Wire the two signal tabs together and then attach a long red wire to one of them.

Attach a long black wire to the terminal connected to the inner ground lug.

Step 8: Terminal connection

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

Trim the European-style terminal strip down so that there are 3 pairs of connectors.

Plug the electrodes into one side.

Plug corresponding wires into the other side. I didn't have a white wire, so I used green.

Step 9: Plug in

EMG Biofeedback
EMG Biofeedback

On the sensor board, plug the green/white wire into the header slot labeled "M.Mid"

Plug the red wire into slow labeled "M.End"

Plug the black wire into the slot labeled "Ref"

Step 10: Connect to Arduino

EMG Biofeedback

Connect the slot labeled "Vout" on the sensor board to analog pin 0 on the Arduino.

Connect together ground on the two boards.

Step 11: Power

EMG Biofeedback

Connect the 3-pin female header from the power board to the sensor board such that the green wire is aligned with -V.

Step 12: More power

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

From the power board connect the +5V and ground connections to the corresponding pins on the Arduino.

***If you are using an alternate power supply greater than +5V, be sure to connect it to the voltage in jack on the Arduino instead.

Step 13: Connect electrodes

EMG Biofeedback
EMG Biofeedback
EMG Biofeedback

Snap the electrodes into the ends of the adapter cables.

Step 14: Attach resistor

EMG Biofeedback

Attach a 20K resistor to the end of the long red wire affixed to the audio jack.

Increasing or decreasing the value will determine the volume of the beeps. I would not decrease it to less than 10K or it will be too loud and might harm your hearing.

Step 15: Plug in jack

EMG Biofeedback
EMG Biofeedback

Plug the resistor that you just attached to the audio cable into pin 8 on the Arduino.

Plug the black wire into ground.

Step 16: Attach electrodes

EMG Biofeedback
EMG Biofeedback

Place electrodes along the muscle you want to monitor.

The black electrode is reference and should be placed in an area not affected by the muscles you are trying to measure.

The red should be placed at the end of the muscle near where it attaches to a tendon.

The white should be placed in the center of the muscle.

This is how I placed them on my shoulder to monitor tension. I got suitable results with this configuration.

Step 17: Plug it in

EMG Biofeedback

Plug in your battery to power it all up.

Step 18: Headphones

EMG Biofeedback
EMG Biofeedback

Put on the headphones. Notice how you can adjust the length of the beep by tensing and relaxing your muscle.

Now, you can train yourself to produce a sound of a certain duration by concentrating on that muscle group.

You can also monitor the sensor readings by plugging the Arduino back into the computer and turning on the serial monitor. Make certain you unplug any external voltage sources to the Arduino before you try this.
 
 

Tag cloud

make build easy simple arduino making homemade solar laser printed portable cheap mini building custom cardboard wooden create super lego turn paracord chocolate your paper light intel