[sdiy] Digital filtering of pot input

Vladimir Pantelic vladoman at gmail.com
Fri Dec 2 14:36:13 CET 2016

I know one F4 user that solves this by having a slow and a fast filter,
when the pot value is almost constant, he uses the slow filter, then
when he detects "movement", he switches to the fast one that averages less.

On 02.12.2016 13:51, Matthias Puech wrote:
> Hi DIYists,
> I have a potentially simple question on filtering. I get my pot
> reading from a very noisy ADC (on-board STM32F4), but I absolutely
> need the value to be constant when I'm not touching the pot. It's ok
> for it to be a bit wobbly while I am turning the pot. Now I'm using
> hysteresis:
> if (fabs(reading - output) < 0.01) output = reading;
> which gives me a stable value when I'm not turning the pot, but I am
> annoyed by the staircase effect while I'm turning it. Is there a
> simple filter that will let signal through when there is consistent
> movement but hold it when not?
> Thanks in advance, -m 
> _______________________________________________ Synth-diy mailing
> list Synth-diy at synth-diy.org 
> http://synth-diy.org/mailman/listinfo/synth-diy

More information about the Synth-diy mailing list