Iteration 2 - Eric Butler

 For the second iteration of the HRV project, We started to delve more into the micro bit and sensors to conduct readings of both our heart rate and HRV.


Firstly we set up the apparatus which contains the Microbit mounted onto a breadboard to allow extra power to the microbit. This breadboard includes a 3V battery as well as pins to attach things such as the pulse sensor used in this research. A screenshot of the layout can be seen here:


After we had our apparatus set up, it was time to start building the application. Here we forked down a repository as shown here: https://github.com/JanTadeuszEkiel/homelab . In this code we have there's multiple things to note:


 > Our code contains a pace that will have a small square for 4 seconds and then a larger square for 6 seconds so the user has a visual representation of how the heartbeat should be.

 > Our code will monitor the heart rate (PulseDet) as well as the HRV (delta_t) on pin 2 of the breadboard.

 > Adjustments to the if-else statements are required to calibrate both the heart rate and HRV for each individual. below will show 2 examples of what happens when these values are calibrated correctly and incorrectly. 

Right below we can see a picture of the code base which does contain the pacer mentioned above.

                                                    codebase from the Microbit website

correct calibration showing consistent heart rate and HRV

Incorrect calibration only shows an inconsistent heart rate

The incorrect calibration shown above could have been from several factors such as: 
 
  > The 3V battery going low as a result of usage. Between the breadboard and the micro bit it would be recommended to have about a 5v battery for better results so using a 3v battery may deem inconsistent graphs especially when the battery gets low.

  > The Sensor could be faulty, very often an issue could arise on the sensor side where either the light on the sensor, the connection wires, or the pin slots on the sensor could throw the readings off.

  > faults in the USB ports on a laptop. The power and durability of the USB ports on the laptop or PC used to set the Microbit could be either not powerful enough (e.g. using USB type 1 instead of USB 2 or 3) or be damaged which could lead to connection issues and therefore the communication between the sensor and the micro bit software may be hindered.


                                                                        Data Logging

Although not shown working in this iteration, here is a possible concept and example of how we can log the data to a CSV file. This is something I will have to work with more to ensure this method works. To get the data logging columns you needed to go to the extensions section of Microbit and install from there. This does only work on the V2 version according to the website.


Using Microbit without PC


Need to do more research on this but from what I have found operating a micro bit through a phone and downloading the app to run the code. Although this may seem like a good portable idea, I'm still not certain how practical this is


 












Comments

Popular posts from this blog

Blog 2 - HRV Demo

Week 1: HRV Review

Blog 5 - FFT & HRV