Page 1 of 1

ADC sampling noise

Posted: Wed Dec 16, 2020 6:04 pm
by Fabricio_2021
Hi,

I'm trying to read an analog input using analogRead() with a simple circuit (voltage divider),
IMG_20201216_133513.jpg
IMG_20201216_133513.jpg (175.07 KiB) Viewed 3796 times
ADC_test.jpg
ADC_test.jpg (46.21 KiB) Viewed 3796 times
as you see in the screenshot, there are non stable values given by the ESP32, I have read in the documentation that adding a capacitor and multisampling, the values could improve.
Did you have the same problems when use the ADC?

Any suggestion?

Regards,

Fabricio

Re: ADC sampling noise

Posted: Thu Dec 17, 2020 2:45 am
by Aussie Susan
I certainly do have the same issue.
Personally I use multiple sampling - sample 128 samples adding each to a total value and then dividing that by 128.
Susan

Re: ADC sampling noise

Posted: Thu Dec 17, 2020 3:28 am
by ESP_Jan
Hi Fabricio,

the voltage devider just devides the input voltage. So if there is any noise in the input voltage the reading will also contain it.
You can reduce this noise and fluctuations by adding a capacitor across the input voltage.
Also USB power is not entirely clean and without fluctuations.

Please also note you are deviding the 3.3V from the linear regulator.

Hope this information helps,
Jan