2
\$\begingroup\$

I'm using a 16-bit 8-channel DAC (DAC8568), driven by STM32 MCU.

I need to obtain the 0-5V and 0-10V switchable output range, so to achieve that the voltage must be amplified with op-amp. This raises several questions:

  • There are different grades in DAC8568, higher grade could produce 0-5V, lower grade produces 0-2.5V. By using a higher-grade DAC, I'll need to amplify it for 0-10V, and probably use 0-5V as is. However, the higher-grade DAC is more expensive. Can I amplify the 0-2.5V range by 2x and 4x times without losing too much precision? Or maybe it is better to just use a higher-grade DAC and amplify by 2x to obtain 0-10V? Also, I want to avoid expensive precision op-amps and use generic parts.

  • In the case of amplification, op-amps most likely will produce errors in result voltages (and also the DAC itself will be not ideal) so it will require calibration. Does it make sense to offset the output of a DAC with op-amp a little like (-0.25V, 5.25V) or (-0.25V, 10.25V) (offsets are arbitrary here), so then I can calibrate it with software, know which value produces 0V, and which 10V, and scale everything in between accordingly? Or maybe there is a better way to do it?

  • As I understand, DAC should be calibrated to address the offset/gain error of the DAC itself. By addressing this, and the op-amp amplification deviation, it looks like the calibration process will become pretty complicated. Should it be really like this?

I'm not looking for ultra-precision, but I need to reliably obtain the required voltages without too much deviation.

\$\endgroup\$
15
  • \$\begingroup\$ I would chose the second case. The DAC should be "buffered" which is always interesting. \$\endgroup\$
    – Antonio51
    Feb 6 at 13:16
  • \$\begingroup\$ @Antonio51 do you mean to use a higher-grade DAC, but offset it with op-amp too? \$\endgroup\$
    – coldmind
    Feb 6 at 13:23
  • \$\begingroup\$ No, but always interesting (if they have the same socket) \$\endgroup\$
    – Antonio51
    Feb 6 at 13:39
  • 1
    \$\begingroup\$ I would do a calibration for each channel and store it in a parameter table in a small EEPROM. I normally do offset error, gain error (slope), and INL error (if it is particularly large - less than 2 lsb is not worth it). Note that I do those end to end so it includes the amplifiers. As to adding an offset, I have done that where I really need the entire dynamic range of the part although few DACs actually go all the way to the power rails at the output. Normally I can use the 5% to 95% span and get acceptable results. \$\endgroup\$ Feb 8 at 14:48
  • 2
    \$\begingroup\$ @coldmind I don't see a quantitative requirement nor a relation of that to system and component specs. Without those, there's no way to target what you need and avoid chasing irrelevancies. \$\endgroup\$
    – John Doty
    Feb 8 at 15:59

2 Answers 2

3
+50
\$\begingroup\$

Can I amplify the 0-2.5V range by 2x and 4x times without losing too much precision?

Yes, you can amplify the 0-2.5V range to 10V with a gain stage with an output of 4. You will also amplify the noise by a factor of whatever gain you use, so if noise is an issue, use a 2x gain and an 0-5V DAC because the noise (according to the DAC output noise on pg 6 of the datasheet) is the same at 2.6uVpp. The output drift is different so if your circuit has wide temp swings, you'll want the C/D part.

I am a little confused as to why the different grades of DAC8568 are more expensive DAC8568. The DAC8586IA is the cheapest on ti at quantity. Digikey has the A/B part at a lower price.

enter image description here
From: DAC8568 datasheet

In the case of amplification, op-amps most likely will produce errors in result voltages (and also the DAC itself will be not ideal) so it will require calibration. Does it make sense to offset the output of a DAC with op-amp a little like (-0.25V, 5.25V) or (-0.25V, 10.25V) (offsets are arbitrary here), so then I can calibrate it with software, know which value produces 0V, and which 10V, and scale everything in between accordingly? Or maybe there is a better way to do it?

  • "so it will require calibration." - It really depends on what the accuracy specs are and what the cheapest solution is. You can get rail to rail opamps with very low offset voltages under 1uV for 50c to 1$ at 1k QTYs. One LSB of a 16bit DAC is 76.29uV, with a 4x gain an error of 1uV would be 4uV, and the error wouldn't even be 1LSB. If you need 8 of these (or a package with 4 or 8 of them in the same package) then it add a few bucks to the design. Another thing is getting resistors to get the gain right, which will add more error.

I'll go into calibration with the next question

As I understand, DAC should be calibrated to address the offset/gain error of the DAC itself. By addressing this, and the op-amp amplification deviation, it looks like the calibration process will become pretty complicated. Should it be really like this?

To do an offset/gain you'd need to either provide an ADC on the board with better accuracy than the DAC or a test fixture.then you can do a voltage sweep across the full range or just do a few points and then measure those points. You can then do a polynomial fit and find the offset and gain of the channel.
The more points you do the better the fit, and the more time it takes. If you add an ADC, the product is more expensive. If you do the calibration in manufacturing off board, it makes manufacturing more expensive.

You can also do higher order polynomial fits like 2nd or 3rd order. These are probably not necessary but if the fit residual is too round/wavy then you might have to increase the order, this comes at the expense of processor computation and may not be suitable for real time applications (ie if you are doing many updates and not DC).

I once was asked to calibrate a 24 bit dac for better accuracy, and calibrated every code. But the process took at minimum 4 hours, management decided to go with a DAC that was several times more expensive.

\$\endgroup\$
1
\$\begingroup\$

Some of the things I've designed such multi-channel wide-range analog outputs into had a provision for a serial port header on the board.

In some designs, I'd calibrate using an HP 34970A with a mux card wired to a D-SUB connector that was the analog output of the device. An off-the-shelf MAX232 dongle was used to connect the serial port header to HP 34970A. The built-in firmware supported this calibration. On start-up of an uncalibrated board it'd wait for the 34970A to be present, and then it calibrated itself.

In some other designs, I had added cheap analog muxes so that there would be a single diagnostic pin that had all sorts of internal signals switchable to it. Most muxes have tiny analog offsets when outputting to a high impedance load, so that was no problem. The firmware controlled the muxes and used an external HP 34401A to perform production tests as well as calibration. Since this was a low volume device, engineering time drove the cost, a few extra parts on the PCB were noise cost-wise.

Since there was no need to have separate test software and a separate bed-of-nails test harness, this was cheap to implement - throw muxes onto the board, add some cal/test routines to existing firmware, done.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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