top of page

BRight

A wearable computing device that monitors and corrects a person’s breathing pattern.

The Problem:


Breathing properly is a crucial aspect of health. Breathing incorrectly can lead to or exacerbate multiple mental health issues such as anxiety, stress, panic attacks, and anger management. Unfortunately, people are often not even aware when they are breathing incorrectly and even if they do, they aren't sure how to fix it. 

The Solution:


Breathing Right (BRight), is a wearable computing device designed to monitor and correct a person's breathing pattern. It uses the Freescale Freedom board microcontroller which has a 3-axis accelerometer and color-changing LED. The device is placed on the user's abdominal region near the diaphragm where it measures the user's breathing pattern. If the user's inhale time and exhale time do not match, the LED enters breath training mode. In this mode,  the LED gets brighter and brighter indicating the user to breathe in, and then gets dimmer and dimmer indicating the user to breathe out. The training time span for inhaling and exhaling is the same: 3 seconds each. 

The Hardware:

 

The Freescale Freedom Board

The key peripheral components used in the Freescale Freedom board were the inertial sensor (accelerometer) and RGB LED.

                             

                              Freedom Board Layout                                                Freedom Board Block Diagram

 

The Accelerometer
The 3-axis accelerometer/position sensor is the key sensing element in BRight.

Here are the equations used in physics to model position, velocity, and acceleration:

The accelerometer on the Freescale Freedom board detects the acceleration and then the microcontroller does the double integration to determine the actual position. This is what allows the breathing pattern to be detected. 

If the user is breathing properly, the combination of their inhale and exhale waveforms should create a sine wave.

accel_eqns.PNG

The Software:


All software was written in C++ and developed using the online mbed compiler. 

Detecting Incorrect Breathing

In order to detect incorrect breathing, the following logic was used:

1. Start from the data sample at time 0

2. Find the first trough

3. Find the subsequent peak

4. Compute inhalation time

5. Find the next trough

6. Compute exhalation time

7. Compare inhalation and exhalation times

8. Alert if inhalation and exhalation timings vary by 20% or more

9. Alert if inhalation and exhalation times are not 3 seconds each

10. Enter LED training sequence if breathing is incorrect

Computing Inhalation and Exhalation Times

Why Averaging is Crucial

A moving average filter helps manipulate the raw data so that it is easier to analyze. Without averaging the raw data, detecting peaks and troughs of the breathing pattern graph would be both difficult and inaccurate.

                                       

                                                  Raw Data                                                                            Averaged Data 

 

 

 

Data Collection Flow

Raw data is collected by the accelerometer. The moving average filter is applied to the raw data and the averaged data is displayed on the serial terminal. Finally, the graph of the breathing pattern is created. 

Future Improvements:


Drawback of the Accelerometer

It is difficult to position the board in the most efficient way on body. In some test subjects, the sine wave was too faint and almost a horizontal line. This also caused the changes in the z-axis  to be too small for the accelerometer to detect.
 

Using a Capacitive Touch Sensor

By using a capacitive touch sensor (available on the Freescale Freedom board), the difference in abdominal circumference can be measured. In my trials, the circumference between exhaling and inhaling changes from 2mm to 5mm.

Using a Conductive Rubber Band 

As the conductive rubber band is stretched, the resistance increases which causes the voltage to decrease. The conductive rubber band is easy to position and needs to be placed around the abdominal region. As the user inhales, the band stretches and the voltage detected decreases. As the user exhales, the band shrinks and the voltage detected increases. 

 

 

Test Setup to Determine Resistivity of Conductive Rubber Band

The conductive rubber band attachment makes use of a Wheatstone Bridge to measure the unknown resistance of the rubber band. The measurements are more accurate for breathing pattern detection than an accelerometer.

                                          

                                       Sketch of Wheatstone Bridge                         Execution of Wheatstone Bridge

Bright_cond_badn_res_edited.jpg

© 2023 by Achi Mishra

  • LinkedIn
  • Instagram
bottom of page