Advertisement
Advertisement

Rotary encoder mates with digital potentiometer

-March 06, 2003

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 (www.switchchannel.com). 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).

Signals A and B of the rotary encoder pass through a quadrature decoder (LS7084 from LSI Computer Systems, www.lsicsi.com), which translates the phase difference between A and B of the rotary encoder into a compatible output, and , that the AD5220 can accept. The AD5220 from Analog Devices (www.analog.com) is a 128- step, pushbutton digital potentiometer. It operates with a negative-edge-triggered clock, CLK, and an increment/decrement direction signal, . When B leads A (clockwise), the quadrature decoder provides the AD5220 with a logic-high . When A leads B (counterclockwise), the quadrature decoder provides the AD5220 with a logic-low . 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.

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.

Is this the best Design Idea in this issue? Select at www.edn.com.

Loading comments...

Write a Comment

To comment please Log In

FEATURED RESOURCES