AN-1150: Controlling the AD5111/AD5113/AD5115 Using a Traditional Dial Interface
Introduction
The digital potentiometer offers an optimal replacement for a mechanical potentiometer due to its small package, better reliability, and high accuracy with smaller voltage glitches.
Digital potentiometers are available in a variety of interfaces, both digital and manual. The manual, or push-button, interface is controlled directly by adding two push-button switches, such as the AD5116 or the AD5228. Press the up button to increase the resistance, and push the down button to decrease the resistance, as shown in Figure 1.
The push-button interface includes an internal button debouncer to filter the voltage glitches, as well as internal resistors, making this interface suitable for a large number of switches.
If the application requires another type of manual controller, such as a rotary dial, the push-button interface is not suitable. In such cases, a digital up/down interface can be used. This interface is designed to increase or decrease the linear resistance at high rates of speed, with a clock up to 50 MHz.
The digital up/down interface typically provides three input pins, as follows:
- The CS pin enables the part.
- The U/D pin selects increment or decrement.
- The CLK pin is the clock input.
The operation of the digital up/down interface is simple: when the CS pin is pulled low, the part reads the status of the U/D pin, incrementing or decrementing an internal counter at each CLK falling edge, as shown in Figure 2.
The AD5111/AD5113/AD5115 digital potentiometers offer guaranteed low resistor tolerance errors of ±8% and up to ±6 mA current density, making them ideal choices for a mechanical potentiometer replacement.
The low current consumption (750 nA typical) and 2.3 V operation increase the battery life, and the small package (2 mm × 2 mm LFCSP) makes the AD5111/AD5113/AD5115 ideal for portable applications.
Rotary Dial
The rotary dial or knob is a common mechanical potentiometer controller. This type of controller can be emulated by using a mechanical encoder.
The mechanical rotary encoder typically provides three pins: one for ground (common) and two additional output pins for generating square signals with a constant out-of-phase between them, as shown in Figure 3.
Connection With the Digipot
The mechanical encoder does not pull the output pin high, but, instead, places the pin at high impedance. The signal pins require external pull-up resistors.
The AD5111/AD5113/AD5115 offer extra features such as shutdown and EEPROM memory. To ensure that these commands are not executed, the U/D pin can be updated only when CLK is low.
By including a fast D-type flip-flop, as shown in Figure 4, the U/D pin can be updated without concern for the CLK level. The only requirement is that the propagation delay in the D-type flip-flop must be <10 ns.
Hybrid Interface
In addition, the interface allows hybrid control between manual and digital operation. The hybrid interface allows the use of the extra functionality implemented in the part, such as the EEPROM or shutdown mode.
The hybrid interface can be implemented by adding an external multiplexer between the mechanical encoder and the microcontroller.
Four GPIO pins are required for this interface: one to select the controller and three additional pins to drive the CS, U/D, and CLK pins. The CS pin is required to disable the part, ensuring a controlled environment when the multiplexer switches between lines.