Overview

We spend a lot of time trying to send messages to each through talking, texting, emailing, and more. What if you could send a message to your friend by simply raising your eyebrows?

In this wearable electronics project we'll learn to make muscles send text messages! This learning guide will show you how to use a MyoWare muscle sensor and a Bluefruit Feather microcontroller to transmit a signal through the phone to Adafruit IO and If This Then That to trigger an SMS. Let's get started!

Circuit

The first thing we need to do is assemble our circuit. Because we want this circuit to be wearable, we will just connect the sensor directly to the feather board. We'll be working with silicone cover stranded wire because it is very flexible and also strong. Follow the steps below to complete your circuit.

Cut 3 lengths of the silicone cover wire and strip both ends of each piece. Tin the tips with solder to prevent the ends from splaying.

Solder one end of the wires to the "+", "-", and "SIG" connections on the MyoWare Muscle Sensor.

If you are using all of the same-colored wire like in the photo, label the other end of the wires so that you know which connection is which.

Use some tape to secure the board to the table.

Braid the wires. This will prevent them from getting snagged on things when you are wearing the sensor and will create a lovely flexible cord.

Use a zip tie to finish off the end of the braid. Snip off the tail once it is in place.

Position the end of the braid over the top of the Feather board and bring the wires around the edges and up from underneath. This will ensure that you don't have any scratching solder connections on the back that will rub against your clothing or skin.

Solder the connections in place. 

The connections that are being made are as follows:

  • MyoWare "+" to Feather BAT
  • MyoWare "-" to Feather GND
  • MyoWare "SIG" to Feather A0

Trim the wire ends once your soldering is done. Your circuit is now complete!

Bluetooth Test

Upload the Code

Download the code and open it in Arduino. Connect the Feather to your computer and upload the code.

Place the Sensor

Disconnect the Feather from the computer. Connect the battery.

Clean your forehead with some rubbing alcohol to make sure it is free from dirt, oil, makeup, and lotion.

Attach 3 electrodes to the connectors on the sensor. Remove the paper backing from the two on the circuit board.  Position the sensor on the forehead according to the image below. The wires should point up towards the hairline and the sensor should sit at a diagonal, with the lower end above the inside edge of the eyebrow and the higher end shifted away from the center.

Remove the paper backing from the third electrode and position it on your temple.

View Sensor Values Via Bluetooth

Open the Adafruit Bluefruit LE Connect App on your phone or tablet. Hit "Scan For Peripherals" and wait for the Adafruit Bluetooth LE to appear in the list. When it does, hit the "Connect" button next to it.

On the next screen select "UART".

Now you will see your sensor values on screen! Raise and lower your eyebrows to see the sensor values change.

If sensor values don't change try repositioning the sensor so that it sits more precisely on top of the muscle.

IFTTT Test

Adjust the Code

To get ready for connecting to If This Then That we are going to make a slight adjustment to our code.

Disconnect the sensor from your face and use a USB cable to connect the Feather to your computer. Go back to the loop in your code. Comment out the following line so it looks like this:

Download: file
  // ble.println(sensorValue);

Then uncomment the block of code that follows so it looks like this:

Download: file
if (sensorValue > threshold && oldSensorValue < threshold) {
    ble.println(sensorValue);
 }
  
oldSensorValue = sensorValue;

Once you've made these changes go ahead and upload the code to the Feather. Unplug the Feather from your computer, connect the battery, and reattach the sensor to your face. 

Create a Feed on Adafruit IO

Log in to Adafruit IO and create a feed for your brow activities.

Adjust MQTT Settings

Open up the Adafruit Bluetooth LE Connect app on your mobile device. Reconnect with the Feather board and open the UART window. This time the sensor values will only appear when the sensor values pass a certain threshold - aka when you raise your eyebrows!

Select the MQTT icon in the upper right.

Configure your first two boxes as follows:

Server

Address: io.adafruit.com

Port: 1833

Publish

UART RX: username/feeds/feedname

Under "Advanced," enter your username and AIO key, which can be found by clicking the key button in the upper right of any of your Dashboards.

Copy your AIO key into an email, file on dropbox, or other easy way to paste it into your device-- copying it from the screen is no fun (unless you love memorizing)!

After you've configured your settings, go ahead and click CONNECT at the top of the page.

You can then check your feed on Adafruit IO to make sure the data is uploading properly.

Create a Recipe on IFTTT

Open your IFTTT account and create a recipe using the Adafruit channel. Use the "Any New Data" trigger and select the appropriate feed.

From there you can select your action. We used Android SMS to send a text message.

Now whenever you raise your eyebrows it will send a 'Sup message to your friend!

Making It Wearable

There are lots of ways to make this wearable. The sensor it self already sticks directly to your face. The remaining question is where to put the rest of the circuit. You could attach it to a hair clip or to your shirt.

For ours we used a nifty 3D printed battery holder and a magnetic pin back. 

The battery holder is attached to the Feather with some thread and the pin back is stuck to the back of the board.

We then connect the battery and tuck the wire into the pin back to keep it from snagging on anything.

Once it's assembled it can be clipped to any piece of clothing! If you want to get fancy you can create a pocket or a pouch to disguise the electronics and keep your circuit enclosed.

The last bit to be dealt with is what to do with the sensor on your face. If you're into a cyborg look you may just want to leave the sensor exposed, maybe even accenting it with some fancy makeup.

For ours we used some paint and sparkles to create some Bowie bolts to bling up our brows. Trust us - it makes the message sending process feel extra zingy!

'Sup 'Sup and Away

'Sup Brows are just the beginning. Because it’s connected to If This Then That, the possibilities of what you can accomplish by just raising your eyebrows are endless!

Similarly you can also connect to a variety of other muscles in order to have activities triggered by other facial expressions, gestures, and actions.

What kinds of networked muscle sensing projects could you imagine?

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