NRF5 SDK v17.0.1
Custom board
Hi,
I'm trying to take ADC measurements for a device which is powered by battery. The ADC input is fixed and should stay relatively constant with respect to the battery level. I'm currently using the internal 0.6 V reference to first measure the battery level, with a gain factor of 1/5 since the battery is 3 V. After acquiring the battery level, AIN4 is measured using VDD/4 as reference, with a gain of 1/4. I'm expecting the ADC measurement to be constant, yet I'm having cases where the value will begin to change with no apparent change in VDD. Additionally, I've observed drastic changes in the ADC measurement after reseating the battery and/or AIN4 input.
The measurements are done using 16x oversample with burst mode enabled, though I've tried disabling those to no avail. Calibration is normally performed on power-on, as well as in response to a 1.5°C change in temperature. Upon completing the ADC measurements, SAADC is aborted, uninitialized, and errata 241 is handled; then the ADC is reinitialized upon next wake up.
What can I do to get more accurate ADC measurements and avoid large jumps upon reseating the battery and/or AIN4 input?
Here are some examples illustrating the issue.
The strange part is that on some other devices I'm testing, everything appears to be extremely accurate.