[sdiy] Rotary encoder response

Eric Brombaugh ebrombaugh1 at cox.net
Sun Nov 20 20:25:15 CET 2011


I looked at this a while back. The main problem appears to be hard 
thresholds and sudden changes in increment - very unintuitive and hence 
not compatible with our manual reflexes. The problem is analogous to 
that found in GUI pointer acceleration and for that application it 
appears that continuous functions are most desirable. Here's one 
in-depth analysis of that problem that I found:

http://www.x.org/wiki/Development/Documentation/PointerAcceleration

It gets complicated in a hurry - almost like kalman filtering used in 
navigation...

I ended up going with an encoder that had a pushbutton integrated - push 
down for larger increments. When it's a conscious decision by the user 
then it's easier to control.

Eric

On 11/20/2011 12:09 PM, Tom Wiltshire wrote:
> Hi all,
>
> I've done some experiments using rotary encoders to set the value of a large variable - say 12-bit, 0-4095. This is not as easy as it sounds, since a typical rotary encoder only has 24 pulses for one full rotation, so if you increment the value each pulse, you finish up having to turn the knob nearly two hundred times tot get from one end of the scale to the other. Which is obviously not ideal. So...
>
> Instead, I tried using an increment based on the speed of rotation. It's easy enough to measure the time between pulses, which gives a measure of how fast the encoder knob is being turned. This time value is then turned into the required increment value, either by calculation or a lookup table. I'd hoped that like this I could spin the knob fast and get into the right ballpark (incrementing by thousands or multiple-hundreds), then slow down to get closer (incrementing by a hundred or multiple-tens) before finally slowing down to do a fine adjustment to get the exact value I wanted (in single figure increments).
>
> It turns out this is pretty difficult to do. It's easy to get a value to jump in hundreds or thousands when you spin it fast. It's easy to also get it to increment one by one when you turn it slowly. What's hard is getting the response right between those two extremes. I found I couldn't reliably get to a particular value. I could get close, but would either finish up overshooting, or undershooting, and then have to single-step to get the actual value. Spinning the knob at just the right speed to get it to jump 100 or 50 or so was utterly beyond my powers of fine motor control.
>
> I tried various response curves for the time->increment relationship, including linear, exponential based on decades, exponential based on octaves, etc etc. I couldn't find one that felt "natural" or that I could use effectively.
>
> Has anyone else done any research in this area? Any examples of products that do this well that I should look at? Any clues?



More information about the Synth-diy mailing list