There are a wide range of digital to analog converter circuits out there, but the R-2R ladder is one of the most common and most versatile. It is simple, can be quite precise and it has the huge advantage of being relatively easy to scale.
The most obvious DAC architecture is the resistor string type shown in Figure 1. This shows a simplified 3-bit DAC which outputs one of eight discrete voltage levels (zero through to 7/8 of the reference voltage) according to the digital code applied. This code controls the analog switches as shown in the figure.

A resistor-string DAC is simple to understand but requires 2n resistors and analog switches for an n-bit converter. This becomes unmanageable if the number of bits gets above about 16.
The main disadvantage of this kind of DAC is its complexity. For an n-bit converter a resistor-string DAC requires 2n matched resistors and the same number of switches. A 16-bit DAC, for example, would require 65,536 well-matched resistors and the same number of switches! 16-bit resistor string DACs are available, but this is about the maximum size you can get with this architecture.
To overcome this scalability issue, many DACs use the R–2R architecture. Figure 2 shows a 3-bit converter, comparable to the DAC in Figure 1. You can see this circuit only requires only six resistors and three switches. This can be generalised to 2n resistors for an n-bit DAC. A 16-bit version would therefore only require 32 resistors and a similar number of switches: a much more manageable number than 65,536 for the resistor string DAC. You can easily scale this type of DAC up to 20 or more bits.

The R-2R DAC only requires 2n resistors and switches for an n-bit converter, allowing for larger and lower-cost DACs.
We have seen how R-2R ladder DACs scale up, but they also scale down nicely too because of the low number of switches required. You can use this property to create a “free” low-resolution DAC using a few microcontroller GPIOs and a handful of resistors. You will notice that the switches in the R-2R DAC (Figure 2) all switch between Vref and ground. If you are not too fussy about the precision of the reference voltage you can achieve the same effect using push-pull digital outputs in the place of the switches.
Figure 3 shows this for our 3-bit example. If you write the binary DAC code to the GPIO pins, the output voltage will take the appropriate value. You can of course extend this to as many bits as you need, but don’t get carried away since the precision of this type of DAC is not usually very high.

You can build a simple DAC using just a few microcontroller GPIOs and an R-2R ladder as shown here. The push-pull digital outputs replace the analog switches in Figure 2.
R-2R ladders are also used in so-called “multiplying DACs” which are generally current-output types. Multiplying DACs can handle a positive or negative reference (or an AC reference) and produce an output voltage that is proportional to VIN × N where N is the digital code.
Figure 4 shows a 3-bit example. The voltage at the IOUT pin will always be zero thanks to the op amp U1. The current that flows out of this pin will be VIN/R × N/2n. You can see from the circuit that the current will be negative (flowing into the pin) if VIN is negative.

A multiplying DAC uses an R-2R ladder to produce an output current proportional to the digital code and a reference voltage which can be either positive or negative (or AC). Using one or two external op amps allows us to build a 2-quadrant or 4-quadrant multiplying DAC as shown.
The voltage at the output of U1 will be –VIN × N/2n as shown in the accompanying table. For many applications, this “2-quadrant” output is all that is required – a bipolar analog reference and an unsigned integer multiplier.
The feedback resistor for U1 is integrated into the DAC chip. This is really important since it must be closely matched to the ladder resistors. It is relatively easy to create resistors on silicon that are closely matched in value or ratio, but difficult to achieve a precise absolute value. If you used an external resistor here, you would almost certainly introduce significant error.
By adding an additional summing amplifier U2, we can make the DAC “4-quadrant”. The digital code now represents a signed multiplier (using offset binary representation) giving us a bipolar analog reference and a signed integer multiplier.
References
Horowitz, Paul, and Winfield Hill. The Art of Electronics. Third edition, 11th printing, with Corrections. Cambridge New York, NY: Cambridge University Press, 2017.
Sponsor this ArticleAndrew Levido (andrew.levido@gmail.com) earned a bachelor’s degree in Electrical Engineering in Sydney, Australia, in 1986. He worked for several years in R&D for power electronics and telecommunication companies before moving into management roles. Andrew has maintained a hands-on interest in electronics, particularly embedded systems, power electronics, and control theory in his free time. Over the years he has written a number of articles for various electronics publications and occasionally provides consulting services as time allows.
