Digital to analogue converter(DAC) using op-amp

  • Thread starter Thread starter shayaan_musta
  • Start date Start date
  • Tags Tags
    Digital Op-amp
AI Thread Summary
The discussion focuses on the implementation and calculation of a 3-bit digital to analog converter (DAC) using op-amps. It explains how to interpret a binary input like "101" to produce a corresponding output voltage, with calculations based on resistor values and current sourcing. The conversation also addresses how to expand the DAC to 4 bits by adding a resistor and adjusting the feedback resistor accordingly, while emphasizing the importance of precision in resistor values to minimize errors. Practical considerations, such as supply voltage limits and cost-effectiveness in component selection, are highlighted as crucial for real-world applications. Overall, the thread provides insights into both theoretical and practical aspects of designing a DAC.
shayaan_musta
Messages
208
Reaction score
2
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?
 

Attachments

  • untitled.JPG
    untitled.JPG
    6.3 KB · Views: 631
Engineering news on Phys.org
shayaan_musta said:
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?
This mean you put 101 at the input according to the voltage I specified below. You should get +5V output.
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?
See below.
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?

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:
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?
 
shayaan_musta said:
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?

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.
 
yungman said:
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.

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

And kindly tell me what does LSB & MSB stand for?
 
shayaan_musta said:
If I add 1.25K then what will be the feedback resistor's value?

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

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.
 
yungman said:
Yes 1.25K will serve as MSB. But in practice, you are cutting close to 15V limit.

Thanks for your replying.

Can you kindly kindly explain your above statement that how I were cutting close to 15v limit?
Yes I have provided 15v biasing.
 
shayaan_musta said:
Thanks for your replying.

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

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.
 
Thanks a lot yungman. You helped me a lot.
 
  • #10
You are very welcome.
 
Back
Top