# Digital to analogue converter(DAC) using op-amp

1. Aug 20, 2011

### shayaan_musta

Hello experts!

Here is 3-bit digital to analogue converter.

I have a question related to this.

1)What does it mean if you have to say to perform operation on it with 101?

2)And we can obviously conclude and see output voltage on oscilloscope. But by calculation how can you predict the answer(i.e. output voltage)? Is there any formula?

3)And What is the criteria if I want to add 1 more resistor at input(making 4-bit DAC) either it is last or may be it is the first resistor. And of course adding another input resistor must change the value of feedback resistor, then what it should be?

#### Attached Files:

• ###### untitled.JPG
File size:
6.3 KB
Views:
236
2. Aug 20, 2011

### yungman

To make it work, you have to have precision voltage as input. Let say you use a +5V reference and "1" and 0V as "0". Your full scale is from 0 to +7V output. Each LSB is 1V.

The 10K input is the LSB, 5K is the middle, the 2.5K is the MSB in this case. The first stage of the circuit is nothing more than a summing circuit. With virtual ground on the +ve input and "1" is by putting a +5V on the resistor, when you put "1" at the 10K, you source 0.5mA to the summing junction. Feedback resistor of the first stage is 2K, so the output goes to -1V for the LSB. The middle resistor is 5K, so when you put a "1", you source 1mA into the junction, the outpur of the first stage will go to -2V. And the same for the MSB give -4V.

So I defined each LSB is 1V, then if I put 101 at the input, The current I will source to the junction is 0.5+0+2=2.5mA. The output of the first amp will go to -5V due to the 2K feedback resistor.

With this method, you can calculate all the combination. Yes you can add more bits, say you put one more 20K resistor and use it as LSB instead, you get a 4 bit DAC.

The limitation of this method is you ability to get precision resistors. Normal resistor is like 1%, so you really cannot get anything better than 6 bit. For 10 bits, you need something like 0.025% or better. Remember you need to be accurate to +- half LSB, so even the resistor need to be 0.5% accurate in order to get to that as the input. The worst part is the Feedback resistor(2K in your circuit), that is another source of error. So the total error is twice the accuracy of one resistor. That is the reason I spec 0.25%. But the feedback resistor contribute to FULL SCALE ERROR, not the bit error. That is the reason if you read data sheet, they always specified separate full scale error and bit error.

Hope this help.

The second amp is nothing more than to invert to 0 to +7V output.
h

Last edited: Aug 20, 2011
3. Aug 20, 2011

### shayaan_musta

I used +5v pulse at input & said to me to apply input 101. Does this mean +5v at 10k, 0 at 5k & +5v at 2.5k. Am I right?

And if I want to make it 4-bit DAC, so what changes should I make?

4. Aug 20, 2011

### yungman

1) Yes.

2) add a 20K and use it as LSB, then you get 0.25V per LSB. Your full scale of "1111" would be 7.5V.

5. Aug 20, 2011

### shayaan_musta

If I add 1.25K then what will be the feedback resistor's value?

And kindly tell me what does LSB & MSB stand for?

6. Aug 20, 2011

### yungman

Yes 1.25K will serve as MSB. But in practice, you are cutting close to 15V limit.

LSB is least Significant Bit. MSB is Most Significant Bit.

7. Aug 20, 2011

### shayaan_musta

Can you kindly kindly explain your above statement that how I were cutting close to 15v limit?
Yes I have provided 15v biasing.

8. Aug 20, 2011

### yungman

Most op amp are limited to +/-15V supply, and the output can only go to within 2 volt of the supply rail. You don't design according to theory, you need to look at the practical limit in real life. That's the reason I go 20K on the LSB instead of going to `1.25K for MSB. You don't want to use a very expensive op-amp from like Apex to proof a point. One thing about working in the real world is we need to look at the cost, practicality of a design. It is like you don't want to design a circuit that require 0.1% resistors as much as possible just because it is called for. Design with practical limit in mind. that 's the different between in school and in real life.

9. Aug 21, 2011

### shayaan_musta

Thanks a lot yungman. You helped me a lot.

10. Aug 21, 2011

### yungman

You are very welcome.