[sdiy] discrete DAC accuracy

Fredrik Carlqvist ifrc at iar.se
Wed Jan 14 10:41:17 CET 2004


Wouldn't it be interesting to see how far you can get by sorting the
resistors before soldering? 

I did some reading last night. Turns out there's something called
'superposition'. It can be used to calculate the errors of the DAC. (i'm a
software engineer damn it!). I'm planning to do a simulation tonight.

It seems like a too large 2R resistor to the 'left' (MSB) side will cause
non-monotonicity (where the output of 0x7fff is larger than 0x8000). Or, in
lesser extent, a too small R resistor, and certainly the combination.
Because the only thing I'm after is a monotonous output, I think the
solution is to sort the resitors. This can be done with high precision I
think. 

Perhaps if we put the smallest resistors to the MSb side and the largest to
the LSb side, then we could be monotonous! 

This is what I will try tonight. Given Niel's description of resistor
manufacturing, I would suspect the distribution would be a gaussian one with
the center removed (since the perfect ones probably go into the 0.1%
precision bin). I will use this model in my simulations.


Fredrik C


-----Original Message-----
From: Magnus Danielson [mailto:cfmd at bredband.net] 
Sent: Tuesday, January 13, 2004 21:28
To: ifrc at iar.se
Cc: synth-diy at dropmix.xs4all.nl
Subject: Re: [sdiy] discrete DAC accuracy


From: "Fredrik Carlqvist" <ifrc at iar.se>
Subject: [sdiy] discrete DAC accuracy
Date: Tue, 13 Jan 2004 11:02:24 +0100
Message-ID: <048f01c3d9bc$57f81120$9dc909c0 at fredrikcw2k>

> Hello list!

Hi Fredrik!

(Good name BTW... ;)

> I'm trying to calculate the absolute error of a discrete R-2R 16-bit 
> DAC. If the resistor tolerance is 2%, is then the overall accuracy 2% 
> for any binary code? At least it seems so in the 3-bit case. I don't 
> have the tools for the 16-bit case.

Oh, this is a big issue!

I see many threads here, but don't want to elaborate on either of them at
this point in time:

* Usually you are to assume a Gaussian distribution of the values such that
  3-sigma (i.e. 99,7% of all cases) keeps within the given values (i.e. +/-
1%)
  or whatever. It may not be that you have this distribution, it may be that
  there is a "hole" in the middle where selections have happend, but there
may
  also be other deviations, like a shifted average resistance due to
production
  variances etc.

* My measuring resistors with a good resistance meter you can improve the
  state. If you build your R-2R ladder with resistors of the same nominal
  resistance, you could measure them all up and combining them in such a
  fashion that your ladder becomes optimally accurate. You could use brute-
  force attacks, but some heuristics could be applied to reduce the cases to
  try out.

* An R-2R ladder depends on more than resistor precission. For instance will
  the properties of the analog "switches" be able to contribute to lack of
  precission.

* It is not the actual resistance of the resistors which is very important,
but
  rather their relative resistance. It is the effective voltage-divider
chains
  and the deviations from the linear ramp which is important.

* The resistors in the output end (MSB) of the R-2R is more important in
  relative precission than in the LSB end. You sometimes find that there is
a
  trimmer for the MSB resistor.

There is naturally many things which comes with the trade and let me assure
you that I have not been involved in the manufacturing of any precission DAC
devices. However, a number of usefull tricks can be developed by spending a
few hours to think about how things contribute to the end result and
possible ways to compensate for it.

Hmm.... I wonder how much spreading my resistors have? Hmm...

> This is of course not accurate enough for a VCO control voltage, but 
> should be ok for a VCA, don't you think?

VCAs has not the same requirements for precission, I agree.

Cheers,
Magnus




More information about the Synth-diy mailing list