Electronic – Need help with a R-2R DAC Circuit

converterdacdigital-logiclinearoperational-amplifier

I am trying to simulate a 4-bit DAC circuit using a R-2R resistor ladder. I am using a 741 op-amp. I selected the R value as 10k and calculated the value of Rf using the equation given on this page – http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/dac.html
The values were calculated with a 5V input and I am trying to obtain -10V output for a digital input of 1111. The circuit I have is shown below.

DAC Circuit http://postimg.com/173000/dac-circuit-172789.jpg

The R values are 10K

2R – 20K

Feedback resistor – 21.33K

These are the values I keep getting:

0000 – 0V output

0001 – 1.33V output

0010 – 2V output

0011 – 2.66V output

0100 – 3.05V output

0101 – 3.88V output

and so on.

As you can see there is no linearity with the output voltages. Could someone tell me what I'm doing wrong?

Additional Link to Image if it doesn't show above – http://postimg.com/image/173000/dac-circuit-172789.jpg

Best Answer

The problem is that your bit inputs must be at either a logical 1 (Vcc) or a logical zero, (GND) as they would be if they were connected to the outputs of, say, a counter like an HC191.

You've shown them floating when the switch is OFF, which won't work properly if you're using an R-2R ladder.

This works, and here are the LTspice files so you can play with the circuit if you want to.

enter image description here