Avatar for user107850

user107850

Member since Jan 2020 • Last active Jan 2024
  • 3 conversations
  • 28 comments

Most recent activity

  • in Bangle.js
    Avatar for user107850

    Hello all,

    very interesting developments here!
    I have been trying the new algorithms myself too. I had the Heart Rate Monitor app on the Bangls JS (version 2 bought from Kickstarter campaign, FW 2v19), and another smartwatch plus a PPG from the samrtphone on the other arm. I have noticed some differences, especially at lower HRs, but couldn't do this very systematically. I am planning to do some more tests with a bluetooth Polar ECG belt in the coming days and will report back.

    I have read in this thread that the manufacturer's library also supports SPO2 and Blood Pressure. It would be extremely interesting to receive these 2 as well. I do not trust BP at all, but SPO2 is doable and has been proven reliable on other devices (for example Withings). Is there any plan to support these? And /or to allow collecting PPG from the 2 LEDs (my understanding is that there is a green LED and an Infrared LED)?

    Thanks!

  • in Bangle.js
    Avatar for user107850

    For developing a good algorithm we would need the following:

    1. raw PPG signal (as it comes from the driver)
    2. acceleration signal (useful for trying out motion artefacts cancellation)
    3. reference HR

    looks like we can get all of them with the apps we have?

  • in Bangle.js
    Avatar for user107850

    Hi all,

    linking to this other thread, I had setup a repo for testing algorithms on Bangle JS. We currently have algos for step counting but it would make sense to add HR as well.

    I have some student working on HR from PPG on mobile phones, but, if time allows, would like also to contribute to BangleJS.

    The first thing to do would be to collect raw PPG data, as it comes to the algorithm, with a reference HR from another, trusted, sensor.

    Once we are happy with the HR, it would be also cool to see if we can extract other parameters, such as respiration rate, but that would probably come later...

  • in Bangle.js
    Avatar for user107850

    thanks for the explanation, now it's more or less clear.

    As for testing, I have created a repo for testing the algos of BangleJS. Currently it contains only the step counter, but we could happily add also the heart rate. The idea is to upload some test data with reference (maybe coming from another commercial sensor) and benchmark different algorithms.

  • in Bangle.js
    Avatar for user107850

    Hi,

    I have some students developing an algorithm to detect HR from raw PPG. We are trying to make the algorithm somewhat hardware indipendent, so the outcome could be applicable to Bangle as well (if good enough!). But first I wanted to understand how the current implementation works.

    I know you used to compute autocorrelation at some point, but the current algorithm seems more like a peak detector? As the code is not greatly commented, can anybody (Gordon?) explain a little what is the idea behind?

    Thanks a lot,
    Dario

  • in Bangle.js
    Avatar for user107850

    I forget how little portable C is!
    OK, I have renamed time_t to sc_time_t so it doesn't conflict with linux time_t. Try pulling.

    Need some 1 hour logs for sleep, driving, working, sitting watching TV - all ZERO step logs.

    Yes, but let's not forget collecting steps data under different circumstances (slow walk, fast walk, running, etc).

    It would be nice if we could involve other users, just to confirm that there are no major differences across devices.

  • in Bangle.js
    Avatar for user107850

    Hi @fanoush, I have followed your work closely in the past. I can see that this is a collaboration among the best experts in reverse engineering watches there are around 😀!

    As far as I understand what you are saying, the driver is just an implementation of the I2C protocol, and you have reverse-engineered it. Quite an achievement without a datasheet.

    As for the higher level library, the reason why you do not want to use it is because it's not open sourced?

    In any case, the fact that it requires acceleration is an indication that it makes use of it to probably discard data that is corrupted by movement. We could probably record some raw signals, including acceleration and PPG and put them in a repository for benchmarking different versions of algorithms. We would also need a reference heart rate for that, which we can obtain from another device, like a Polar or similar. Then we could invite people to test their best algorithms in some sort of competition...

    I am working on an HR detection algorithm with students, but using the PPG from a smartphone. As the problem is similar, I may try to include data from the BangleJS as well. I'll keep you informed.

  • in Bangle.js
    Avatar for user107850

    Hello, I have added the espruino step counter as well (with minor changes in names). Looks like it has better accuracy than the Oxford one, especially in absence of movement. Well done!

    We could use this repository to try to improve the algos with further tweaking. Pull requests are very welcome.

  • in Bangle.js
    Avatar for user107850

    Hi,
    sorry there were a few bugs, I should have fixed them now, please pull. I have also run some more benchmarks with your new data and tuned the movement detection stage a bit.

    It would be useful to keep the same file names so that provenance of the logs can be tracked.

    Yes, good idea! The only requirement is that the first characters correspond to what we consider the "ground truth".

    The Accelerometer logs below are all ZERO steps and should be part of the controlled test data in my view.

    Yes, if you are sure about the fact that you did not do any step.

    These and similar logs must form at least 50% of the test data in any test harness.

    The more data we have the better. Actually we should also include running and walking in different conditions, like on soft floor, hard floor, with and without shoes etc.

    No algorithm is going to be perfect, some may be more precise when walking, others when not. In the end it depends on the use case: runners may prefer better accuracy when running, others may prefer better accuracy when walking etc.

    As a general aim I think we should try to have something as good as an average fitness tracker.

Actions