Hi
I'm attempting to read a PT-100 sensor value that is part of a voltage divider using a nRF52.
Both the reference resistor and the PT-100 is sampled while the voltage divider isn't connected to Vcc and while it is (using a PMOS transistor).
The Off value is subtraced from the ON value (an attempt to null out the offset). The difference between the two resulting signals is then used to compute the resistance of the unknown PT-100 (should reduce gain errors).
Basically this setup works and I'm capable of reading the PT-100, I have however discovered a small but noticeable drift in the readings if I modulate the supply voltage.
The error looks like a change in the gain that is slightly different for the two pairs of MUX combinations used in the measurements.
As part of debugging the issue I have tried to measure the internal Vcc/2 with respect to Vcc using the following ADC configuration:
nrf_saadc_channel_config_t channel0Config_ = {
.resistor_p = NRF_SAADC_RESISTOR_DISABLED,
.resistor_n = SAADC_CH_CONFIG_RESP_VDD1_2,
.gain = NRF_SAADC_GAIN1_4,
.reference = NRF_SAADC_REFERENCE_VDD4,
.acq_time = NRF_SAADC_ACQTIME_40US,
.mode = NRF_SAADC_MODE_DIFFERENTIAL,
.pin_p = SAADC_CH_PSELP_PSELP_VDD,
.pin_n = NRF_SAADC_INPUT_DISABLED
};
If I run the nRF52 @ 2V then increase the voltage to 3V I get the following values from the ADC:
As it can be seen the values does drop a number of LSBs.
I should be noted that I haven't observed any significant change in the offset values.
My questions are:
A) Is the ADC gain error a function of the supply voltage?
B) Should I expect that the gain error is the same for different MUX selections or does the MUX selection potentially introduce gain errors as well?
My own guess would be:
A) Maybe the leak current variations as function of the voltage across the sample and hold capacitor may explain the drop in the values returned by the ADC
Kind Regards Visti Andresen