This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to measure battery voltage (4.2V-3.0V) without external resistors on nRF52840?

SAADC can't measure input voltage higher than VDD voltage.
External battery (18650) voltage is higher than on-board VDD.
There is very good article on your site explaining how to make this measurement possible.
But it requires external resistors and (optionally) capacitor.

As I can see, battery voltage is available in nRF52840 on the pin VDDH.
And there is new feature implemented in nRF52840's SAADC - internal analog input VDDHDIV5.
See: nRF5_SDK_15.2.0_9412b96, file nrf5-sdk/modules/nrfx/mdk/nrf52840_bitfields.h:11938.
This means that theoretically we can avoid using external resistors (?)
But there is an Errata notice #160 - VDDHDIV5 is not functional.

So, I have 3 questions on this topic
Q1:
Is VDDHDIV5 usable or not?
Q2:
Can I use SAADC gain 1/2 on input VDDHDIV5, since voltage 4.2V / 5 = 0.84V is higher than internal reference 0.6V?
Q3:
...see subj.

Thanks in advance

Related