HRV - Heart Rate Variability

Posted on
  • long shot - has anybody attempted getting HRV from the Bangle.JS taking in the analogue values? If not I'll give it a stab but would be handy if I can get a head start. This kind of thing can usually be quite data intensive, particularly for optical sensors so would probably push this device. HRV data opens the door to a vast array of possibilities and applications. Cheers

  • Hi,

    I've had one or two people ask about it, and it should be relatively easy from the raw data array you get in the HRM event.

    The big problem is really detecting when you have a bad HRM signal (eg when you're moving your arm/wrist a lot) and discounting it.

    If you get something that works well I'd be really interested to see it - it might be something we could pull into the firmware itself.

  • @Gordon Hi, I think the arm/wrist movement thing isn't too big of a deal because users should be sitting still ideally when taking these measurements. I've put together an app and it does mitigate some of that issue by just checking the pulse gaps aren't too wild, if it is it just drops the element.

    I've added a post in the Projects forum for this as I think the project could be relevant to Espruino aside from the Bangle.js and more details in the Github repo.­357885/newest/

    Do you know what the sample rate is for that raw data array? I've calculated a couple of different ways but good if someone knows exactly what it is incase I'm slightly off.

  • That's great - thanks for posting it up!

    Do you know what the sample rate is for that raw data array?

    I just checked, and it's 50Hz.

    Just a note about this though - Espruino includes the raw data array that HRM values are reported into, and they actually continue to be added to the same array - so if you're a little slow processing the array you'll find that the values at the beginning start to change!

    If you're doing a lot of processing it could be worth copying the HRM data to a new array first:

    var hrmData = new Int8Array();
    Bangle.on('HRM', function(hrm) {
      // now work with hrmData
  • I 've heard before about the movement and the strap being the source of the bad HR measures.
    Is this issue common to the smartwatch F18 with its stock software?

  • Is this issue common to the smartwatch F18 with its stock software?

    I believe so, yes. If you look at the HRM app you'll see the raw data that comes off the device. Honestly it's hard to see how you could get anything useful out of the data the sensor produces if you're moving your arm around a lot.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

HRV - Heart Rate Variability

Posted by Avatar for BenJabituya @BenJabituya