Skip to main content

Reply to "Recommendation for a Potentiometer with Stops (Detents)"

As I see it, the idea here is to use a single analog-to-digital input pin on the Arduino as a 1 of N (e.g., 1 of 10) selector of a mode, level, count, function, whatever.  The software must scan or sample the potentiometer value, say, ten times per second or faster to insure a somewhat responsive feel when a change is made.

So the typical way to perform this selector function with a rotary/knob input is with a 3-terminal quadrature rotary encoder switch which requires 2 digital input pins.

rotary encoder

Like the 3-terminal potentiometer method, a rotary encode also has 3-terminals.  As you rotate the shaft, the two internal switches turn on and off in a pattern that can be decoded (using software) to determine whether the switch is going CW or CCW.  The software must keep track of the absolute count (unlike the detent analog potentiometer method which will indicate its position in a single analog measurement).

In any case, these rotary encoders are low cost and are even available on tiny PCBs with square-pin headers to connect to Arduino modules using square-pin jumpers so no soldering.  These encoders typically have, say, 20 or 30 detents per revolution and are continuously rotating multiple revolutions can select from tens or even hundreds of modes, functions, levels, whatever.  

rotary encoder to arduino analog

So getting back to the topic at hand...and this being a discussion forum... I'm thinking someone out there in Arduino land might have tried to apply a 3-terminal rotary encoder plus 3 resistors (as shown above) to create a 4-level analog voltage to drive a single Arduino analog pin.  That is, as mentioned earlier, the Arduino must read the analog voltage, say, tens of times per second.  So now the selector software must only distinguish 1 of 4 analog levels, and then decide if the voltage change (if any) indicated a CW or CCW rotation and increment or decrement the selection accordingly. 

That is, now that the actual application is understood, while the detent potentiometer will surely do the trick, there is an argument that there is no value or use for the continuous resistance between detents. 

Attachments

Images (2)
  • rotary encoder to arduino analog
  • rotary encoder
Last edited by stan2004

OGR Publishing, Inc., 1310 Eastside Centre Ct, Suite 6, Mountain Home, AR 72653
800-980-OGRR (6477)
www.ogaugerr.com

×
×
×
×
×