John Wynne
EDN
Digital potentiometers, such as Analog Devices’ AD5160, make excellent digitally controlled voltage dividers in applications in which 8-bit resolution is acceptable. This Design Idea shows how to use a CMOS DAC as a voltage divider in applications requiring higher resolution.
Millions of CMOS R-2R (resistor/two-resistor)-ladder DACs have found use in attenuator applications in which an external op amp acting as a current-to-voltage converter forces one current-output terminal to a virtual ground. The reference input to the DAC can be ac or dc as long as the op amp can produce the desired output voltage. A phase inversion is normal between input and output, so the circuit requires dual power supplies.
Figure 1. | This simple circuit avoids a phase inversion and operates with a single supply. In this configuration, the DAC acts as a digitally programmable resistor. |
Figure 1 shows a way to rewire this simple circuit to avoid the phase inversion and to operate with a single supply. In this configuration, the DAC acts as a digitally programmable resistor, and the DAC’s code changes the effective resistance between the input voltage and the IOUT1 output-current terminal of the DAC. Figure 2 shows a practical implementation using one-half of an Analog Devices AD5415 dual 12-bit current-output DAC operating as a voltage divider. This figure omits the DAC’s control lines for clarity. Op amp A1 forces the voltage on the IOUT2A output-current terminal to follow the voltage on the IOUT1A output-current terminal. This approach prevents a voltage differential from developing between these two bus lines, which would result in the application of different gate-source voltages across the internal DAC switches and a deterioration in the DAC linearity.
Figure 2. | This practical implementation of the circuit in Figure 1 uses one-half of a 12-bit-current-output AD5415 dual DAC that operates as a voltage divider. |
Wire the split-feedback resistors, RFB and R1, to produce a composite-feedback resistor equal in value to the DAC’s ladder impedance, R. For this arrangement the circuit-transfer function is
where REFF is the effective DAC resistance that is under digital control. Its value is
where n is the resolution of the DAC and N is the binary equivalent of the digital-input code. Substituting the second equation into the first and assuming zero DAC gain error, the circuit-transfer function for a 12-bit DAC reduces to
With all switches off, the effective impedance between the reference voltage and the IOUT1A terminal is infinite, so the output voltage starts at 0 V when you load zeros into the DAC. The output voltage increases linearly with increasing code, ideally to approximately half the input with all ones applied to the DAC.
The threshold voltage of the DAC’s internal N-channel-CMOS switches limits the maximum value of the output voltage, so not all configurations can achieve the full code range. The switch-gate voltage remains at the VDD voltage, and the switch-source voltage rises with the voltage on IOUT1A. As this voltage increases, the on-resistance of the switches becomes large and indeterminate, leading to a flattening of the output voltage and the cessation of the circuit as a predictable voltage divider. For proper operation, the VDD voltage must be a few volts higher than the maximum output voltage – that is, half the input voltage. Otherwise, the input voltage must be less than two times the VDD voltage minus 3 V. With a VDD voltage of 5 V, the AD5415 operates linearly to approximately a 3.33 V output but then flattens. If a wider output-voltage range is necessary, you could use Analog Devices’ AD7541A, which uses a 15 V power supply, in place of the AD5415. This substitution extends the usable output-signal range to approximately 7 V.