Blog 2 - HRV

Blog 2 - HRV 

Daniel Lawton | 20084608                                                                                                  Date: 31/01/2025

The end of Week 1 the IoT Applications class were given the task to learn about how to use a micro:bit to show readings from a HearRate sensor through serial with the micro:bit. 

What was used:

Heart Rate (HRV) Sensor 
Uses simple optical technique PPG to detect the change in blood volume in peripheral circulation.
Meaning the sensor emits an LED light. Some of this light is absorbed, whilst the rest is reflected back, this is then read by the photodiode in the Heart Rate sensor and is used to measure the persons Heart Rate. With this data, the heart rate sensor can analyse the periodic changes in light absorption to determine the heart rate.





   BreadBoard/Power Supply                                                                                 micro:bit
                                                                                                                              






     The code used a forever loop with a variable being set to the analog GPIO pin to read the analogue             data from the heart rate sensor to the convert it to digital to allow for serial to show the data live in the       MicroSoft MakeCode editor. 

Video Demo





Challenges

Originally withe physical setup i had the sensor attached to my finger, however i found getting accuarete pulses (HRV) readings to be difficult, as any movement would be picked up causing the data to become skewed due to interference. I tried to press the sensor harder to my finger in the hopes i would get better readings, and then the opposite lightly pressing the sensor up against my finger both gave less than optimal readings.

So instead, I used the elastic strap attached to the HRV sensor and wrapped it around my wrist pressing the sensor to the inside of my wrist where my heart pulse is the strongest to be picked up. This gave a much more consistent reading. 

The HRV data at first was showing up wrong in serial. 

When Heart Rate Sensor is set to digital input


This was due to the settings on the sensor being set to digital instead of Analogue, once this was corrected, the readings from the Heart Rate Sensor were as expected.

When Heart Rate Sensor is set to Analogue output.

What was learned:

In this week, I got the chance to work with micro:bits and a Heart Rate sensor, with previous experience using the micro:bit, it was nice to jump back using them. Along with getting introduced to a new sensor I have never used before. Looking at these sensors and researching previous examples of others for inspiration. The code I used in the end was based off a combination of this code I found online but was tweaked when I saw other code when In the class on Friday the 31st and that was for the better. The objective was to become familiar with the micro:bit, the heart rate sensor and using serial in Microsoft's MakeCode editor. And this was completed with help from the IoT applications Team, Shane & Andrew in particular.

Overall I got to refresh my knowledge within the world of Analogue to Digital, using Serial Communications to representing the signal on a graph, work with breakout boards and collaborate with others in the class to help advance my understanding of the code that is optimum for the current iteration.

Citations:

[1] Cheriyedath, Susha. (2019, February 27). Photoplethysmography (PPG). News-Medical. Retrieved on February 02, 2025 from https://www.news-medical.net/health/Photoplethysmography-(PPG).aspx.


 

Comments

Popular posts from this blog

Iteration 2 | Jack | HRV Micro:bit Research

Iteration 5.2 | Lock In | Jack

Week 1: HRV Review