Building upon our last tutorial, which taught you how to build a muscle sensor, we've decided to give you a project that really showcases the power of our muscle (EMG) sensors. Advancer Technologies’ “USB Biofeedback Game Controller” harnesses the power of electromyography to allow players to directly control video games with their muscles. At the core of this plug-in-play controller is the powerful yet low-cost Arduino UNO microcontroller, a favorite among hobbyist and students, acting as a HID keyboard interface. Integrated with the Arduino UNO are four of our Muscle (EMG) Sensors, allowing four muscles to act independently or in combination with each other to control over four buttons. In our setup, we elected to use a six button setup with the left forearm controlling the B button (RUN/ATTACK), the right forearm controlling the A button (JUMP), the left bicep controlling the LEFT button, the right bicep controlling the RIGHT button, and combinations for UP and DOWN.

This tutorial will teach you to build a USB Biofeedback Game Controller. Use it to play any computer game (that uses keyboard inputs) using your muscles as the controller.

Check out our previous Instructable to learn how to build your own Muscle Sensor


Drop by our webstore to purchase muscle sensors, kits, cables and electrodes
Muscle Sensor Kit (now also on SparkFun)
Muscle Sensor Electrodes

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 cultivate 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 .

Step 1: Materials

1 x Arduino Uno R2 (needs the atmega8u2 USB chip which is only available on newer Arduino MCUs)
1 x Arduino Project Enclosure
1 x USB cable for your Arduino
4 x Advancer Technologies Muscle Sensor 
1 x +/-5V Power Supply
1 x 12V Power Supply (Wall wart) 
1 x Muscle Sensor Electrodes

Jumper cables or solid core wire
3 x 1" length pieces of 24-30 AWG wire (1/8" stripped off each end)
3 x 2" length pieces of 24-30 AWG wire (1/8" stripped off each end)
3 x 3" length pieces of 24-30 AWG wire (1/8" stripped off each end)
3 x 4" length pieces of 24-30 AWG wire (1/8" stripped off each end)
3 x 3 position Female Receptacle 
1 x 3 position Female Housing
3 x Crimps for Female Housing
Plastic board (ABS)
1 pack x 3/8" 4-40 Screws (91772A108)
2 packs x 4-40 Nuts

Soldering Iron
Scissors or Tin Snips
Crimping tool
Screw driver
Drill with 1/8" bit
Dremel tool or other cutting tool


I have arduino Leonardo setup to send keypresses to my laptop via keyboard.print () and Serial.println() and it works perfectly but it doesn't work to control emulator. it allows me to assign controls with Leonardo but doesn't let me actually play the game with it.
<p>that power supply kit you have indicated is not available. is it possible to run a muscle sensor using a single battery?</p>
<p>Great idea, amazing. I am wondering if it possible to make a game controller for mobile application using arduino platform? I am thinking about the combination between google cardboard and game controller using arduino.</p>
<p>Made in unity ?<br>http://unity3diy.blogspot.com/</p>
<strong>Hi!! FOR ANYONE WHO HAS AN ERROR LIKE THIS:</strong><br> <br> java.lang.ArrayIndexOutOfBoundsException: 1<br> <br> <strong>just replace the: </strong><br> <br> String V3 = Serial.list()[1];<br> <br> <strong>to:</strong><br> String V3 = Serial.list()[0];<br> <br> <br> <strong>Just found out!</strong>
hello,,im having problem with Processing sketch.when i hit the Run button the window don't pop up.It show error..it said java.lang.ArrayIndexOutOfBoundsException: 1...WARNING: RXTX Version mismatch <br> Jar version = RXTX-2.2pre1 <br> native lib Version = RXTX-2.2pre2 <br>Exception in thread &quot;main&quot; java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 1 <br> at processing.core.PApplet.runSketch(Unknown Source) <br> at processing.core.PApplet.main(Unknown Source) <br>Caused by: java.lang.ArrayIndexOutOfBoundsException: 1 <br> at sketch_apr11a.(sketch_apr11a.java:55) <br> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) <br> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) <br> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) <br> at java.lang.reflect.Constructor.newInstance(Constructor.java:513) <br> at java.lang.Class.newInstance0(Class.java:355) <br> at java.lang.Class.newInstance(Class.java:308) <br> ... 2 more <br> <br>...can help me.I am new with this software....
hello,,im having problem with Processing sketch.when i hit the Run button the window don't pop up.It show error..it said java.lang.ArrayIndexOutOfBoundsException: 1......can help me.I am new with this software
when i try to run the code in processing software, it replies me &quot;serial does not run in 64-bit mode&quot;. i'm still new in this software. please help me.
Hi , I got it to funciton but only until the third phase, the fourth one is still not working. I will post my advance later today to show you what im doing to see if you can give me a hand, also I was trying to upload the NES EMG files but it does not let me it shows as a pde and it has problems with a boolean type of variable. It seems like it is a processing sketch not an Arduino one. Also I was checking the steps to updgrade the firmware. Is it mandatory to do it? by doing that would I be able to upload the .pde file to the arduino? <br> <br>I will wait for your reply. Thanks
Hi,<br><br>What version of Arduino's software are you using? This sketch won't work for the new release, v1.0. They moved some header files around. If I find time, I'll work on updating the sketches.<br><br>.pde was used by previous arduino files as well as processing files.<br><br>I'm not sure I understand what you are talking about in regards to the firmware.
I-m using the Arduino UNO R3 which is different than the one in the link you posted. I haven't tried to update the firmware in this one since the pictures in the link does not match with the one that I have.
Are you talking about the Arduino hardware firmware? You shouldn't have to update the hardware firmware. <br> <br>The Arduino development software has changed since I posted these instructions. The hardware firmware should be the same.
So basically I just have to update the sketch for the Arduino and I should be good to go?. How do I set up the keyboard to play the nes game? . Is a special game? or can I download any NES emulator?
i downloaded the ardiuno code and when i am about to upload the code to the mcu in the verification , it gives me errors and the code cannot be upoaded. please help<br>
Hello, I'm trying to get this project going, but I'm not able to get anything from the sensors, I made this one with the arduino UNO, and I noticed that the one you have was perhaps a duemilanove? , I tried to compile and Arduino displayed the message, BYTE keyword no longer supported , instead use Serial.write. I changed all of the commands and the program didn't show any mistakes but after uploading everything to Arduino nothing happened. Can you give me a hand with this?
I've updated the Arduino and Processing code used to visualize the sensor output with the new Arduino code base. Let me know if you have any problems with it.
Nope the one I used was an UNO. They've updated the code syntax since this instructable was posted. From my quick google search, it looks like you were on the right track with replacing all .print with .write. <br><br>http://www.engblaze.com/changes-in-the-arduino-1-0-release/<br><br>I'll update the code when i can find some time. <br><br>You might want to look into grabbing an oscilloscope to debug your circuits. This is the first tool I always use prior to hooking things up to a MCU.
Yes That is what I'm thinking. I will look for one and then post my results, hopefully I solved the problem . I'm pretty far away to buy another one :p <br>I had anorhter question , would it matter if I'm only using 1 EMG sensor for the processing sketch?<br><br>
No it shouldn't matter. You might want to ground the unused analog pins on your Arduino tho. Their values will float otherwise.
Wonderful idear ! But I beg one thing ,I can not downioad the zipped Arduino project in the step 13 ,is there any lovely one can mail me the zipped Arduino project ? My E-mail address : yinshi438788349@126.com .Thank you very much.
Or you could grow big muscles, wrap arm straps around your biceps and flex to press switch. That would be a lot easier. I'm just saying.
Great!, I'm actually starting to study Biofeedback as well, I just have a question about the noise that the circuits may get, is that a lot? or the circuit is designed to leave that aside.<br>Greetings from Mexico
Finally I have a real reason to want to build up my weak and feeble arms...
that is pretty cool, but does it actually provide some kind of workout, or is it just for fun?
Cool :-)
NES Kinect! Seems like my arms would get tired after hours of Mario Bros. action.

About This Instructable


260 favorites


Bio: Brian Kaminski Owner - Advancer Technologies Brian graduated from North Carolina State University with a BS in Biomedical Engineering with a concentration in Biomechanics in May ... More »
More by Gundanium: Bionic Wolverine Claws Bionic Iron Man Glove Bionic Iron Man Armor (w/ Sound Effects)
Add instructable to: