It’s the time of year for saving money!

I thought we would start this next installment with a discussion of some different converter types and their particular pros and cons. Just to backtrack a little, all the D/A converter does is take a number and turn it into a voltage. A larger number applied to the converter generates a higher voltage at the output. Regardless of the type of converter, this is all that ever happens.

Originally – and this type of converter dates back to the 1920’s, you had one resistor for each binary bit you wanted to convert, and the appropriate number of resistors were switched in to generate the corresponding analog output. This presents an immediate practical problem, as in PCM we need 2 raised to the number of bits worth of resistors, so a paltry 10 bits means over a thousand parts. There has to be better way! Numerous clever approaches were taken to either reduce the parts count, improve the accuracy, or both.

A popular D/A design that evolved from these problems was called the R/2R converter. Instead of 2^(number of bits) resistors needed, it only requires 2 *times* the number of bits worth of resistors. So, 10 bits uses 20 resistors, etc. The name R/2R comes from the use of only two values of resistor, one twice the value of the other. Say, 1000 Ohms and 2000 Ohms, for example. This ratio simply comes from the fact that each bit added is twice the value of the one before. We count this as 1,2,4,8,16, etc., in binary.

This doubling of the numerical value is also the same as 6dB in analog, for those keeping score at home.

All digital audio uses this system, from SACD with one bit, to 24 bits in others.

Here is a conceptual 4 bit R/2R converter:

Our four digital bits come in on the top B’s. Let’s say five volts for a one, and zero volts for a zero. As we work from the MSB (B3) to the LSB (B0) the contribution of each bit is half of the previous one, because the voltage has to travel through more resistors. The more bits that are five volts, the more voltage that comes out. At that ratio of 1,2,4,8 we talked about earlier.

Looks simple enough, right?

All D/A converters are prone to various types of errors such as:

**Linearity:**

This is just a fancy word for distortion, or lack of faithfulness to the original input. It can take many forms, but all of them create new notes that weren’t present in the original recording! For instance, in the R/2R converter, the fact that all the resistors are not exactly matched affects the linearity and generates distortion.

**Monotonicity:**

This is another departure from linearity, and simply means that when the digital value increases, the output must also increase and vice-versa. Obviously it’s bad for the input to go up and the output to go down! This can also result in “missing codes” where the output remains the same even though the input has changed level. Called “sticks” and “jumps” in the trade.

**MSB Transition Noise:**

In PCM audio, our music is always represented as a series of digits ranging from the Most Significant Bit (MSB), to the Least Significant Bit (LSB). Whether 1 or 24 bits, it always runs from the MSB to the LSB. As the word-length is increased, more LSB’s are added. The MSB is also the “sign bit” describing whether the music is a positive or negative voltage for that particular sample. But when the signal *crosses* zero, at its lowest and quietest point, all the bits change state – and having all the bits change at once can cause interference between the analog and digital portions of the D/A converter and this can be a very difficult engineering problem.

The R/2R converter is subject to all three of these errors, and many more. Some of them can be treated, but simple things like the matching of resistors (As an reminder, 20 bits is one part-per-million!) as well as compensating for aging over the life of the product is very difficult. Even 16 bits of actual performance is difficult to achieve in R/2R converters.

Let’s put on our lab-coats and compare some real-world read-outs. First, of a state-of-the-art multi-bit R/2R design. The price is around USD$40,000 and it’s highly regarded in the industry.

But first a few words about these graphs. The test contains only two notes – nineteen and twenty kilohertz – these are very high frequencies, likely not even audible to listeners on their own and without distortion.

But there is an interesting property of these two notes: It’s a sort of “torture test” for converters. A perfect system would just show two vertical lines at 19 and 20kHz. When distortion is present, many more notes will appear! Even the difference of 1k (20k minus 19k) will be displayed.

And in contrast, here is an equally state-of-the art delta-sigma design using integrated circuits. Also well regarded, and approximately USD$2,000.

This all looks very esoteric, I know, but all that red stuff in the first graph are really new notes that were not present in the original music!

As we talked about in the first article, the use of oversampled sigma-delta converters has brought greatly increased accuracy and fidelity to the original recording, as well as being a much more affordable approach.

In the next article, we’ll go into more detail about sigma-delta, as well as some practical aspects of modern designs.

Great article Dave, as always!

Great article, Dave!

The most common types of electronic DACs are:

The pulse-width modulator, the simplest DAC type. A stable current or voltage is switched into a low-pass analog filterwith a duration determined by the digital input code. This technique is often used for electric motor speed control, but has many other applications as well.

Oversampling DACs or interpolating DACs such as the delta-sigma DAC, use a pulse density conversion technique. The oversampling technique allows for the use of a lower resolution DAC internally. A simple 1-bit DAC is often chosen because the oversampled result is inherently linear. The DAC is driven with a pulse-density modulated signal, created with the use of a low-pass filter, step nonlinearity (the actual 1-bit DAC), and negative feedback loop, in a technique called delta-sigma modulation. This results in an effective high-pass filter acting on the quantization (signal processing) noise, thus steering this noise out of the low frequencies of interest into the megahertz frequencies of little interest, which is called noise shaping. The quantization noise at these high frequencies is removed or greatly attenuated by use of an analog low-pass filter at the output (sometimes a simple RC low-pass circuit is sufficient). Most very high resolution DACs (greater than 16 bits) are of this type due to its high linearity and low cost. Higher oversampling rates can relax the specifications of the output low-pass filter and enable further suppression of quantization noise. Speeds of greater than 100 thousand samples per second (for example, 192 kHz) and resolutions of 24 bits are attainable with delta-sigma DACs. A short comparison with pulse-width modulation shows that a 1-bit DAC with a simple first-order integrator would have to run at 3 THz (which is physically unrealizable) to achieve 24 meaningful bits of resolution, requiring a higher-order low-pass filter in the noise-shaping loop. A single integrator is a low-pass filter with a frequency response inversely proportional to frequency and using one such integrator in the noise-shaping loop is a first order delta-sigma modulator. Multiple higher order topologies (such as MASH) are used to achieve higher degrees of noise-shaping with a stable topology.

The binary-weighted DAC, which contains individual electrical components for each bit of the DAC connected to a summing point. These precise voltages or currents sum to the correct output value. This is one of the fastest conversion methods but suffers from poor accuracy because of the high precision required for each individual voltage or current. Such high-precision components are expensive, so this type of converter is usually limited to 8-bit resolution or less.

Switched resistor DAC contains a parallel resistor network. Individual resistors are enabled or bypassed in the network based on the digital input.

Switched current source DAC, from which different current sources are selected based on the digital input.

Switched capacitor DAC contains a parallel capacitor network. Individual capacitors are connected or disconnected with switches based on the input.

The R-2R ladder DAC which is a binary-weighted DAC [not a thermometer-coded DAC as implied by the post] that uses a repeating cascaded structure of resistor values R and 2R. This improves the precision due to the relative ease of producing equal valued-matched resistors (or current sources). (See https://hackaday.com/2015/11/05/logic-noise-digital-to-analog-with-an-r-2r-dac/)

The Successive-Approximation or Cyclic DAC, which successively constructs the output during each cycle. Individual bits of the digital input are processed each cycle until the entire input is accounted for.

The thermometer-coded DAC, which contains an equal resistor or current-source segment for each possible value of DAC output. An 8-bit thermometer DAC would have 255 segments, and a 16-bit thermometer DAC would have 65,535 segments. This is perhaps the fastest and highest precision DAC architecture but at the expense of high cost. Conversion speeds of >1 billion samples per second have been reached with this type of DAC.

Hybrid DACs, which use a combination of the above techniques in a single converter. Most DAC integrated circuits are of this type due to the difficulty of getting low cost, high speed and high precision in one device.

The segmented DAC, which combines the thermometer-coded principle for the most significant bits and the binary-weighted principle for the least significant bits. In this way, a compromise is obtained between precision (by the use of the thermometer-coded principle) and number of resistors or current sources (by the use of the binary-weighted principle). The full binary-weighted design means 0% segmentation, the full thermometer-coded design means 100% segmentation.

Most DACs, shown earlier in this list, rely on a constant reference voltage to create their output value. Alternatively, a multiplying DAC takes a variable input voltage for their conversion. This puts additional design constraints on the bandwidth of the conversion circuit.— https://en.wikipedia.org/wiki/Digital-to-analog_converter

What is this? Just a link to Wikipedia certainly would have been sufficient.

No offense to you, but I wrote this blog before you and I always checked my facts to make sure they were accurate and then summarized things to make it clear rather than write euphemistically to get a point across, which only misleads the reader in my opinion. If you look at what I quoted a little more carefully, you’ll see comments in brackets “[]” where I explain, politely, the mistakes that you made as indicated in the by reference material. It’s up to you, but I can’t see how stating authoritative and well researched information can do any harm, and then the readers don’t get confused when they read some reference materials themselves and discover your explanation is in some ways with no ill intent on your part factually Incorrect. That’s just my opinion and it’s your blog now; but I wanted to point this one time where you made, innocently, several errors if thar’s important to ***you***. That’s all. Thanks very much. I won’t post any comments again.