Chapter 21

Interfacing with the Digital Domain

The advance of digital audio has greatly improved the fidelity of audio storage media, and generally made wonderful things possible, but sound waves remain stubbornly analog, and so conversion from analog to digital and vice versa is very necessary. Today’s analog-to-digital converters (ADCs) and digital-to-analog converters (DACs) have excellent performance, with 24-bit accuracy at a 192 kHz sampling rate commonplace, but to achieve this potential performance in an application there are a good number of factors that need to be appreciated. Some of them, such as the need for effective HF decoupling, are relatively straightforward provided you follow the manufacturer’s recommendations, but others, involving the actual interfacing to the analog input and output pins, are a bit more subtle.

Having said that, contemporary ADCs and DACs are far easier to apply than their ancestors. Oversampling technology means that it is no longer necessary to put a ninth-order brickwall low-pass anti-aliasing filter in front of an ADC, or place a ninth-order brickwall low-pass reconstruction filter after a DAC. If you’ve ever tried to design a ninth-order filter to a price, you will know that this is a very significant freedom. It has had a major effect in reducing the price of digital equipment, particularly in applications like digital mixers, where a large number of ADCs and DACs are required.

ADC and DAC technology moves rapidly; the device examples I have chosen here (2009) will probably soon be out of date. The general principles I give here should be more enduring, and will be valid for the foreseeable development of the technologies.

PCB Layout Considerations

The PCB layout for both ADCs and DACs requires observance of certain precautions, which are basically the same for both functions. A double-sided PCB is necessary not only because of the large number of connections that have to be made in a small space, but also because it allows tracks that need to be isolated from each other to be put on opposite sides of the board. A most important consideration is to keep digital signals, particularly fast ones such as clocks, out of the analog inputs, so use as much physical spacing between these as possible. Critical tracks on opposite sides of the board should be run at right angles to each other to minimize coupling through the PCB. Do not run digital tracks topside under the IC as they may couple noise directly into the die from underneath.

Separate analog and digital ground planes should be used. Most conversion ICs have their analog and digital interfaces at opposite ends or opposite sides of the package, facilitating the use of separate ground planes. It is usually best to run the analog ground plane under the IC to minimize the coupling of digital noise. The two ground planes must of course be connected together at some point, and this should be implemented by a single junction close to the IC. Some manufacturers (e.g. Analog Devices) recommend that the junction should be made through a ferrite bead to filter out high RF frequencies. A maximum-copper (minimum-etch) PCB layout technique is generally the best for ground planes as it gives the most screening possible.

The power supply tracks to the IC should be as wide as possible to give low-impedance paths and reduce the voltage effects of current glitches on the power-supply lines. Ideally a four-layer PCB (and such boards are now cheaper than they have ever been) should be used so that two layers can be devoted to power-supply planes.

Thorough decoupling is always important when using high-speed devices such as ADCs and DACs. All analog and digital supplies should be decoupled to analog ground and digital ground respectively, using 0.1 μF ceramic capacitors in parallel with 10 μF electrolytic capacitors. Some manufacturers recommend using tantalum capacitors for this. To achieve the best possible decoupling, the capacitors should be placed as physically close to the IC as possible and solidly connected to the relevant ground plane.

When you are designing ADCs or DACs into a system, my experience is that significant time can be saved by doing preliminary testing on manufacturers’ evaluation boards; this has particular force when you are using parts from a range you have not used before. Higher authority may urge you to go straight to a PCB layout, but unless you are very sure what you are doing – if, for example, you are cutting and pasting from an existing satisfactory design – it is a relatively high-risk approach. Evaluation boards are usually expensive, as they are produced in small quantities, but in my view it is money very well spent.

Nominal Levels and ADCs

The best use of the dynamic range of an ADC is only possible if it is presented with a signal of roughly the right amplitude. Too low a level degrades the signal-to-noise ratio as the top bits are not used, and too high a level will not only cause unpleasant-sounding digital clipping, but can cause damage to the ADC if current flows are not limited. Analog circuitry is therefore needed to scale the signal to the right amplitude.

A typical application of ADCs is in digital mixing consoles. These must accept both microphone and line-input levels. Since the signal level from a microphone may be very low (lute music) or quite high (microphone in the kick-drum), an input amplifier with a wide variable gain range is required, typically 70 dB and sometimes as much as 80 dB. The signal level range of line signals is less but still requires a gain range of some 30 dB to cope with all conditions. It is therefore necessary for the operator to adjust the input gain, by reference to a level meter, so that good use is made of the available dynamic range without risking clipping. In live situations with unpredictable levels this is always something of a judgement call.

The signal level required at the ADC input to give maximum output, which is usually referred to as full scale (FS), varies from manufacturer to manufacturer; this important point is brought out in the next section.

Some Typical ADCs

There are a large number of ADCs on the market, and it is necessary to pick out just a few to look at. You will note that the various parts are actually very similar in their application. The inclusion of a device here does not mean that I am giving it any personal recommendation. All the devices mentioned are capable of 24-bit 192 kHz operation. In some cases the input voltage required for FS appears to exceed the supply voltage; this is not so, the quoted peak-to-peak voltage is the difference between two differential input pins. And now in alphabetical order:

The Analog Devices AD1871 is a stereo audio ADC with two 24-bit conversion channels each giving 105 dB of dynamic range, and each having a programmable gain amplifier (PGA) at the front end, a multi-bit sigma-delta modulator, and decimation filters. The digital details are rather outside our scope here and will not be alluded to further. The PGA has five gain settings ranging from 0 to 12 dB in 3-dB steps. The differential input required for FS is 2.828 Vpk-pk and the input impedance is 8 kΩ. Like most of its kind, the AD1871 runs its analog section from +5 V, but the digital section from +3.3 V to save power. This IC is unusual in that it is permissible to run the digital section from +5 V, which can save you a regulator.

The Analog Devices AD1974 is a quad ADC with four differential analog inputs having a very useful CMRR of 55 dB (typical, at both 1 and 20 kHz). These inputs are not buffered and require special interfacing, which will be described later. A differential input of 5.4 Vpk-pk is needed for FS; the input impedance is 8 kΩ. This IC runs from +3.3 V only.

The Burr-Brown PCM1802 is a stereo ADC with single-ended analog voltage inputs with input buffer amplifiers. It requires 3.0 Vpk-pk to reach FS and has a resistive input impedance of 20 kΩ. The analog section is powered from +5 V, the digital section from +3.3 V.

The Wolfson WM8782 is a stereo ADC with two single-ended analog inputs with buffer amplifiers. It requires 2.82 Vpk-pk (1.0 Vrms) to reach FS and the input impedance is 10 kΩ. The analog section is powered from +5 V and the digital core from +3.3 V.

Interfacing with ADC Inputs

The issues involved in interfacing with an ADC depend very much on how the ADC input is configured. As we saw in the previous section, some ADCs, such as the Burr-Brown PCM1802 and the Wolfson WM8782, have internal buffer amplifiers that present a relatively high impedance to the outside world (in this case 20 and 10 kΩ respectively). These inputs are very straightforward to drive. Such buffers are usually only found in ADCs made in a bipolar or bi-CMOS process, as making good low-noise, low-distortion amplifiers in a straight CMOS technology is very difficult.

Others, such as the AD1974, do not have buffering and must be driven from special circuitry. In the case of the AD1974 and similar devices, the differential inputs must be driven from a differential signal source to get the best performance. The basic principle is shown in Figure 21.1. The input pins connect to switched internal capacitors, and these generate glitches. Each input pin must be isolated from the op-amp driving it by an external series resistor R5, R6 together with a capacitor C5, C6 connected from input to ground. This capacitor must not generate non-linearity when the voltage across it changes, so ceramic NP0 or polypropylene film types must be used; recommended values for the resistors and capacitors are usually given in the application notes. Note that since the external op-amps are referenced to ground, and the ADC internals are referenced to half the +5 V rail, blocking capacitors C2, C3 are needed.

Figure 21.1: A typical drive circuit for an unbuffered differential ADC input

Adding external resistance will slow down the charging of input sampling capacitors. These must be allowed to charge for many time-constants if they are to get close enough to the final value to avoid degrading the performance. External resistance increases the time-constant and can degrade accuracy; manufacturers usually provide guidance as to how much external resistance is permissible for a given number of bits of accuracy.

A point that is obvious but easily overlooked is that the inputs must not be driven to excessive levels. This usually means that the input voltage should not go outside the supply rails by more than 300 mV; for example, Wolfson specify this restriction for both the analog and digital inputs of the WM8782 stereo ADC, and other manufacturers quote similar ratings.

While ADC inputs invariably have clamp diodes for ESD protection that are intended to prevent the inputs moving outside the supply rails, these are small-dimensioned devices that may be destroyed by the output current capability of an op-amp. This is why the input voltage should not go outside the supply rails by more than 300 mV – this voltage will not cause a silicon diode to conduct significantly, even at elevated temperatures. The diodes can usually handle 5 mA, but to subject them to anything more is to live dangerously. Obviously the manufacturer’s absolute maximum ratings should be followed on this point, but not all manufacturers give a current rating for their clamp diodes.

Bulletproof protection against input over-voltages is given by running the driving op-amp from the same supply rails as the analog section of the ADC, the op-amp saturation voltages ensuring that the input can never reach the supply rails, never mind exceed them. This does, however, restrict your choice of op-amp to one that is happy working on low supply voltages; these are likely to be more expensive than the popular audio op-amps such as the 5534/5532, which will not give good performance from such low rails.

If you want to stick with the usual audio op-amps, working from higher supply rails than the ADC, then an effective means of protection is the use of external clamping diodes, which in conjunction with a series resistance will limit the voltage swing at the ADC input. The principle is shown in Figure 21.2; if the op-amp output exceeds +5 V then D1 will conduct, while if it goes negative of 0 V D2 will conduct, safely clamping the ADC input.

Figure 21.2: Diode clamping circuit to prevent overdriving an ADC input. Note that the diodes must be Schottky types

A vital point here is that the clamp diodes must be of the Schottky type, so their forward voltage is substantially less than that of the conventional silicon diodes on-chip, for otherwise they will give little or no protection. The on-chip diodes will be warmer and would conduct before conventional external silicon diodes.

R1 must be large enough to limit the current in D1, D2 to safe levels, but not so large that it causes a roll-off with the ADC input capacitance. It must also not be so large that the nonlinear capacitance of the diodes causes significant non-linearity; 1 kΩ should be safe in this respect. Note that R1 is also useful in isolating the op-amp output from the ADC input capacitance, which can otherwise erode stability margins.

Some Typical DACs

Unlike ADCs, DACs come in two different types – voltage output and current output. Both types of output require some kind of low-pass filtering, but current output DACs also need current-to-voltage (IV) conversion stages. There are a large number of DACs on the market, and it is essential to be selective in examining a few typical devices. Once again, the inclusion of a device here does not mean that I am giving it my personal recommendation. All the devices mentioned here are capable of 24-bit operation. And now in alphabetical order:

The Analog Devices AD1854 is a stereo audio DAC delivering 113 dB dynamic range and 112 dB SNR (A-weighted) at a 48 kHz sample rate. Maximum sample rate is 96 kHz. Differential analog voltage outputs give a maximum output of 5.6 Vpk-pk at FS and the output impedance is less than 200 Ω. It operates from a single +5 V supply rail, though there are separate supply pins for the analog and digital sections.

The Texas PCM1794A is a stereo audio DAC supporting sample rates up to 192 kHz. It has differential analog current outputs giving a maximum of 7.8 mApk-pk at FS. The analog section is powered from +5 V, the digital section from +3.3 V.

The Wolfson WM8740 is a stereo audio DAC supporting word lengths from 16 to 24 bits and sample rates up to 192 kHz. Differential analog voltage outputs give a maximum output of 2.82 Vpk-pk at FS. It can operate from a single +5 V supply rail, or the digital section can be run from +3.3 V to reduce power consumption.

Interfacing with DAC Outputs

Modern DACs use oversampling so that brickwall reconstruction filters are not necessary at the analog outputs. Nonetheless, some low-pass filtering is essential to remove high-frequency components from the output that could cause trouble downstream.

If you are using a DAC with a current output, the first thing you have to do is convert that current to a voltage. This is usually done with a shunt-feedback stage as shown in Figure 21.3, frequently called an I–V converter. The op-amp most popular for this job (and in fact explicitly recommended for the Texas PCM1794A) is no less than our old friend the 5534/5532. The filter capacitors C1, C2 keep down the slew rate required at the outputs of the I–V converters, and with their parallel resistors give a −3 dB roll-off at 88.2 kHz. The current output is simply scaled by the value of R1, R2 and results in a voltage output of 3.20 Vpk for 3.9 mApk out (half of the total 7.8 mApk-pk FS output) and when the two anti-phase voltages are combined in the differential amplifier that follows the total output is 6.4 Vpk or 4.5 Vrms. The differential amplifier has its own HF roll-off at 151 kHz to give further filtering, implemented by C3 and C4. The capacitors used must be linear; NP0 ceramic, polystyrene, or polypropylene are the only types suitable.

Figure 21.3: A typical output stage for a current-output DAC, with IV converters and differential output filter

Voltage output DACs are somewhat simpler to apply as there is no need for I–V converters and the outputs can drive an active low-pass filter directly. The output is usually differential to obtain enough voltage-swing capability within the limited supply voltage available, so differential to single-ended conversion is still required, and this is often cunningly implemented in the form of a differential low-pass filter.

Figure 21.4 shows a typical differential low-pass filter system; it has a third-order Bessel characteristic with a corner frequency of 92 kHz. The outputs are combined, and the first two poles are implemented by the differential multiple-feedback filter around U1:A and the third pole is produced by the passive network R7, C5. Note that the circuitry uses E96 resistor values in order to obtain the desired accuracy. Multiple-feedback filters are often preferred for this kind of application because they do not suffer from the failure of attenuation at very high frequencies that afflicts Sallen-and-Key filters, due to the inability of the op-amp to maintain a low impedance at its output when its open-loop gain, and hence its feedback factor, has fallen to a low value.

Figure 21.4: A typical output stage for a voltage-output DAC, with a differential output filter

It must not be assumed from this that all DACs have differential outputs. For example, the Wolfson WM8726, described as a ‘low-cost stereo DAC’, has single-ended voltage outputs; it is recommended they are followed by a second-order low-pass filter.

Small Signal Audio Design; ISBN: 9780240521770

Copyright © 2010 Elsevier Ltd; All rights of reproduction, in any form, reserved.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.200.86