# Do any rotary encoders allow zero idle current

Many microcontrollers and logic devices (programmable or otherwise) are capable of drawing very little current when nothing is happening. If a double-throw switch is wired to such a device, then when the switch is moved to one contact-closure position, it's possible for the controller to sleep, drawing essentially zero current, until the switch is moved to the other position. Even if the switch were to sit between the two positions for an extended period of time, or repeatedly oscillate between one position and "open", the system wouldn't have to care, and could remain in a near-zero current state.

Monitoring a single switch input, by contrast, requires consuming a certain amount of quiescent current whenever the switch is closed; the amount required is related to the speed with which software must notice if the switch is open. This is fine for many scenarios involving mechanical switches (in many cases, one can either arrange to have switches be open most of the time, or will be able to get by polling a switch e.g. once every 100ms or so). Rotary encoders, unfortunately, satisfy neither of those conditions. They're as likely to be on an active spot as an inactive spot, and in many cases one will need to respond immediately to a change if one is to have any hope of maintaining an accurate position count.

If a rotary encoder has just two contacts, there will necessarily be a position where both are active simultaneously; the only way to determine when the encoder leaves that position would be to feed current through those contacts to test their state, likely increasing quiescent current by an order of magnitude beyond what would otherwise be achievable (depending upon required response time). If there were three or four contacts wired as:

       **  **  **
Out1: -AAAAAA-----
Out2: -----AAAAAA-
Out3: AAA------AAA

**  **  **  **
Out1: -AAAAAA---------
Out2: -----AAAAAA-----
Out3: ---------AAAAAA-
Out4: AAA----------AAA


then it would be possible for a processor or other circuit monitoring such an encoder to ignore the state of any closed contact until it saw a different contact close. In the first case, the processor could resolve 1/6 cycle when awake, and be assured of waking up when the device moves to any position marked with ** after having been on another such position (typically 1/3 cycle; just under 1/2 cycle worst-case). The second case would allow 1/8-turn resolution when awake, and would wake up when the device moves 1/4-3/8 cycle. The second design would be somewhat easier to interface with a quadrature decoder, since feeding Out1 and Out3 into one RS latch, and Out2 and Out4 into another, would yield clean debounced signals for the decoder circuit.

I've seen rotary encoders with more than two contacts, but they've all used the extra contacts for purposes of yielding a more detailed binary position. Do any companies make encoders which use extra contacts to allow near-zero-quiescent power while maintaining an accurate position count? Alternatively, would there be any other approach which could be used to monitor an encoder (possibly a higher-resolution one) with near-zero quiescent power?

• It sounds like you are going to answer this yourself? But anyway, floating inputs prevent a microcontroller from that near zero quinscent current rating. Every time the input floats from one state to the other, it has to update its registers, go through its interrupts if enabled, etc. Which is why a button or switch may be "open" logically, but there is almost aways a weak pullup or pulldown holding the input at a steady voltage until the button is closed, forcing it into the other voltage state. – Passerby Mar 16 '14 at 17:14
• @Passerby: There are many ways to avoid floating inputs. If a SPDT switch is wired so that it can an input high or low, one may feed the switch to a non-inverting gate whose output is connected to its input via e.g. 1M resistor. If the gate is outputting high, the switch will only draw current when the "low" contact closes, and in that case it will only draw current long enough to switch the gate (whereupon it won't draw current until the "high" contact closes). The only "troublesome" case would occur if the switch was closed just enough to have a ~1M resistance itself, but that's not... – supercat Mar 16 '14 at 17:54
• ...apt to happen very often. If a switch has two inputs which it can connect to ground, it can be used to drive a latch made from two inverters that are cross-connected with one-meg resistors. Alternatively, one could have software have at any given time one switch configured as "output low" and the other as "weak pull-up"; whenever the "weak-pull-up" pin goes low, switch it to ground and switch the other pin to "weak pull-up". – supercat Mar 16 '14 at 18:05