# Getting Started with MyoWare Muscle Sensor

## Overview

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

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.

![](https://cdn-learn.adafruit.com/assets/assets/000/030/023/medium800/biometric_MyoWareMuscleSensor_parts.jpg?1453782252)

What you will need for this exercise:

- [MyoWare Muscle Sensor](https://www.adafruit.com/products/2699)
- [EMG Electrodes](https://www.adafruit.com/products/2773)
- [Adafruit Feather 32u4 Basic Proto](https://www.adafruit.com/products/2771)&nbsp;(or any other Arduino-compatible that has analog input pins)
- breadboard
- a strip of (3)&nbsp;[male/male jumper wires](https://www.adafruit.com/products/1957)
- [silicone cover stranded core wire](https://www.adafruit.com/products/1970)
- [Adafruit USB isolator](https://www.adafruit.com/products/2107)
- [USB mini cable](https://www.adafruit.com/products/260)
- [USB micro cable](https://www.adafruit.com/products/2185)
- E6000 or Quick Hold adhesive (optional)
- zip tie

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

- [Adafruit Feather 32u4&nbsp;Basic Proto](../../../../adafruit-feather-32u4-basic-proto)
- [Adafruit guide to excellent soldering](../../../../adafruit-guide-excellent-soldering)
- [MyoWare muscle sensor datasheet](https://www.adafruit.com/images/product-files/2699/2699datasheet.pdf)

# Getting Started with MyoWare Muscle Sensor

## Preparing the Sensor

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

![](https://cdn-learn.adafruit.com/assets/assets/000/030/128/medium800thumb/biometric_sup-brows-animation-08.jpg?1453846117)

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.

![biometric_MyoWareMuscleSensor_prep1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/093/medium640/biometric_MyoWareMuscleSensor_prep1.jpg?1453835035)

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

![biometric_MyoWareMuscleSensor_prep2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/094/medium640/biometric_MyoWareMuscleSensor_prep2.jpg?1453835071)

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

![biometric_MyoWareMuscleSensor_prep3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/096/medium640/biometric_MyoWareMuscleSensor_prep3.jpg?1453835155)

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.

![biometric_MyoWareMuscleSensor_prep4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/097/medium640/biometric_MyoWareMuscleSensor_prep4.jpg?1453835205)

![biometric_MyoWareMuscleSensor_prep5.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/098/medium640/biometric_MyoWareMuscleSensor_prep5.jpg?1453835236)

![biometric_MyoWareMuscleSensor_prep6.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/099/medium640/biometric_MyoWareMuscleSensor_prep6.jpg?1453835296)

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

![biometric_MyoWareMuscleSensor_prep7.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/100/medium640/biometric_MyoWareMuscleSensor_prep7.jpg?1453835335)

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

![biometric_MyoWareMuscleSensor_prep8.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/101/medium640/biometric_MyoWareMuscleSensor_prep8.jpg?1453835400)

![biometric_MyoWareMuscleSensor_prep9.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/103/medium640/biometric_MyoWareMuscleSensor_prep9.jpg?1453835467)

![biometric_MyoWareMuscleSensor_prep10.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/104/medium640/biometric_MyoWareMuscleSensor_prep10.jpg?1453835497)

Your MyoWare Muscle Sensor is ready for business!

![](https://cdn-learn.adafruit.com/assets/assets/000/030/105/medium800/biometric_MyoWareMuscleSensor_prep11.jpg?1453835525)

# Getting Started with MyoWare Muscle Sensor

## Circuit

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

![](https://cdn-learn.adafruit.com/assets/assets/000/030/013/medium800/biometric_MyoWareMuscleSensor_circuit1.jpg?1453780229)

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](../)&nbsp;project guide.

![](https://cdn-learn.adafruit.com/assets/assets/000/030/014/medium800/biometric_MyoWareMuscleSensor_circuit2.jpg?1453780951)

# Getting Started with MyoWare Muscle Sensor

## Code

![](https://cdn-learn.adafruit.com/assets/assets/000/030/106/medium800/biometric_Screen_Shot_2016-01-26_at_2.52.17_PM.png?1453837956)

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.

![](https://cdn-learn.adafruit.com/assets/assets/000/030/015/medium800/biometric_MyoWareMuscleSensor_AnalogReadSerial.png?1453781364)

# Getting Started with MyoWare Muscle Sensor

## Placing Electrodes

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&nbsp;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.&nbsp;Remove the paper backing of the two electrodes on the circuit board.

![biometric_MyoWareMuscleSensor_EMG1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/087/medium640/biometric_MyoWareMuscleSensor_EMG1.jpg?1453834587)

![biometric_MyoWareMuscleSensor_EMG2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/088/medium640/biometric_MyoWareMuscleSensor_EMG2.jpg?1453834624)

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

![biometric_MyoWareMuscleSensor_EMG4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/089/medium640/biometric_MyoWareMuscleSensor_EMG4.jpg?1453834690)

Put the circuit board in place. The side of the circuit board&nbsp;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.

![biometric_MyoWareMuscleSensor_EMG6.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/091/medium640/biometric_MyoWareMuscleSensor_EMG6.jpg?1453834816)

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

![biometric_MyoWareMuscleSensor_EMG8.jpg](https://cdn-learn.adafruit.com/assets/assets/000/030/092/medium640/biometric_MyoWareMuscleSensor_EMG8.jpg?1453834931)

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

# Getting Started with MyoWare Muscle Sensor

## Sensor Values

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.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/030/110/medium800thumb/biometric_sup-brows-animation-02.jpg?1453843890)

![](https://cdn-learn.adafruit.com/assets/assets/000/030/041/medium800/biometric_MyoWareMuscle_sensorvalues.jpg?1453783754)

# Getting Started with MyoWare Muscle Sensor

## What's Next

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&nbsp;[sensor's datasheet](https://www.adafruit.com/images/product-files/2699/2699datasheet.pdf)&nbsp;to learn more about it.
- Try our wireless ['Sup Brows](../../../../heybrows/)&nbsp;project to trigger internet-connected actions
- Imagine the biggest and smallest thing you could make happen with the flexing of your muscles!

![](https://cdn-learn.adafruit.com/assets/assets/000/030/042/medium800/biometric_MyoWare_bicep.jpg?1453783907)


## Featured Products

### MyoWare Muscle Sensor

[MyoWare Muscle Sensor](https://www.adafruit.com/product/2699)
Control your next project with your muscles with the **MyoWare 2.0 Muscle Sensor!&nbsp;** Pair the MyoWare with&nbsp;some&nbsp;[Muscle Sensor Surface EMG Electrodes](https://www.adafruit.com/products/2773) and a microcontroller (ie. <a...></a...>

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2699)
[Related Guides to the Product](https://learn.adafruit.com/products/2699/guides)
### Muscle Sensor Surface EMG Electrodes - H124SG Covidien

[Muscle Sensor Surface EMG Electrodes - H124SG Covidien](https://www.adafruit.com/product/2773)
Have your next project be controlled by your muscles with this pack of **Muscle Sensor Surface EMG Electrodes!** &nbsp;Pair the electrodes&nbsp;with the [MyoWare&nbsp;Muscle Sensor](http://www.adafruit.com/products/2699)&nbsp;and a microcontroller (ie. <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/2773)
[Related Guides to the Product](https://learn.adafruit.com/products/2773/guides)
### Adafruit Feather 32u4 Basic Proto

[Adafruit Feather 32u4 Basic Proto](https://www.adafruit.com/product/2771)
 **Feather** is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

**This is the&nbsp;Feather 32u4 Basic Proto,** it has a bunch of...

In Stock
[Buy Now](https://www.adafruit.com/product/2771)
[Related Guides to the Product](https://learn.adafruit.com/products/2771/guides)
### Adafruit USB Isolator - 100mA Isolated Low/Full Speed USB

[Adafruit USB Isolator - 100mA Isolated Low/Full Speed USB](https://www.adafruit.com/product/2107)
Have some USB logic analyzer, multimeter or oscilloscope and bumping up against the frustration of a shared earth ground? [The Offspring (known for being electrical engineers) wisely sang "Ya gotta keep'em isolated!"](http://www.youtube.com/watch?v=1jOk8dk-qaU)Power...

In Stock
[Buy Now](https://www.adafruit.com/product/2107)
[Related Guides to the Product](https://learn.adafruit.com/products/2107/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG Red

[Silicone Cover Stranded-Core Wire - 2m 26AWG Red](https://www.adafruit.com/product/1877)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1877)
[Related Guides to the Product](https://learn.adafruit.com/products/1877/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG Black

[Silicone Cover Stranded-Core Wire - 2m 26AWG Black](https://www.adafruit.com/product/1881)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

In Stock
[Buy Now](https://www.adafruit.com/product/1881)
[Related Guides to the Product](https://learn.adafruit.com/products/1881/guides)
### Silicone Cover Stranded-Core Wire - 2m 26AWG Yellow

[Silicone Cover Stranded-Core Wire - 2m 26AWG Yellow](https://www.adafruit.com/product/1879)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/1879)
[Related Guides to the Product](https://learn.adafruit.com/products/1879/guides)
### Adafruit Feather 32u4 Bluefruit LE

[Adafruit Feather 32u4 Bluefruit LE](https://www.adafruit.com/product/2829)
Feather is the new development board from Adafruit, and like its namesake it is thin, light, and lets you fly! We designed Feather to be a new standard for portable microcontroller cores.

This is the&nbsp; **Adafruit Feather 32u4 Bluefruit** &nbsp;- our take on an...

In Stock
[Buy Now](https://www.adafruit.com/product/2829)
[Related Guides to the Product](https://learn.adafruit.com/products/2829/guides)

## Related Guides

- [Adafruit Feather 32u4 Basic Proto](https://learn.adafruit.com/adafruit-feather-32u4-basic-proto.md)
- ['Sup Brows](https://learn.adafruit.com/heybrows.md)
- [Using Bluefruit BLE to Give Disabled Users Switch Control Access to IOS Devices](https://learn.adafruit.com/ios-switch-control-using-ble.md)
- [My Mini Race Car](https://learn.adafruit.com/my-mini-race-car.md)
- [Phone-Activated Talking Dog Collar](https://learn.adafruit.com/phone-activated-talking-dog-collar.md)
- [Introducing Adafruit Feather](https://learn.adafruit.com/adafruit-feather.md)
- [Wireless UNTZtrument Using BLE MIDI ](https://learn.adafruit.com/wireless-untztrument-using-ble-midi.md)
- [Adafruit Feather 32u4 Bluefruit LE](https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le.md)
- [What is Web MIDI & BLE MIDI?](https://learn.adafruit.com/web-ble-midi.md)
- [Festive Feather Holiday Lights](https://learn.adafruit.com/festive-feather-holiday-lights.md)
- [Schluff - The Sleep Monitor](https://learn.adafruit.com/schluff-the-oshw-sleep-monitor.md)
- [3D Printed Daft Punk Helmet with Bluetooth ](https://learn.adafruit.com/3d-printed-daft-punk-helmet-with-bluetooth.md)
- [Custom Bluetooth Cherry MX Gamepad](https://learn.adafruit.com/custom-wireless-bluetooth-cherry-mx-gamepad.md)
- [Magic Wand](https://learn.adafruit.com/magic-wand.md)
- [Fiber Optic Pixie Skirt](https://learn.adafruit.com/fiber-optic-pixie-princess-skirt.md)
