InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.76k stars 944 forks source link

Measure and display heart rate variability (HRV) #1412

Closed khimaros closed 1 year ago

khimaros commented 2 years ago

Verification

Pitch us your idea!

heart rate variability (HRV) measures the dynamic range of your heart

Description

according to https://my.clevelandclinic.org/health/symptoms/21773-heart-rate-variability-hrv

"If your heart rate is highly variable, this is usually evidence that your body can adapt to many kinds of changes. People with high heart rate variability are usually less stressed and happier."

"In general, low heart rate variability is considered a sign of current or future health problems because it shows your body is less resilient and struggles to handle changing situations."

minacode commented 2 years ago

Sounds interesting but the article you provided says

Outside of a medical setting, there are several devices commonly used by athletes, especially runners. These often consist of a device attached to a band that wraps around your chest. Some look like pulse oximeters (devices that attach to a finger and measure your pulse and blood oxygen level) but are more sensitive and accurate.

and

The majority of wrist-worn fitness devices and trackers track your heart rate through your skin. Unfortunately, this means they usually aren't sensitive enough to detect heart rate variability accurately.

Feel free to try. But given that I am not sure if we would be able to extract reliable data.

khimaros commented 2 years ago

it looks like @Pittconnect made some degree of progress doing HRV analysis with wasp-os and HeartPy: https://github.com/daniel-thompson/wasp-os/issues/273#issuecomment-1002804919 -- here's a video of their attempt: https://www.youtube.com/watch?v=FsX2-1JJF6o

here's a notebook exploring heart rate data from a smart watch with HeartPy: https://github.com/paulvangentcom/heartrate_analysis_python/blob/master/examples/3_smartwatch_data/Analysing_Smartwatch_Data.ipynb

in the example above rmssd is the measure of heart rate variability.

there is some additional detail about HRV and its health implications here: https://support.ouraring.com/hc/en-us/articles/360025441974-An-Introduction-to-Heart-Rate-Variability

i think my first step will be getting a few minutes of raw PPG data from the watch and do a bit of offline analysis to see if the signal is clean enough to be useful.

minacode commented 2 years ago

This sounds way more promising!

i think my first step will be getting a few minutes of raw PPG data from the watch and do a bit of offline analysis to see if the signal is clean enough to be useful.

Good luck! Would be nice if you succeed.