Page 1 of 1

Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 04:40
by whatsupskip
I have some idea what this doing, but I can't find any documentation as to what it is actually doing. Would someone please point me in the right direction?

Re: Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 05:53
by grovkillen
Can you explain this more? I'm not following you.

Re: Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 06:10
by whatsupskip
Oversampling typically means taking two or more samples and then determining the average or mean value of these.

I am just wondering how many samples and how quickly that are taken. I assume there must also be a processing time penalty involved.

Re: Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 06:46
by grovkillen
https://github.com/letscontrolit/ESPEas ... 02_ADC.ino

There's the source code. Haven't had the time to study it myself.

Re: Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 10:41
by arion_p
According to the code linked, samples are taken every 100ms (roughly).It will use as many samples as fit within the configured delay.

As far as I can tell, if deep sleep is enabled it will only take one sample

Re: Analog input - internal "Oversampling"

Posted: 08 Mar 2018, 22:48
by whatsupskip
arion_p wrote:
08 Mar 2018, 10:41
According to the code linked, samples are taken every 100ms (roughly).It will use as many samples as fit within the configured delay.

As far as I can tell, if deep sleep is enabled it will only take one sample
Thank you. Very useful information, particularly regarding deep sleep enabled.

Re: Analog input - internal "Oversampling"

Posted: 09 Mar 2018, 09:30
by arion_p
Actually the deep sleep information may not be relevant anymore. There has been a change to deep sleep handling yesterday. I am not really sure how/if oversampling is affected by it.