I am using the RPI3+expander Pi ADC to read 2 analog voltage coming from another RPI3+expander Pi DAC used as a simulator. To make sure that the analog signal is smooth I have a RC filter (470ohm + 22µF) on each line. All is written in Python3.7
In most conditions I have a stable readout of the voltage with
adc = ExpanderPi.ADC()
VB = adc.read_adc_voltage(1,0)
VT = adc.read_adc_voltage(2,0)
But in part off the program I call VB and VT is succession to time stamp the values and evolution (it is a pseudo real time controller) and I get for example
VB=0.405V which is OK but next readout 4ms later gives: VB = 0.283V which is wrong . 4ms later another sample readout gives 0.438V again OK followed 4ms later by 0.318V wrong again!
Statitsics shows about 110 to 120mV difference between successive reading.
Any hint at what could cause such behaviour?
Regards, Robert A.L.