[sdiy] Rotary encoders: is there a clever way to handle many?
rick.jansen at xs4all.nl
Mon Aug 10 13:45:33 CEST 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Synth-diy