Heart Unit with Core 2 - any suggestions?



  • I just received 2 new Heart Units and have tested them using UiFlow & the supplied test code or slightly modified versions of the test code. Both of the units read the heart rate at about 2x the actual rate or sometimes randomly. The SpO2 readings are close when compared to a medical grade Pulse Oximeter. Experimenting with the LED current settings sometimes makes the units work properly, but it is very intermittent & will not repeat with a core restart. Experimenting with the timing delays produces similar results.

    I connected a logic analyzer - data pulses seem to agree with the delays specified in the code.

    Has anyone figured out how to improve the results with these Heart Unit devices? Is it possible the Core 2 can't supply enough current to the Heart Unit?



  • @earla constant pressure on the sensor to the finger is key. Make some tight elastic restraint and don't move a muscle during testing!
    If you can port your serial to a serial monitor or plotter, it will be very elucidating!



  • The Issue with the heart monitors is that they need to be placed in specific positions on the body and in a specific way or you will get incorrect reading from them.
    They may also not be accurate from the start and may need to be calibrated for use.

    I published a project here https://www.hackster.io/AJB2K3/wrist-mounted-heart-monitor-cefbb0 where I used a watch strap to put pressure on the sensor against the wrist but still had odd readings. the best I have found is to use a fingertip clamp but can't find the 3d printable model I used in an experiment.



  • @teastain Yes! Binding it to my finger makes it work properly! Thank you!

    Seeing the module code M5Stack is using would certainly help, but I don't know how to do this of if it is even possible.



  • @ajb2k3 Yes - I am making progress - working on the calibration against a medical grade device. Thank you!



  • PPG is pretty finicky and the signal more often than not requires cleanup by software algorithms. Double readings are not uncommon and appear even in medical grade sensors. Most sensors used nowadays have multiple emittors or a single emittor with multiple sensors. The "evaluation sensor" with one led and one sensor used for this device will indeed require very precise and stable placement. Even so i'd recommend trying to get the raw signal out of the sensor if possible at 24-40hz (24 and 40hz are commonly used for PPG processing algorithms and usually a good place to start from). working with and visualising the raw signals will give you a much better insight of what you're measuring.

    Current supplyed by the Core2 is not gona be a limiting factor in this. Noise of the voltage convertor could cause issues, but this can only be checked if the raw signal is analysed. Often sensors make use of motion sensors to discard readings during detected motion.



  • @basgoossen Thank you for this excellent information.



  • This sensor is surprisingly difficult to use but I still learned a lot. As suggested, I took a look at the raw data from the sensor using an M5Stack Arduino program. Although you can see the pulse data, it is very unstable, noisy and has a varying offset. Here is a very good description of what it takes to make the MAX30100 work.
    https://morf.lv/implementing-pulse-oximeter-using-max30100 In addition to what the article says, the two Heart sensors I have behave differently and would require individual calibrations.