[sdiy] Rotary encoders: is there a clever way to handle many?

Roman Sowa modular at go2.pl
Mon Aug 10 14:51:16 CEST 2015


I deal with debouncing with simple RC filter. It shifted the solution 
from unusability to reliability. It is especially important with 
encoders having 2 detents per pulse, where each edge matters.
And no iterrupts, just polling, among other stuff the micro was doing.

Roman

W dniu 2015-08-10 o 13:45, Rick Jansen pisze:
> Well, that was fun, or was it. Handling a rotary encoder with an Arduino
> can be done, but there's a lot to take care of! The signals from my
> (simple) €1,50 encoder bounce all over the place. My current
> implementation uses one of the two interrupt pins of the Arduino,
> although a polling solution is possible as well. I'm not sure if it is
> because of the "quality" of this encoder, but at times there are nearly
> as many pulses clockwise as anti-clockwise..  I ended up counting both
> clockwise and anti-clockwise pulses, the greater of which determines
> actual direction. Even an "acceleration" is detected, if you turn the
> rotary fast the value will change more dramatically.
>
> It works quite well, but at the same time I wonder how other machines
> work, that track 8 or 16 rotary encoders.. An Arduino Mega has many more
> interrupt pins than the measly Arduino Uno, but still. Is there a clever
> trick to track many rotary encoders that I am missing?
>
> rick
>
>
>
> _______________________________________________
> 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