View Full Version : Coarse and fine control with a single encoder

03-14-2013, 11:23 AM
Using Teensy boards to build flight simulator interface hardware, I normally use two encoders - one for coarse changes, one for fine changes. For example, to set a heading, I have one encoder making 4° changes and another making 0.25° changes. This allows the setting to be made rapidly and with precision. But it's expensive of space - real aircraft use things like continuous-rotation 4-pole rheostats which allow rapid changes and precision to be accomplished with a single control. I'm not sure if anything like that is cheaply available for the electronics enthusiast?

My idea is to use a single encoder, making coarse changes each time it's turned to a new detent. But if the encoder is only pushed partially, against the detent spring pressure, the sketch will apply continuous slow changes to the control.

So to change a heading selection from 30° to 44.2°, I'd click clockwise through three detents to advance by 12 degrees to 42°. Then gently 'push' the encoder clockwise to slowly and gradually advance to 44.2°ish.

Has this been done before? Encoders with stronger detent spring pressure will be easier to use with this technique obviously. I'll experiment with this tonight.

03-14-2013, 11:46 AM
I'd be surprised if you can reliably detect (momentary) motion between detents, but keep us posted.

Alternatively, what about applying some sort of velocity-based non linearity, like mouse-acceleration say. Rotate the encoder fast, and it will make courser adjustments, where slow deliberate clicks will make smaller changes?

03-14-2013, 12:26 PM
The Agilent oscilloscopes use that velocity-based approach. Spin slowly for fine adjust, for faster for coarse.

03-14-2013, 01:18 PM
That's a good idea too. I'll check there isn't already an Arduino class for this, it seems like there ought to be one.

03-14-2013, 09:02 PM
Maybe an encoder with a push switch like so:
Use a switch push to change a state. You start in coarse adjustment mode, push the switch and you are in fine adjustment mode. Push the switch again for coarse adjustment mode. I'm doing something similar in my current project, using a push switch encoder to change modes so I get double-functionality out of encoder knobs.

03-20-2013, 06:34 AM
Ah yes, I have similar encoders. My current setup has two pushbutton encoders and a 16x2 LCD. The left encoder is coarse changes, the right encoder is fine changes, and clicking on the left or right encoder buttons (or both together) cycles through a list of different things the encoders can control. I'd forgotten, if it was a single-function encoder, I could just use the button to change sensitivity.