Introduction: Monitoring Heart Rate With Fiber Optic Fashion

Take wearable fashion to the next level with this eye-catching fiber-optic dress that uses an integrated pulse sensor and LED light to output a different color based on the user’s heart rate!

Supplies

1 - FLORA: Wearable electronic platform: Arduino-compatible (v3)

1 - Pixie - 3W Chainable Smart LED Pixel

1 - USB cable: USB A to Micro-B

1 - 3 x AAA Battery Holder with On/Off Switch and 2-Pin JST

1 - 0.03in(0.75mm) 328ft PMMA Plastic end Glow Fiber Optic Cable

1 - Pulse Sensor Kit

3 - Alkaline AAA Batteries

1 - Soldering Iron + Solder

Stretchy black fabric

Sewing Machine

Black thread

Heat Shrink Tubing

Wires

Wires with Alligator Clips

Wire Strippers

Scissors

Ruler

Epoxy glue

Computer with Arduino IDE downloaded

Step 1: Sew the Dress and Gloves

While you are free to make the dress and gloves with whatever material and in whatever style you'd like, we decided to repurpose an old black dress from the thrift store. The dress was made of a stretchy black knit that was perfect to create both the gloves and the dress.

The picture above has one glove, but make sure to make 2 gloves!

The Dress

Using an old, one-shoulder bodysuit and a bodycon dress, we outlined a pattern onto the black knit material. We then cut the fabric with a 1" allowance and sewed together the seams with a sewing machine. Linked here is a helpful tutorial on how to create a dress from scratch, if sewing is new to you.

Make sure the shoulder of the dress is on the side of the finger you want to put the pulse sensor on. For example, we wanted to connect the pulse sensor to the left index finger, so the shoulder was on the left side.

Try on the dress and make alterations as needed to get your desired fit.

The Gloves

Similarly, we used our own hands to create the pattern for the gloves. To do this, lay your hand flat on the fabric and use chalk to outline your hand. Make sure to spread your fingers out when creating the outline so that you have enough space for seam allowance. Particularly, on the index finger of the left hand glove, try to leave a bit more allowance for the pulse sensor (about 1/2" more). Then, using a ruler, measure from your wrist to midway on your bicep. Use this measurement to create the "sleeve" of the glove. We cut the fabric with a 1/2" allowance and opted to hand sew this part since the fabric kept catching on the machine.

Step 2: Wire Everything and Check the Code

Preliminary Wiring

Using the diagram above, connect everything with alligator clips. DO NOT solder just yet. We want to make sure everything runs smoothly with the code.

The Code

Download the code from GitHub here and upload to your Arduino IDE. The code was adapted from jeffyactive's code, which was found on GitHub. The main adaptation was to switch the exstrip to a Pixie instead of a NeoPixel.

Make sure you have at least Arduino IDE version 1.6. Download the Pixie, the NeoPixel, and the Software Serial libraries before starting. Connect the USB to your computer with the full circuit and upload the code to the Flora. Check to see that when you place the pulse sensor on your finger, you get a color and pulse output on the Pixie. Make sure the adjust the brightness to a lower number while testing to prevent hurting your eyes. For the final product, we used the maximum brightness level of 255.

The code will read your pulse via the pulse sensor, blink the in board NeoPixel on the Flora according to the heart rate, and display a color on the Pixie based on your average bpm.

The following section of code determines the color that is outputted to the Pixie. It creates a gradient ranging between green, yellow, and red depending on how low/high your heart rate is.

void setExStrip() {
int g = 300 - BPM;

int r = (BPM - 60) * 2;

if(g > 255) {

g = 255; }

if(r > 255) {

r = 255; }

exstrip.setPixelColor(0, exstrip.Color(r, g, 0));

exstrip.show(); }

Step 3: Solder Everything Together

Using a soldering iron, solder all of the parts together according to the previous diagram. Be sure to tin the wires and the pins before connecting them together.

Make sure to have enough wire to extend from the tip of the pulse sensor to the center of your back. You may need to extend the wire that comes with the original pulse sensor. Also make sure to have enough wire to extend from the Flora on the center of your back to the Pixie by your shoulder. See the diagram for reference.

We used heat shrink tubing to keep the wires together and make everything look more neat. This is optional. You can also use electrical tape to keep the wires together. The black color of the heat shrink also helps hide the colors of the wire.

Step 4: Attach the Fiber Optic Cables to the Pixie

First, cut notches in the heat shrink that could wrap around the base of the LED on the Pixie (see figure). Glue this in place using hot glue and Gorilla Glue epoxy. After letting it dry, bundle the the fiber optics together, coat the inside of the heat shrink with more glue, and insert the bundle into the heat shrink. After that dries, use a lighter to shrink the heat shrink around the fiber optic cables.

This proved to not be the most effective method unfortunately. The glue started to detach from the Pixie, which reduced the contact between the fiber optics and the light. Ideally, a 3D printed piece could be made to fit around the Pixie and fiber optics to hold everything in place better.

Step 5: Attach the Fiber Optic Cables to the Dress

Pin each cable down onto the dress in 2-3" segments starting at the shoulder of the dress and extending down to the hem. Hand sew the cables by making small stitches that wrap around the cables holding them in place.

Step 6: Enjoy Your New Biofeedback Dress!

Upload the code, disconnect from the computer, turn on your battery pack, and enjoy!