How to calculate the voltage and battery percentage of nrf9160, such as 4.2V, 3.0V, 3.3V, etc
thank you very much!
How to calculate the voltage and battery percentage of nrf9160, such as 4.2V, 3.0V, 3.3V, etc
thank you very much!
Hi,
The range of SAADC is up to 3.6V (0.6V ref, 1/6 gain), provided that VDD_IO is 3.3V.
The input range has to be within VDD_IO + 0.3V.
Since you have a voltage higher than VDD_IO, you have to use an external voltage divider (two resistors) to get it within VDD_IO+0.3V.
There's an older adc example here, but it might need some porting if you're on ncs v1.3.0:
https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/adc/src/main.c
Kind regards,
Håkon