Yoga Breathalyzer

by biobonnie in Circuits > Sensors

10026 Views, 88 Favorites, 0 Comments

Yoga Breathalyzer

2013-10-09 20.32.14.jpg
The yoga breathalyzer is a breath visualization tool to help you understand and get in touch with your breathing. Breath is the basis of yoga and meditation, and this biofeedback tool is one way to develop a deeper understanding of your own breath. Using Arduino, a headset-mounted wind sensor, and an LED strip, it's simple to translate your breathing into visual output. 

This project was created at the Silicon Chef Women's Hardware Hackathon by:
Bonnie Barrilleaux
Sachi Decou
Jamie Piazza
Melanie Goetz
Amanda Galvin


Collect Supplies

For this project, you will need:

Arduino Uno
Soldering equipment, break-away header pins, and wire (rainbow cable works great)
Anemometer (wind sensor) such as this one: http://moderndevice.com/product/wind-sensor/
Wireless headset
Zipties
2 meters WS2812 LED strip, such as this one: http://www.adafruit.com/products/1138
Plastic cup and a single white sock (great use for that lonely sock that lost its partner)
9V DC barrel jack power source
A cup or bowl to cover the sensor so there's no wind during calibration

Solder Wires to the Wind Sensor and LED Strip

2013-10-09 19.49.42.jpg
2013-10-09 19.48.29.jpg
For the wind sensor, solder wires to the Gnd, +5V, Out, and Tmp contacts. We won't be using the RV contact for this project, so it doesn't matter whether you solder a wire to it. These wires should be at least 5 feet long, since they'll need to stretch from the headset to the Arduino.

For the LED strip, solder wires to the three contacts (Gnd, +5V, and DIN). Note that these strips are directional -- they have a right end and a wrong end to solder the data line to, although you could supply power to either end if you wanted to. So be sure to solder wires to the DIN (data in) and not the DO (data out) side. 

At the opposite end of each wire, solder a breakaway header pin, so that the wires can be inserted into the Arduino. There should be a total of 7 wires, 4 from the wind sensor and 3 from the LED strip.

Mount the Sensor to the Headset

2013-10-09 20.00.07.jpg
Use zipties to secure the wind sensor onto the headset, attaching the wires up to the earpiece. 

Mount the LED Strip Onto the Cup

2013-10-09 19.48.04.jpg
2013-10-09 19.51.49.jpg
Wrap the LED strip around a plastic cup and use clear packing tape to secure it in place. Cover the cup with a white sock; cut to size if necessary. This will diffuse the light from the LEDs.

Load Code

Download the code from https://github.com/biobonnie/YogaBreathalyzer

Also download and install the LED strip library from http://code.google.com/p/fastspi/

Connect the Arduino to your computer with a USB A-to-B cable and load the sketch. 

Connect It All to the Arduino

2013-10-09 19.54.09.jpg
Plug the wires in like this:

Wind sensor:
  • Gnd to Arduino Gnd
  • +5V to Arduino 5V
  • Out to Arduino analog port A0
  • Tmp to Arduino analog port A2

LED strip:
  • Gnd to Arduino Gnd
  • +5V to Arduino 3.3V
  • DIN to Arduino digital pin 6

Power source: 
  • connect the barrel jack to the Arduino and plug the power source into the wall. 

Calibrate the Sensor and Get in Touch With Your Breath

2013-10-09 20.19.35.jpg
Screen Shot 2013-10-09 at 8.16.22 PM.png
Screen Shot 2013-10-09 at 8.16.03 PM.png
When the Arduino sketch first starts up, it will take 10 seconds to calibrate the wind and temperature readings. To make sure the air is completely still during calibration, invert a cup or bowl over the wind sensor and press the Reset button on the Arduino. The LED strip will light up for 10 seconds while the sensor stabilizes, and the sensor will take a calibration reading. When the lights go out on the LED strip, calibration is done and you can remove the cup/bowl from the sensor. 

Put on the headset and position the wind sensor close to your nose and mouth. Sit comfortably and experiment with different styles of breathing. Observe how the lights change -- the lights will fill the strip according to the wind speed, with the color controlled by the temperature of your breath.