Want to activate your project by flexing a bicep, raising an eyebrow, or clenching a fist? The MyoWare Muscle Sensor can help you make that happen. 

This sensor uses EMG (electromyography) to sense the electrical activity of your muscles. It then converts that into a varying voltage that can be read on the analog input pin of any microcontroller.

What you will need for this exercise:

Before you begin, please review and understand the following prerequisite guides:

In order to connect the muscle sensor to a breadboard we will need to add some wires. Check out how to do this in the steps below.

The third electrode is connected to the circuit board with a black wire. While this connection is already fairly robust, you can reinforce it with glue if you think it will be put under repeated strain.

Strip the ends of the silicone-coated wires and tin the tips with a bit of solder.

Snip off the headers on one end of a strip of 3 jumper wires. 

Separate and strip the newly exposed ends of the jumper wires. Put a short piece of heat shrink tubing on each end of silicone coated wire. Bring exposed ends together.

Solder together exposed ends of silicone coated wires to jumper wires.

Cover with heat shrink tubing and use heat gun to secure in place.

Braid the strands of silicone coated wire and secure with a zip tie.

Use helping hands to secure the MyoWare sensor board and the exposed silicone coated wire ends.

Solder in place. Be sure to match red wire to "+", back to "-", and the remaining color to "SIG".

Your MyoWare Muscle Sensor is ready for business!

Now that your sensor is ready you can go ahead and assemble your circuit. It should look something like this:

The connections that are being made are as follows:

  • MyoWare "+" to Feather 3V
  • MyoWare "-" to Feather GND
  • MyoWare "SIG" to Feather A0

Also included in this circuit is an Adafruit USB Isolator. It is connected to the computer using a USB mini cable and connected to the Feather using a USB micro cable.

It is extremely important to take safety precautions when using sensors that connect directly to your body. The USB Isolator provides protection against any unexpected surges or spikes. This is only necessary if you are wearing the sensor while your circuit is still plugged into your computer. It is not necessary if you are operating exclusively off of battery power. For a battery-operated wireless communication approach to using this sensor check out the 'Sup Brows project guide.

This sensor provides an analog signal that can be read by the analog input on your microcontrol, just like many of the common sensors you might use.

Simply open up Arduino and go to File -> Examples -> 01.Basics -> AnalogReadSerial. Then upload this code to your Feather board.

Once your code is uploaded you are ready to start sensing! There are many muscles that you can monitor using this sensor - basically any that sit close to the skin. The sensor should always be placed along the length of the muscle, with the electrode closest to the wire connections placed at the middle of the muscle and the second electrode on the circuit board towards to end of the muscle. The third electode attached to the black wire should be placed away from the muscle that is being sensed.

For this example we'll be doing some sensing on the forearm which is a great way to tell when you've clenched your fist. Use the following steps to get your electrodes in place.

Add electrodes to all 3 connectors on the sensor. Remove the paper backing of the two electrodes on the circuit board.

Clean the skin with rubbing alcohol to remove dirt, oil, or lotion.

Put the circuit board in place. The side of the circuit board with the wires should be close to the center of the muscle and the other side should be close to the end of the muscle.

Peel the paper backing off of the electrode on the black wire and place it somewhere away from the muscle you are sensing.

Your sensor is in place and you're ready to get sensing!

Now that your circuit has been created, the code uploaded, and the sensor placed on the muscle you are ready to start looking at some sensor values!

Open up the Serial Monitor in Arduino and make a fist. As you flex the muscle the values should go up and when you release they will go back down. 

Now that you've got the MyoWare sensor up and running you can start thinking about all the possibilities of what you can do with it! Here are some ideas for things to try next:

  • Use the sensor values to turn on an LED or spin a motor when you flex your arm.
  • Look up EMG electrode placement and try to sense other muscles.
  • Check out the sensor's datasheet to learn more about it.
  • Try our wireless 'Sup Brows project to trigger internet-connected actions
  • Imagine the biggest and smallest thing you could make happen with the flexing of your muscles!

This guide was first published on Jan 27, 2016. It was last updated on Jan 27, 2016.