Você está na página 1de 8

Digital-to-analog converter

In electronics, a digital-to-analog converter (DAC or D-to-A) is a device for converting a digital (usually binary) code to an analog signal (current, voltage or electric charge). Digital-to-analog converters are the interface between the abstract digital world and the analog real life. Simple switches, a network of resistors, current sources or capacitors may implement this conversion. An analog-to-digital converter (ADC) performs the reverse operation. A DAC usually only deals with pulse-code modulation (PCM)-encoded signals. The job of converting various compressed forms of signals into PCM is left to codecs.

Basic ideal operation

Ideally sampled signal.


The DAC fundamentally converts finite-precision numbers (usually fixed-point binary numbers) into a physical quantity, usually an electrical voltage. Normally the output voltage is a linear function of the input number. Usually these numbers are updated at uniform sampling intervals and can be thought of as numbers obtained from a sampling process. These numbers are written to the DAC, sometimes along with a clock signal that causes each number to be latched in sequence, at which time the DAC output voltage changes rapidly from the previous value to the value represented by the currently latched number. The effect of this is that the output voltage is held in time at the current value until the next input number is latched resulting in a piecewise constant output. This is equivalently a zero-order hold operation and has an effect on the frequency response of the reconstructed signal.

Piecewise constant signal typical of a practical DAC output.

The fact that practical DACs do not output a sequence of dirac impulses (that, if ideally low-pass filtered, result in the original signal before sampling) but instead output a sequence of piecewise constant values or rectangular pulses, means that there is an inherent effect of the zero-order hold on the effective frequency response of the DAC resulting in a mild roll-off of gain at the higher frequencies (a 3.9224 dB loss at the Nyquist frequency). This zero-order hold effect is a consequence of the hold action of the DAC and is not due to the sample and hold that might precede a conventional analog to digital converter as is often misunderstood.

Applications
Audio Most modern audio signals are stored in digital form (for example MP3s and CDs) and in order to be heard through speakers they must be converted into an analog signal. DACs are therefore found in CD players, digital music players, and PC sound cards. Specialist stand-alone DACs can also be found in high-end hi-fi systems. These normally take the digital output of a CD player (or dedicated transport) and convert the signal into a line-level output that can then be fed into a pre-amplifier stage. Some of these can also be made to interface with computers using a USB interface. Video Video signals from a digital source, such as a computer, must be converted to analog form if they are to be displayed on an analog monitor. As of 2006, analog inputs are more commonly used than digital, but this may change as flat panel displays with DVI become more widespread. The DAC is usually integrated with some memory (RAM), which contains conversion tables for gamma correction, contrast and brightness, to make a device called a RAMDAC.

A device that is distantly related to the DAC is the digitally controlled potentiometer, used to control an analog signal digitally.

DAC types
The most common types of electronic DACs are: Pulse Width Modulator The Pulse Width Modulator, the simplest DAC type. A stable current or voltage is switched into a low pass analog filter with a duration determined by the digital input code. This technique is often used for electric motor speed control, and is now becoming common in high-fidelity audio. Oversampling Oversampling DACs such as the Delta-Sigma DAC, 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 as it is inherently linear. The DAC is driven with a pulse density modulated signal, created through negative feedback. The negative feedback will act as a high-pass filter for the quantization (signal processing) noise, thus pushing this noise out of the pass-band. Most very high resolution DACs (greater than 16 bits) are of this type due to its high linearity and low cost. Higher oversampling rates 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, 192kHz) and resolutions of 24 bits are attainable with Delta-Sigma DACs. A short comparison with pulse width modulation shows that an 1-bit DAC would have to run at 3 THz to archive this numbers, if it uses an integrator. An integrator acts as a low pass filter with a 1/frequency fall of. This is called a first order Delta-Sigma modulator. It has a step-impulse response function and if resampling with an ADC, all DAC-samples between two ADC-samples just sum up. A steeper fall of in frequencies means a softened step response function. If resampling with an ADC, DAC-samples a long time before the ADC sample have a greater weight then those just prior to the ADC-sample. The former play the role of the most significant bits, the latter play the role of the least significant bits and a higher resolution for a given oversampling is possible. These are called higher order topologies such as MASH - 'Multi stage' noise shaping.

The R/2nR DAC This DAC circuit, otherwise known as the binary-weighted-input DAC, is a variation on the inverting summer op-amp circuit. If you recall, the classic inverting summer circuit is an operational amplifier using negative feedback for controlled gain, with several voltage inputs and one voltage output. The output voltage is the inverted (opposite polarity) sum of all input voltages:

For a simple inverting summer circuit, all resistors must be of equal value. If any of the input resistors were different, the input voltages would have different degrees of effect on the output, and the output voltage would not be a true sum. Let's consider, however, intentionally setting the input resistors at different values. Suppose we were to set the input resistor values at multiple powers of two: R, 2R, and 4R, instead of all the same value R:

Starting from V1 and going through V3, this would give each input voltage exactly half the effect on the output as the voltage before it. In other words, input voltage V1 has a 1:1 effect on the output voltage (gain of 1), while input voltage V2 has half that much effect on the output (a gain of 1/2),

and V3 half of that (a gain of 1/4). These ratios are were not arbitrarily chosen: they are the same ratios corresponding to place weights in the binary numeration system. If we drive the inputs of this circuit with digital gates so that each input is either 0 volts or full supply voltage, the output voltage will be an analog representation of the binary value of these three bits.

If we chart the output voltages for all eight combinations of binary bits (000 through 111) input to this circuit, we will get the following progression of voltages:
--------------------------------| Binary | Output voltage | --------------------------------| 000 | 0.00 V | --------------------------------| 001 | -1.25 V | --------------------------------| 010 | -2.50 V | --------------------------------| 011 | -3.75 V | --------------------------------| 100 | -5.00 V | --------------------------------| 101 | -6.25 V | --------------------------------| 110 | -7.50 V | --------------------------------| 111 | -8.75 V | ---------------------------------

The R/2R DAC An alternative to the binary-weighted-input DAC is the so-called R/2R DAC, which uses fewer unique resistor values. A disadvantage of the former DAC design was its requirement of several different precise input resistor values: one unique value per binary input bit. Manufacture may be simplified if there are fewer different resistor values to purchase, stock, and sort prior to assembly.

Of course, we could take our last DAC circuit and modify it to use a single input resistance value, by connecting multiple resistors together in series:

Unfortunately, this approach merely substitutes one type of complexity for another: volume of components over diversity of component values. There is, however, a more efficient design methodology. By constructing a different kind of resistor network on the input of our summing circuit, we can achieve the same kind of binary weighting with only two kinds of resistor values, and with only a modest increase in resistor count. This "ladder" network looks like this:

Mathematically analyzing this ladder network is a bit more complex than for the previous circuit, where each input resistor provided an easily-calculated gain for that bit. For those who are interested in pursuing the intricacies of this circuit further, you may opt to use Thevenin's theorem for each binary input (remember to consider the effects of the virtual ground), and/or use a simulation program like SPICE to determine circuit response. Either way, you should obtain the following table of figures:
---------------------------------

| Binary | Output voltage | --------------------------------| 000 | 0.00 V | --------------------------------| 001 | -1.25 V | --------------------------------| 010 | -2.50 V | --------------------------------| 011 | -3.75 V | --------------------------------| 100 | -5.00 V | --------------------------------| 101 | -6.25 V | --------------------------------| 110 | -7.50 V | --------------------------------| 111 | -8.75 V | ---------------------------------

DAC performance
DACs are at the beginning of the analog signal chain, which makes them very important to system performance. The most important characteristics of these devices are: Resolution: This is the number of possible output levels the DAC is designed to reproduce. This is usually stated as the number of bits it uses, which is the base two logarithm of the number of levels. For instance a 1 bit DAC is designed to reproduce 2 (21) levels while an 8 bit DAC is designed for 256 (28) levels. Resolution is related to the Effective Number of Bits (ENOB) which is a measurement of the actual resolution attained by the DAC. Maximum sampling frequency: This is a measurement of the maximum speed at which the DACs circuitry can operate and still produce the correct output. As stated in the Shannon-Nyquist sampling theorem, a signal must be sampled at over twice the bandwidth of the desired signal. For instance, to reproduce signals in all the audible spectrum, which includes frequencies of up to 20 kHz, it is necessary to use DACs that operate at over 40 kHz. The CD standard samples audio at 44.1 kHz, thus DACs of this frequency are often used. A common frequency in cheap computer sound cards is 48 kHz - many work at only this frequency, offering the use of other sample rates only through (often poor) internal resampling.

monotonicity: This refers to the ability of DACs analog output to increase with an increase in digital code or the converse. This characteristic is very important for DACs used as a low frequency signal source or as a digitally programmable trim element. THD+N: This is a measurement of the distortion and noise introduced to the signal by the DAC. It is expressed as a percentage of the total power of unwanted harmonic distortion and noise that accompany the desired signal. This is a very important DAC characteristic for dynamic and small signal DAC applications. Dynamic range: This is a measurement of the difference between the largest and smallest signals the DAC can reproduce expressed in Decibels. This is usually related to DAC resolution and noise floor.

Você também pode gostar