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.
Lab 2 - Simple Heartrate Sensor Demo For the second lab, our task was to explore the capabilities of the Micro-Bit platform by connecting an external sensor to the microcontroller through its' GPIO pins. Readings were aquired through a simple serial read script created in Microsoft Makecode. In this case, the external sensor measures heart rate / pulse by shining a bright green LED light into skin tissue and measuring the light reflected back. As the heart circulates blood around the body, a small variation in pressure occurs within blood vessels, arteries and capillaries. This pressure variation can absorb more or less light at various stages of the heartbeat and is the primary mechanism of the HRV sensor. By detecting fluctuations in light reflected back from the body, it is possible to get an acurate reading on our heartbeat. A similar mechanism of measuring bloodflow is used in other 'smart' technology such as smart watches, fitness bracelets and even in professional me...
What is it? Heart rate variability (HRV) is the measure of the variation between heartbeats. It is controlled by your autonomic nervous system (ANS). This system operates automatically and regulate process such as the heart rate and other bodily functions that are are not under conscious control. This system is broken into two branches the flight or fight (which preparing the body for action and stress) and the rest + digest (which promotes relaxation + recovery). HRV is influenced by the ability to smoothly shift between these two branches. High HRV: Larger difference between successive heartbeats - Indicates a more flexible and adaptable autonomic nervous system. Low HRV: Smaller differences between successive heartbeats - Indicates a less flexible autonomic nervous system. ...
Lock In day 1 Briefing We started the day with by getting the project briefing on what the end result should be. We decided to make a system where we could read in heart rates using a Microbit and then send that via the cloud to a website that would display real time data from the heart sensor. Kanban planning Once everyone had a clear understanding of the briefing , we began defining a KanBan chart so that we could organise and allocate tasks. This consisted of Backlog, Doing, Done, Testing and Complete columns where we could quickly move tasks into different columns as they are completed. Group allocation We began breaking down the steps required to complete this pipeline. This consisted of many different areas such as creating the cloud infrastructure on AWS, reading data on a micro bit and radio sending it to a raspberry pi so that it could be sent to the cloud infrastructure, creating a u...
Comments
Post a Comment