Software apps and online services
Hand tools and fabrication machines
Deep breathing is a powerful technique to deal with stress and anxiety. Deep breathing exercise can alleviate these symptoms by allowing more air into the lung, calms the nervous system and restores heartbeat to regular rhythm.
Relaxation Deep Breathing Exercise Guide/Tracker may help with post Covid-19 infection recovery for patients with damaged lung. By performing lung exercise, patients can gradually restore full lung capacity.
The device consists of two parts :-
- Air breathing mouthpiece
- Controller box
The mouthpiece is basically a flow sensor for breathing air in & out. The controller box consists of a microcontroller development board and a display which will guide and inform user about the exercise session.
For visual indication there is an e-paper display which will provide :-
- Breathing exercise guidance messages to the user
- Breath tracking and counting information
In addition to the display there is the RGB LED that will change color :-
- Before breathing in
- While breathing in
- Holding breath
- Before breathing out
- While breathing out
- Exercise session completed
There is also a buzzer that will beep after each breathe in-hold-out cycle.
Here is a demo showing how it works :-
The solution is made with the following hardware :-
- TIVA tm4c123 development board: This microcontroller board is used to build this prototype
- 1.54 inch epaper display: Show user breathing exercise instructions, breath counts, session completion information
- Onboard RGB LED: This RGB LED quickly shows user the breathing in, breath holding, breathing out queue
- Flow Sensor: Senses air flow during breathing in and out
- Buzzer: Beeps after each breathing cycle
- Red Plastic Box: Enclosure for the project
- Green Tape: Masking the device
I put the Tiva microcontroller development board inside a red plastic box, made a cut for the display and attached it with hot glue and green tape. I have also used a small piece of hot glue stick as a light pipe to transmit light from the RGB LED on Tiva development board. The flow sensor is connected to the development board with long female-female jumper wires. The device is powered from a 5V power bank but 3 AA battery will work too.
All the connections are made according to this schematic :-
The code is written in C on Energia IDE which supports standard Arduino APIs/functions. In addition to that, it supports Tiva APIs for the microcontroller peripherals. Anyone familiar with Arduino ecosystem & C programming will understand the code. I have heavily commented the code for ease of understanding.
Following resources can be useful to understand the APIs/functions in details :-
What's happening in the firmware ?
tm4c123 microcontroller drives the epaper display with SPI interface and shows some intro message and logo after power up.
Next, the display shows message to user to breathe in through the mouthpiece and the blue LED keeps blinking. When the user breathes air through the mouthpieces (flow sensor), it generates pulses which is sensed with falling edge interrupts on a GPIO pin of the microcontroller. The blue LED glows solid during the breath in time. When user stops breathing in, the interrupts also stop, blue LED turns RED, display shows user to hold breath for about 4 seconds. After that, RED LED goes off and the green LED starts blinking. The display will change the message again and tell user to breathe out, which is again sensed with pulses generated by the flow sensor, during this time green LED stays solid. Once the interrupt stops, breath counter is incremented, total number of breaths saved on eeprom.
This whole program loops until user has completed a given number of breaths, then the display shows used that the exercise is complete.Conclusion
Breathing exercise tracker is a device to aid/guide someone who wishes to complete consistent deep breathing sessions regularly. It's a motivational tool to help people restoring lung capacity when they are not feeling energetic after recovering from Covid-19 infection. It will help patients to relax, restore energy and balance.
Of course, you don't need a breathing exercise tracker to do breathing exercise, just like you don't need a step counter to walk/run.
But, it helps achieving goals with breathing exercise sessions.