During the Friday class the team looked at an open source code base for measuring HRV using a Micro: bit and a pulse sensor.
The serial plotter on the Micro: bit while running this code shows the different measurements being taken and calculated from the sensor.
The most important of these measurements seemed to be HRV and the pulse detection.
As you breath out you can see the HRV value moving downwards as you exhale and increase as you inhale.
Bio-Feedback
Biofeedback can be done in many different ways for this project but over the last week this is what i have some up with:
Use of the Micro: bits LED matrix
This can be achieved by mapping the analog input of the Pulse sensor and mapping the analog values
0-1023 to 0-4 with respect to the locations of the LED matrix.
With this new function we can choose what LED column we want to move up/down according to the users pulse/HRV levels.
Use of external LCD display
Another means of taking HRV measurement could be by using an LCD display and connecting it to the Micro: bit via the I2C protocol,
This is a 4-Wire protocol which takes VCC, GND, SDA(serial data line) and SCL(serial clock line) pins.
For power we use a 5V supply for the LCD and use pin 20(SDA) and pin 19(SCL) on the Micro: bit in order for it to communicate.
Once this connection has been established an LCD extension can be installed via the makecode website and it can be initialized with as little as 2-3 lines of code:
Components required for this method:
5v Power supply
Using Products for Bio-Feedback:
Bluetooth/Wired water speakers for displaying highs and lows of HRV
This water speaker could work as a visual to what we see on the serial plotter when taking HRV measurements.
The lights on these speakers could also be adjusted, allowing us to map HRV readings to specific colors like Green for good breathing and Red is a person was breathing too quickly.
Breathing Pacer:
Mounting a servo motor to a hand fan to simulate breathing patterns as a "pacer"
For this example a servo motor could be mounted to one end of the fan and move up and down at a certain speed to guide the user on how they should be breathing.
The fan expanding could indicate a deep breath inwards and the fan contracting could be a breath outwards.
I think this would be a good example for a pacer because it could also show the user how long they should hold their breath by the fan remaining static.
Micro: bit code for this pacer could be as simple as having a separate Micro: bit attached to a servo motor.
Another way you could do Bio-Feedback using this type of fan would be to map the pulse or BPM of the user to the position of the servo motor. This could be then clocked like a speedometer by setting up a dial with numbers behind the fan.
Total current consumption(TCC) = 14mA * (0.001 A / 1mA) = 0.014A
Then to calculate battery life we divide Battery capacity by the total current consumption:
Battery life = 0.5 Ah / 0.014 A ≈ 35.71 hours
Bear in mind this is a theoretical calculation and does not account for current consumed on other parts of the system.
In order to get a accurate Battery life time an experiment can be done using the Microbit HRV system and a Multi meter where measurements of current being supplied to the system can be measured over a period of time and recorded on something like an excel sheet where a visual graph of battery life can be created from the data collected.
Comments
Post a Comment