As audio quality becomes increasingly important in electronic systems, many more designers must become skilled in the "art" of analog and mixed-signal design. Some designers find this trend intimidating. In truth, though, an amplifier is still just an amplifier. For the amplifiers used in audio, a little more care is taken to ensure the device's performance over the audio band. Keep in mind that a digital device will largely perform to specification—regardless of the devices around it. In an audio-converter chip, however, the system designer must carefully consider the environment that immediately surrounds the chip.
To begin, a designer must clearly identify the audio requirements of the design: Is it an integral feature or a "nice-to-have" add-on? If it's an add-on, absolute performance might not be so critical. Be realistic about the design's performance requirements. It may be nice "specmanship" to have a digital-to-analog converter (DAC) with a -120-dB noise floor in a PDA. But will the rest of the system ever be able to reflect that performance level? Is the battery likely to keep up? Although this example is obviously a contrived one, improperly specifying audio requirements may lead to lower system performance in more areas than just audio.
Many choices must be made when choosing an audio device. Although some choices will be dictated by the end application, others will not. Just a few of this myriad of options are the number of channels, audio sample rate, data-interface type, control-interface type, power supply, package type, and performance.
In general, a PDA will require a DAC to either generate sounds or for MP3 playback. It also may offer voice-recording capabilities, which mandate the choice of a codec (record and playback). The selection of a codec depends on making an analog-to-digital converter (ADC) capable of hi-fi audio performance (at least 44.1 kHz and 16 b). This quality is much higher than the level that's required for voice recording (8/16 b and 8/16 kHz). As a result, the designer must ensure that the chosen codec will support sample and bit rates that are low enough to record voice without creating huge files.
After choosing an audio device that meets his or her functional requirements, the designer must get this device to perform to specification in the system. Generally, any queries that relate to devices not meeting their specified performance can be traced to four sources: failure to read the documentation, clocking problems, or issues with the printed-circuit-board (PCB) layout, external components, or signal timing.
Undoubtedly, the biggest of these problems is the datasheet. Perhaps as many as 50% of the application inquiries that we receive are answered by our own documentation. The consequences of not understanding a device may not be immediately apparent. One day, however, chances are that a designer will encounter a problem that could have been easily avoided. Problems at this stage tend to relate to having incorrect register writes or signal-timing and clocking-related issues. Any one of these problems is enough to stop a system from running or greatly degrade its performance compared to what was expected.
In addition, the designer must ensure that the signal levels being passed into the audio chip are correct. Say the audio chip has a maximum input swing of 1 V p-p, but the digital signal processor (DSP) outputs a 2-V p-p signal. A divider network is needed to pad down the incoming signal, thereby ensuring that the converter chip will not clip its outputs.
Obviously, the single biggest factor that will affect any system's audio quality is noise. Noise can be introduced to the system from many places, such as poorly designed power supplies, badly routed signals, ill-chosen external components, bad clocks, or poor signal timing. All of these elements can lead to drastic reductions in expected performance.
Problems also arise from the pressure to design all products to a cost. Designers must recognize the point at which cost cutting makes it impossible to maintain performance. With a careful printed-circuit-board layout and sensible component choices, incorporating an audio device shouldn't be too traumatic.
Good PCB design and layout is one of the simplest ways to help reduce system noise ingress. Digital-to-analog converters, analog-to-digital converters, and codecs all have both digital and analog interfaces. Noise must be minimized in order to get the maximum converter performance. To minimize interference between digital and analog signals, try to view the PCB in analog and digital blocks. Keep these blocks as far apart physically as is practical.
Analog and digital tracks should never be run side by side. If digital signal tracks must be run through analog parts of the board, spacing should be as generous as possible to help avoid interference. Keep the analog output tracks as short as possible and far enough apart to allow some grounding between them (unless they are differential audio tracks).
When using differential audio in a design, keep both the positive and negative track lengths as close to the same as possible. Power and analog tracks should always be made larger than the other tracks on the board. Digital tracks should never be any smaller than 8thou on the PCB with 10thou being recommended. Analog and power tracks should be 10 to 50thou. For analog and power, the recommendations are 20thou and 30thou, respectively. Where vias are used in tracks, it's a good idea to keep the track width the same as the via's diameter.
Now, consider the grounding of the integrated circuit (IC). Ideally, the circuit board will have a single continuous groundplane with all of the ground pins connected to it. The components will be located in such a way that high-speed digital devices are kept away from analog devices. They also will be placed so that noise currents don't stray where they aren't wanted.
In some cases, a cut is required between the analog and digital planes because the component positions cannot be optimized. The analog and digital grounds must then be connected under the converter with a wide copper track. (Merely using a 0-Ω link may not always provide a good enough connection.)
Make sure that any tracks going from the board's analog section to the digital section (e.g., data lines and clocks) are tracked over the ground connection—not the cut. This approach will minimize loop area for the return currents. Converter manufacturers try to guarantee a pinout, which makes sure that the tracks only need to go over the appropriate groundplane. If other high-speed currents (including ESD currents) are flowing between analog and digital grounds, verify that it isn't the only connection between them. Otherwise, the converter's performance will be made worse by potential noise induction into the device.
Voltage sources are another factor that can complicate audio performance. The reference voltage that's used by the converter chips (whether externally supplied or internally generated) can significantly degrade system performance. Steps must therefore be taken to ensure that the power and reference supplies to the chip are very clean. The high-frequency contamination of these references will allow high-frequency quantization noise to be demodulated into the baseband.
Generally, converter chips have a number of supply pins on each chip. They are labeled according to their internal connection—not necessarily how they should be connected externally. If the noise levels aren't too high, digital supply pins can be connected to the main digital supply rail. (Usually, "high" means greater than 0.1 mV.) If there's no nearby digital supply or it's too noisy, one can be made from the analog supply using an LC filter. This approach will make sure that the noise doesn't go back to the analog supply (FIG. 1).
Be sure to place a 0.1-µF, multi-layer ceramic capacitor close to each of these pins (within 3 mm). Such placement will decouple them properly to DGND. If there's no large-value capacitor within 50 mm, add one 10-µF, low-ESR capacitor per rail. This capacitor can be multi-layer ceramic, low-ESR tantalum, or a low-ESR organic semiconductor electrolytic type. For best performance, check that the capacitor datasheet shows that the part has less than 200 mΩ ESR.
In contrast, analog supply pins must be connected to a low-noise analog supply rail. Ideally, this rail will come from a low-noise linear regulator. Some devices have internal supplies or references that require external decoupling. Here, the pins only connect to a capacitor—not to an external supply. For capacitor choice, use the same guidelines that were applied to digital decoupling.
Note that the supply connections should be made with planes on a multi-layer circuit board. If these planes are on adjacent layers, the parasitic capacitance of the layers will further improve high-frequency decoupling. If it isn't possible to make these connections, use tracks that are much wider than the current rating requires (FIG. 2).
Now that this article has examined the importance of PCB layout and component placement, it's time to take a look at the impact of some components on system performance. The aim is to show the limitations that are imposed on component choice by trading off cost versus performance. The components are described below:
- Power supplies: There may be excessive noise on a power supply, such as the noise that's present in a commercial DVD receiver with motors and switching amplifiers. As a result, additional filtering will be required. Because the reference voltage for the DAC has little supply-noise rejection, any noise on this pin will affect the DAC outputs. There isn't much current drawn on this supply pin. Yet the supply AVDD does have supply rejection. It draws most of the analog supply current (FIG. 3).
When powering devices, a problem can arise if the system doesn't have any supplies within the manufacturer's limits for the device. Thankfully, a trick can be employed in this scenario. It may be possible to use diodes to get the supply within limits (0.7 V drop per diode).
- De-coupling capacitors: There is a relentless pursuit to reduce the size and cost of external capacitors. This trend is most prevalent within space-constrained portable equipment with audio capabilities. As a result, portable devices have less and less space available for new circuitry. The question that is commonly asked is: "Can the headphone coupling capacitor be a smaller value and therefore size?" The simple answer is maybe, but only at a reduction in frequency response (FIG. 4).
- Headphone output: The common load impedance for a standard stereo-headphone set is in the region of 4 to 32 W. Usually, additional load should be added. It will protect the audio output stage of the DAC device when no other load is connected. These extra load resistors are in a range that's greater than 10 kW. The range also is parallel with the much smaller headphone impedance. As a result, the overall output impedance—RL—won't differ very much from the small headphone impedance. The impedance of these load resistors on Wolfson Evaluation Boards is usually 47 kW as demonstrated by R43 and R45 in FIGURE 5. Note that C57 and C58 represent C1 and C2 from Figure 1.
Most DAC devices provide an audio output that has a dc component. Usually, this component resides at the mid-rail analog supply voltage. The main role of the capacitor, which links the audio output of the DAC device and jack socket, is for dc blocking. By including this capacitor, the designer introduces a side effect: A high-pass filter is produced at the output. To maintain a satisfactory audio bandwidth, this filter needs to have a sensible, low-frequency cutoff in the lower auditory range of the human ear.
The frequency response of the output is determined by the well-known formula:
where RL is the sum of both the headphone and the output load resistor impedances. CC is the coupling capacitor. fC is the low-frequency cutoff.
Note that the audio-output coupling capacitor performs best with a value greater than 100 µF. The table shows some examples of the cutoff frequencies that are expected in common headphone output circuits.
As the coupling-capacitor value increases, frequency response does improve. This improvement is shown in FIGURES 6a, 6b, 6c, and 6d. Figure 6a shows a reference plot with no load. The other plots were measured using a 0-dBFS input signal and a standard 32-W load. The dotted lines depict the 3-dB low-frequency cutoff point. As expected, the cutoff frequency decreases inversely with capacitor value.
Now that the optimal frequency-response scenario has been explained, the question is still whether a reduction can be made in coupling capacitor size to allow space/cost savings. Clearly, any reduction in capacitor value will affect audio bandwidth performance. The designer must therefore decide whether a reduction in performance is acceptable. The following information may assist in making this decision:
- Headphone quality: Poorer-quality headphones generally have poorer frequency response. If it's likely that such headphones will be used, the low-frequency cutoff at the audio output can be compromised to match that of the headphones. The risk is that there's always the possibility that a good-quality headphone and keen hearing will reveal this lack of quality.
- Auditory response: The response of the human ear—the auditory response—is often not as sensitive or as linear as some good-quality headphones. One effect, which is called masking, results from the ability of the ear to interpret louder sounds while masking out the softer ones. Low-frequency sounds below 200 Hz aren't perceived. The same can be said for frequencies from 200 Hz up to 10 kHz.
Another source of assistance comes from the wavelength of sounds at low frequencies. The brain determines distance by delay. Because low frequencies have long wavelengths, sound is perceived at the ears at the same time. This delay isn't available at long wavelengths, however. As a result, the source cannot be pinpointed. At higher frequencies, delay and therefore direction are much more noticeable. Higher-frequency sounds are therefore perceived more strongly than low-frequency ones. For this reason, sub-woofers can effectively be placed anywhere in a room.
To achieve optimal device and frequency performance, the audio-output AC coupling/DC blocking capacitor should be large (in the range 100 to 1000 µf). For headphones, a 220-µF capacitor gives optimal performance versus size benefits. If this arrangement is compromised, any reduction in performance cannot generally be attributed to the audio device's performance.
In many current portable-device designs, size and board space are at a premium. As a result, designers often ask if the recommended large, tantalum, Vmid reference-voltage capacitor can be reduced in value and therefore size. The simple answer is that this approach is not advised if stability on the audio output is to be maintained.
The effects of changing the value of the Vmid capacitor are shown in three figures. FIGURE 7 is the recommended case of a 10-µF tantalum capacitor. After the analog power supply is applied, the audio output increases slowly. Yet it remains stable. This slow rise time, which is in the region of 1 to 2 sec., won't be an issue in virtually all design scenarios. Other setup functions, such as processor bootup times, will take significantly longer to complete.
FIGURE 8 uses a 1-µF tantalum capacitor. The audio output increases more rapidly after the analog power supply is applied. The stability of the audio output is affected, however. The settling time of the audio output is not significantly faster than it was in the 10-µF case.
Unlike the previous two figures, FIGURE 9 doesn't use a capacitor. After the analog power supply is applied, the audio output increases more rapidly. But the audio output's stability is affected. The settling time of the audio output isn't significantly faster than in the 10-µF case.
It is possible to compromise component selection, but only when the consequences of those compromises are fully understood. Most audio-converter suppliers will offer a PCB layout and schematic-review service. Such a service may be needed if the designer is unsure of the system implication of some design choices. Regardless, a little time spent on component choices could prevent costly mistakes that would ultimately make the project take longer. For first-time-right design, read the documentation. Carefully approach the board layout, external components, clocking, and power sources. This tack should pretty much guarantee the performance that "it says on the can" the first time, every time.