ADC noise on stm32f401
I've been messing around with a LMT86 temperature sensor
This sensor is deemed high output impedance as the documented loads it drives is 50uA.
ADC noise on STM32 isn't 'new'. Just that for a first time I'm observing such volatility up close. The problem is mere millivolts differences means a different temperature reading from the sensor, and accordingly there is already a sort of 'amplification' from the sensor itself.
Threads found from a Google search are like such.
https://embdev.net/topic/stm32f0-adc-input-noise-investigations
https://itectec.com/electrical/electronic-stm32-adc-noise-2/
https://www.eevblog.com/forum/microcontrollers/stm32-adc-noise/
It is explored in a thread discussing the temperature sensor here:
https://forum.allaboutcircuits.com/threads/lmt86-2-2v-temperature-sensor.181850/
Among the discussions is that given this is a high impedance source, an Op-Amp is needed to buffer inputs to the ADC.
So next I strapped up an LMV358 Op-Amp as a buffer and here are the observations. This is with the Op-Amp
common parameters for charts below: adc clock 84 mhz / 4 ~ 21 mhz, 84 clocks sample time
2000 samples, 10 samples/s, measuring room temperature about 30.5-31 deg C
count 2000.000000
mean 30.882000
std 6.782125
min -213.360000
median 30.960000
max 57.800000
No, temperature did not accidentally drop to near absolute zero. It is room temperature all the while during measurement, a multimeter did not change a single millivolt while variances are recorded by the ADC.
Next, I set up a filter to remove all values outside +/- 2 deg C from the median, 555 outlier values removed.
count 1445.000000
mean 30.973156
std 0.733296
min 29.030000
median 30.890000
max 32.950000
Next remove that Op Amp and connect the sensor LMT86 directly to the ADC (on stm32f401)
2000 samples, 10 samples/s, measuring room temperature about 30.5-31 deg C
count 2000.000000
mean 30.930100
std 4.062343
min 3.670000
median 30.810000
max 59.260000
Next, I set up a filter to remove all values outside +/- 2 deg C from the median, 500 outlier values removed.
count 1500.000000
mean 30.817787
std 0.698166
min 28.810000
median 30.810000
max 32.800000
It is a dilemma kind of. The Op-Amp probably reduce the impedance (significantly?), but that the errors/variance are about the same !
What is more concerning is the large outlier values as those are observed in the unfiltered input. This didn't seem to go away when the OpAmp is placed as a buffer between the sensor to stm32f401.

