My Kingdom for a DAC

Quibbles and Bits

One of the nice things about digital audio is that it’s so simple to understand. We ‘sample’ (measure) the analog waveform many tens of thousands of times a second and store the results as binary numbers. When it comes to playback, we simply use the binary numbers to recreate the original waveform. And we can refer to whats-his-name’s theory to insist that the process will have perfectly recreated the original waveform. So much for digital audio. Now let’s move on to politics….

If it were as simple as that I’d be out of a job – albeit an unpaid job. So let’s take a closer look at one aspect of nice-‘n’-easy digital audio – how a DAC works. As usual, I’ll stick with the CD Audio format to illustrate my explanation. So we’re looking at a stream of 16-bit numbers, 44,100 of them every second, and we’re turning them into an analog waveform. The sample rate presents an immediate challenge. We can very easily figure out what the actual voltage is that our 16-bit number corresponds to. The challenge is not only in setting the output voltage to precisely that value, but doing so within 1/44,100th of a second.

It turns out that there is a very simple circuit that can do that for us. It is called an R-2R ladder, and I’ve included an example below. Basically, you have a chain of resistors all wired together that have values of either R or 2R (it doesn’t actually matter too much what the actual value of R is). One of the 2R resistors is tied to ground, and each of the others to an input formed by one of the bits of our audio bit depth. Each 2R resistor is linked to the next by a single R resistor. So for 16-bit audio there are 16+1 of these 2R resistors and 16-1 of the R resistors. When each bit of the 16-bit number is applied to its respective 2R resistor (i.e. a voltage of either +1V or 0V is applied, depending on whether the bit is a 1 or a 0) the output of the ladder magically becomes the actual voltage encoded by the 16-bit number. The R-2R ladder appears to be the perfect circuit for an audio DAC – or is it?

8-bit

In order for the DAC to be accurate, it requires that each of the R resistors must be absolutely identical, and the 2R resistors all have to be exactly twice the resistance of the R resistors. What accuracy do we need? Well, if we are dealing with 16-bit audio the resistance values need to be accurate to one part in 2 to the 16th, which is 1:65,536 (and correspondingly tougher for 24-bit audio). As best as I can tell, the most accurate resistors available commercially are rated at ±0.005%, which corresponds to an accuracy of 1:20,000, or ~14-bits, which is not good enough.

Furthermore, the resistance value changes with temperature, which means that to maintain that accuracy the resistor needs to be mounted in a very carefully temperature-controlled environment. And note that the act of measuring the resistance involves passing a current through it, which has the unavoidable effect of heating the resistor. At the limit, this heating effect perturbs the value of the resistance by more than the accuracy to which you are trying to measure it! The problems don’t stop there by any means, but my description of them does.

These and other problems make it extremely difficult for a DAC manufacture to implement a real-world R-2R ladder DAC, which is why there are so few of them on the market, and also why they are so costly. So what is the alternative?

Well, we’re apparently stymied by our inability to generate output voltage levels with sufficient precision. But we’ve come across a problem like this previously [at least we have if you’ve been diligently reading these columns!], and we already know the answer – by massively oversampling, followed by low-pass filtering, we can generate a high-precision signal even though it is obtained from low-precision constituents. So the solution is to convert the incoming signal to DSD and generate our analog output voltage as a high-frequency pattern of 1’s and 0’s – which won’t depend on the accuracies of resistors. When we pass this through a low-pass filter we will recreate the original analog signal at something close to the original precision.

This, in a nutshell, is how virtually every single modern DAC works, but with some variations. First of all, strictly speaking, the term DSD implies a sample rate of 2.8224MHz, and almost no DAC chipsets will use that sample rate. Most will use a sample rate up in the 10’s of MHz. Secondly, DSD is a 1-bit system, and (for reasons I won’t get into here) most commercial chipsets utilize multi-bit (typically 3-bit to 5-bit) data. These DACs use on-board SDMs to convert the incoming signal – whether PCM or DSD – to its own internal ‘DSD-like’ format before converting to analog and filtering. Although the level of signal processing required is truly prodigious, as well as fiendishly complex, once the initial design work is done it can be reduced to a single IC, which can be manufactured in volume for pennies. It makes for a compelling argument, one to which virtually all DAC manufacturers now adhere.

Now we can move on to politics ….

Richard Murison enjoyed a long career working with lasers, as a researcher, engineer, and then as an entrepreneur. This enabled him to feed his life-long audiophile habit. Recently, though, he started an audiophile software company, BitPerfect, and consequently he can no longer afford it. Even stranger, therefore, that he has agreed to serve in an unpaid role as a columnist, which he writes from Montreal, Canada.