is it normal for the sensor to be affected by movement?
In Bangle.js, it is. As a bit of background:
Generally fitness trackers use a green LED and work out the amount of light that's transmitted through the skin. If the tracker loses contact with the skin or presses less hard, it means more light gets through and the reading is knocked off.
Most heart rate monitors tend to use a digital system where the sensor has a digital connection to the microcontroller and outputs a series of numbers with a high dynamic range. Filtering can then be applied on the data that is received. The heart rate sensor will be affected by movement, but algorithms will attempt to filter it out to some extent.
Bangle.js has an analog op-amp connected to the photodiode, and it self-calibrates (basically a capacitor+resistor) then sends an analog signal with less dynamic range to Bangle.js. The problem is that when there's a big swing in the light levels it knocks off the calibration, and the data Bangle.js receives is then wrong.
Because Bangle.js isn't receiving the full dynamic range, there's nothing that can be done in software to get the heart rate signal - it's just not there.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
In Bangle.js, it is. As a bit of background:
Generally fitness trackers use a green LED and work out the amount of light that's transmitted through the skin. If the tracker loses contact with the skin or presses less hard, it means more light gets through and the reading is knocked off.
Most heart rate monitors tend to use a digital system where the sensor has a digital connection to the microcontroller and outputs a series of numbers with a high dynamic range. Filtering can then be applied on the data that is received. The heart rate sensor will be affected by movement, but algorithms will attempt to filter it out to some extent.
Bangle.js has an analog op-amp connected to the photodiode, and it self-calibrates (basically a capacitor+resistor) then sends an analog signal with less dynamic range to Bangle.js. The problem is that when there's a big swing in the light levels it knocks off the calibration, and the data Bangle.js receives is then wrong.
Because Bangle.js isn't receiving the full dynamic range, there's nothing that can be done in software to get the heart rate signal - it's just not there.