I'm currently trying to put together a circuit to measure voltages in the 0-1V range, diagram shown below (apologies for hand-drawing). The voltages are generated by light falling on an LED (which is directly wired to A0 and A1, as shown). Communication and power is handled by a Raspberry Pi.
to test how things are working, I directly connected voltage from a DC power supply to A0 and A1, but got very unexpected results. With the ADC set at 860SPS, I occasionally get the voltage I am putting in (labeled as Vref in the plots below), but there are wild swings in the measured voltage:
Decreasing the SPS reduces the noise purely by averaging, so the measured voltage gets further and further from Vref (here it is as 128SPS):
I am wondering what could be the cause of this kind of behavior? Is it possible the ADC is damaged (for example it got too hot when I was soldering the board)? Or is it some deeper reason, for example there is a floating ground, since neither A0 or A1 are tied to the Pi's ground plane?
Many thanks in advance for any assistance.