0
\$\begingroup\$

I want to build a 16 bit R2R DAC using two 74HC595 chip. I need the DAC to replace the potentiometer of a lab PSU.

While researching, in the forums and basically everywhere they suggested that R2R DACs shouldn't be above 8-10 bits because they lose precision in higher bits and I have to use 0.001% resistors. but because I'm not going to use it for some audio stuff, even +5-10% of error is fine. as long as I'm getting steps below 1mV.

  • Is it practical to build a 16 bit R2R DAC for this purpose?
\$\endgroup\$
  • 2
    \$\begingroup\$ There's no problem building it as far as I can see but it seems pointless. I would imagine that variations in each output's high and low voltages will introduce large errors and you may not be able to reach V+ or V0. \$\endgroup\$ – Transistor Jan 4 at 8:17
  • \$\begingroup\$ @Transistor What if I reduce the resolution to 14 bits? same problem? \$\endgroup\$ – ElectronSurf Jan 4 at 8:55
  • 1
    \$\begingroup\$ I've never done it. Try creating a spreadsheet with a cell for each bit. Set each bit to 0 or 1 as required. Read the datasheet and get the spread of voltages for a logic low and a logic high. Let's say the logic high is in the range 4.8 V +/- 0.1 and logic low is 0.3 V +/- 0.18 V. Write a function to give the output voltage: =if(A1 = 1, 4.8 + Rand() * 0.2 - 0.1, 0.3 * 0.18 - 0.09) for each bit. Then write your R-2R calculation. On Excel you press F9 to recalculate and new random numbers will be generated. Watch the output change for a particular bit-pattern. \$\endgroup\$ – Transistor Jan 4 at 9:05
  • 1
    \$\begingroup\$ Accuracy is not the only problem. You also need to worry about linearity and monotonicity. You may get small steps but some will be positive and some negative, and the size of steps will vary. \$\endgroup\$ – Elliot Alderson Jan 4 at 14:28
  • 1
    \$\begingroup\$ The sensitivity to error is 50% of the bit position. thus the wort case is the msb R's of 1% contribute 0.5% error of their weight which is 1/2 of the total range. so a 10 bit DAC has a resolution of 0.1% and 0.1% R value for msb contributes 0.05% error. If the R error is > 0.2% then there are missing codes near 0111111111 or the mid voltage range. Other R position errors will show up with missing AND extra codes near near ...0111...boundaries due to tolerance errors and noise. \$\endgroup\$ – Tony Stewart Sunnyskyguy EE75 Jan 4 at 19:27
8
\$\begingroup\$

You can build a 16-bit R-2R ladder DAC, but unless extremely high performance (and extremely expensive) components are selected, both the integral nonlinearity and differential nonlinearity will be poor. The transfer function (think of a graph of output voltage vs command code value) will likely be nonmonotonic, i.e. in some cases commanding a small increase in output voltage will actually give you a decrease. This tends to be problematic for many applications, particularly those involving feedback loops.

| improve this answer | |
\$\endgroup\$
2
\$\begingroup\$

It is not worth building a 16-bit R2R DAC from discrete resistors. 8 to 10 bits can be doable and there are ready-made resistor networks for these applications, as they have quite well matched resistors, even if the resistance tolerance is only 2% or 1% from the nominal. If more steps are needed, PWM techniques can be used to toggle between two values and filtering the output, or maybe R2R DAC can be just replaced with filtered 1-bit PWM output to begin with.

If you just need a digitally controllable potentiometer, these chips do exist.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.