Rotary encoder mates with digital potentiometer

Switch Channel RE11

In developing electronic systems, designers look for products or ideas that may benefit from the better performance, smaller size, lower cost, and improved reliability that an IC can offer. Toward that end, the digital potentiometer emerged as an alternative to its mechanical counterpart, the mechanical potentiometer. The digital potentiometer offers most of the cited advantages but falls short for users of mechanical potentiometers, who require a simple rotary interface for front-panel adjustment or calibration without external controllers. The circuit in Figure 1 represents an attempt to combine the best of both worlds: the simplicity of a rotary interface and the performance of a digital potentiometer. The rotary encoder in this circuit is the RE11CT-V1Y12-EF2CS from Switch Channel. This type of rotary encoder has one ground terminal, C, and two out-of-phase signals, A and B (Figure 2). When the rotary encoder turns clockwise, B leads A (Figure 2a), and, when it turns counterclockwise, A leads B (Figure 2b).

A quadrature decoder and a digital potentiometer form a simple rotary-encoder interface.
Figure 1. A quadrature decoder and a digital potentiometer form a simple rotary-encoder interface.

Signals A and B of the rotary encoder pass through a quadrature decoder (LS7084 from LSI Computer Systems), which translates the phase difference between A and B of the rotary encoder into a compatible output, ∖CLK and U/∖D, that the AD5220 can accept. The AD5220 from Analog Devices is a 128- step, pushbutton digital potentiometer. It operates with a negative-edge-triggered clock, ∖CLK, and an increment/decrement direction signal, U/∖D. When B leads A (clockwise), the quadrature decoder provides the AD5220 with a logic-high U/D. When A leads B (counterclockwise), the quadrature decoder provides the AD5220 with a logic-low U/∖D. The quadrature decoder also produces a clock in synchronism with its output, which also connects directly to the AD5220. You linearly vary the clock's pulse width by adjusting RBIAS.

In clockwise rotation, signal B leads A (a); in counterclockwise rotation, A leads B (b).
Figure 2. In clockwise rotation, signal B leads A (a); in counterclockwise rotation, A leads B (b).

Aside from decoding the quadrature output of the rotary encoder and providing a clock signal, the LS7084 also filters noise, jitter, and other transient effects. This feature is important for this type of application. Unlike optical encoders, the RE11CT-V1Y12-EF2CS is a low-cost electrical encoder, in which each turn can create some bounce or noise issues because of the imperfect nature of the metal contacts within the switch. The LS7084 prevents such erroneous signals from reaching the AD5220. The operation of the circuit in Figure 1 is simple. When the rotary encoder turns clockwise, the resistance from the wiper to terminal B1 of the digital potentiometer, RWB1, increments until the device reaches full scale. Any further turning of the knob in the same direction has no effect on the resistance.

Likewise, a counterclockwise turn of the knob reduces RWB1 until it reaches the zero scale, and any further turning of the knob in the same direction has no effect. One example of the flexibility and performance this circuit offers becomes apparent when you consider systems with front-panel rotary adjustment. You can lay out the compact digital potentiometer and quadrature decoder anywhere in the system. All the ICs need are two digital control signals routed to the front panel where the rotary encoder is located. This setup proves impervious to interference, noise, and other transmission-line effects that arise in traditional designs with mechanical potentiometers. These designs force the sensitive analog signal to travel all the way to the front of the panel to be processed and then back to its destination.

Materials on the topic

  1. Datasheet Switch Channel RE11
  2. Datasheet Analog Devices AD5220
  3. Datasheet LSI Computer Systems LS7084

EDN

EMS supplier