I'm using a NRF52832. I'm looking to measure the battery voltage. I'm using 2XAAA cells in serie (voltage range between 2V and 3V).
Below is the configuration to measure the voltage (To simplify the example, I have voluntarily removed protections on the battery connection).
Regarding the internal characteristics of the ADC on NRF52, what is the best value for R6 and C6 to avoid any issue with acquisition time / impedance ...? Could you confirm that the leakage would be very low (input impedance >1M Ohms on the ADC input)?
EDIT : In my real use case, the NRF is not directly powered by the batteries but by a boost circuit (3V).
I assume you are actually powering the nRF with the 2xAAA batteries, if so there is no reason to provide an external connection to the batteries. You can configure the SAADC to measure the nRF VDD via its register settings. It has internal hardware connections to VDD to facilitate this.
Thank you for your reply.
I have over simplified my example regarding the real schematic. In my case, the nRF is powered by a boost circuit (3V) so I need hardware to do the battery voltage measurement.
Here is the bit from the spec on reference selection and input voltage range:
37.8 ReferenceThe ADC can use two different references, controlled in the REFSEL field of the CH[n].CONFIG register.These are:• Internal reference• VDD as referenceThe internal reference results in an input range of ±0.6 V on the ADC core. VDD as reference results in aninput range of ±VDD/4 on the ADC core. The gain block can be used to change the effective input range ofthe ADC.Input range = (+- 0.6 V or +-VDD/4)/GainFor example, choosing VDD as reference, single ended input (grounded negative input), and a gain of 1/4the input range will be:Input range = (VDD/4)/(1/4) = VDDWith internal reference, single ended input (grounded negative input), and a gain of 1/6 the input range willbe:Input range = (0.6 V)/(1/6) = 3.6 VThe AIN0-AIN7 inputs cannot exceed VDD, or be lower than VSS.