# AN-1208: Programmable Bidirectional Current Source Using the AD5292 Digital Potentiometer and the ADA4091-4 Op Amp

### Circuit Function And Benefits

The circuit in Figure 1 provides a programmable bidirectional Howland current source using the AD5292 digital potentiometer in conjunction with the quad ADA4091-4 op amp and the ADR512 voltage reference. This circuit offers 10-bit resolution over an output current range of ±18.4 mA. The AD5292 is programmable over an SPI-compatible serial interface.

The ±1% resistor tolerance of the AD5292 allows it to be placed
in series with external divider resistors, as shown in Figure 5, to
reduce the maximum output current without the need to match
the resistors in the circuit. Reducing the I_{OUT} range serves to
increase the sensitivity of the output current.

The AD5292 has an internal 20-times programmable memory
that allows a customized I_{OUT} at power-up. The circuit provides
accurate, low noise, and low tempco output voltage capability
and is well suited for digital calibration applications.

### Circuit Description

Product | Description |

AD5292 | Digital potentiometer, 10 bits, 1% resistor tolerance |

ADA4091-4 | Micropower, overvoltage protected (OVP), rail-to-rail op amp |

ADR512 | Low noise, precision 1.2 V reference |

This circuit employs the AD5292 digital potentiometer in conjunction with the ADR512 reference and the ADA4091-4 op amp, providing a 10-bit, programmable, bidirectional current source. The circuit guarantees monotonicity, ±1 LSB DNL, and has an integral nonlinearity of ±2 LSB, typical.

The bipolar high voltage regulator consists of a low voltage
reference followed by a noninverting and an inverting amplifier
whose gains are set by the ratio of R_{1} to R_{2}.and R_{3} to R_{4}. The
ADR512 1.200 V voltage reference has low temperature drift,
high accuracy, and ultralow noise performance.

The maximum resistor that ensures an ADR512 minimum operating current is defined in Equation 1.

As shown in Figure 1, the RBIAS resistor is 3.9 kΩ, which sets the bias current of the ADR512 at 3.5 mA.

The ADA4091-4 is an op amp that offers low offset voltage and rail-to-rail output. The ADR512, in combination with the ADA4091, offers a low tempco and low noise output voltage.

The R_{1} and R_{2} resistors adjust the gain in the noninverting
amplifier, U1A. The output voltage, V_{1}, defines the maximum
positive output current range. Equation 2 and Equation 3 are
used to calculate the resistor values.

The maximum negative output current range is adjusted by R_{3}
and R_{4}, which define the output voltage, V2, in the inverting
amplifier, U1B. Equation 4 and Equation 5 are used to calculate
the resistor values.

The resistors, which are shown in Figure 1, are chosen to provide a gain of +11.5 and −11.5 in the noninverting and the inverting amplifier, respectively. This provides a bipolar regulated voltage of ±13.8 V. These voltages can be used to power other circuits with a maximum output current of +17 mA.

Equation 6 and Equation 7 calculate the output current of the
Howland current source, and Figure 2 shows the maximum I_{OUT}
versus code.

where D is the code loaded in the digital potentiometer.

Typical INL and DNL plots are shown in Figure 3 and Figure 4.

As shown in Figure 1, the bidirectional current source operates
over the maximum output range of ±18.4 mA. To improve the
circuit accuracy the maximum output current, I_{OUT}, should be
decreased by recalculating the resistor value in the U1C and
U1D op amps or by reducing the voltage reference across the
AD5292. This gives the full 10-bit resolution over a limited
output current range.

The U1C and U1D op amp resistors can be recalculated using
Equation 6 and Equation 7, but care should be taken to
minimize errors when selecting standard resistor values from
the calculated values. Decreasing the reference voltages, V_{1} and
V_{2}, in the AD5292 can be accomplished by recalculating the
bipolar output regulator and the U1A and U1B output voltages
or by using two external resistors, as shown in Figure 5.

The resistors in series with the AD5292 are useful when the
voltage references, V_{1} and V_{2}, are the main system power
supplies. Traditionally, digital potentiometers have a ±20%
end-to-end resistor tolerance error. This affects the circuit
accuracy because of the mismatch error between the digital
potentiometer and the external resistors. The industry leading
±1% resistor tolerance performance of the AD5292 helps to
overcome the mismatch resistance error.

The AD5292 has 20-times programmable memory, which allows presetting the circuit output current to a specific value at power-up.

Excellent layout, grounding, and decoupling techniques must be used to achieve the desired performance from the circuits discussed in this note (see MT-031 Tutorial and MT-101 Tutorial). As a minimum, a 4-layer PCB should be used with one ground plane layer, one power plane layer, and two signal layers.

### Common Variations

The AD5291 (eight bits with 20-times programmable power-up memory) and the AD5293 (10 bits, no power-up memory) are both ±1% tolerance digital potentiometers that are suitable for this application.

The ADA4091-2 dual op amp can be used when the voltage
references, V_{1} and V_{2}, are not necessary.

### References

MT-032 Tutorial, *Ideal Voltage Feedback (VFB) Op Amp*,
Analog Devices.

MT-087 Tutorial, *Voltage References*, Analog Devices.

MT-091 Tutorial, *Digital Potentiometers*, Analog Devices.

MT-095 Tutorial, *EMI, RFI, and Shielding Concepts*,
Analog Devices.