Hardware setup: Custom board using BC805M-P (with App protect)
Software: nrf5 SDK S112 v17.0.2 ->Segger V7.30
My Objective:
measure the Li-ion battery voltage(4.2V -100% till 3.6V-0%) through an external resistive divider & internal 0.6v ref voltage. (I'm not worried about the current consumption as of this moment. would like to make this concept work & all the other optimisations shall see later. Regarding optimisations yes I'm aware of this page: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/measuring-lithium-battery-voltage-with-nrf52)
What works so far?
for the moment my example measured voltage value is being transmitted over BLE through the battery service. it's all working well.
But the ADC is just measuring some garbage value (random) which is clearly not correct.
My concept of ADC polling mode is taken from this post & modified for my work. https://devzone.nordicsemi.com/f/nordic-q-a/14486/measuring-the-battery-voltage-with-nrf52832/129422
The ADC result value is clearly not accurately working when I'm just calling the function manually upon a button press. ble_Update_BatteryVoltage();
What am I doing wrong?
Thanks, for any valuable input I'm new to NRF.
Gokunath