Digital-electronics 简明教程

Digital to Analog Converter

Digital to Analog Converter (DAC) 将数字输入信号转换成模拟输出信号。数字信号用二进制代码表示,它是由比特 0 和 1 的组合形成的,而模拟信号是一个连续的时间函数。

A Digital to Analog Converter (DAC) converts a digital input signal into an analog output signal. The digital signal is represented with a binary code, which is a combination of bits 0 and 1 while the analog signal is a continuous time function.

本章详细介绍了数模转换器。DAC 框图显示在下图中——

This chapter deals with Digital to Analog Converters in detail. The block diagram of DAC is shown in the following figure −

digital to analog converter

数模转换器 (DAC) 具有多个二进制输入和一个单输出。一般来说,DAC 的二进制输入数量将是 2 的幂。

A Digital to Analog Converter (DAC) consists of a number of binary inputs and a single output. In general, the number of binary inputs of a DAC will be a power of two.

Types of Digital to Analog Converters

根据构造和结构,有两种数字到模拟转换器,即——

Depending on the construction and structure, there are two types of digital to analog converters, they are −

  1. Weighted Resistor DAC

  2. R-2R Ladder DAC

以下章节详细介绍了这两种类型的 DAC。

The following sections discuss about these two types of DACs in detail.

Weighted Resistor DAC

加权电阻 DAC 通过在反相加法器电路中使用二进制加权电阻产生一个模拟输出,几乎等于数字(二进制)输入。简而言之,二进制加权电阻 DAC 称为加权电阻 DAC。

A weighted resistor DAC produces an analog output, which is almost equal to the digital (binary) input by using binary weighted resistors in the inverting adder circuit. In short, a binary weighted resistor DAC is called as weighted resistor DAC.

3 位二进制加权电阻 DAC 的电路图如下图所示——

The circuit diagram of a 3-bit binary weighted resistor DAC is shown in the following figure −

weighted resistor dac

回想一下,二进制数字的比特只能有两种值中的一个。即 0 或 1。令 3 位二进制输入为 b2b1b0。这里,比特 b2 和 b0 分别表示最高有效位 (MSB) 和最低有效位 (LSB)。

Recall that the bits of a binary number can have only one of the two values. i.e., either 0 or 1. Let the 3-bit binary input is b2b1b0. Here, the bits b2 and b0 denote the Most Significant Bit (MSB) and Least Significant Bit (LSB) respectively.

当对应的输入位等于“0”时,上图中所示的数字开关将连接到接地点。同样,当对应的输入位等于“1”时,上图中所示的数字开关将连接到负参考电压 -VR。

The digital switches shown in the above figure will be connected to ground, when the corresponding input bits are equal to '0'. Similarly, the digital switches shown in the above figure will be connected to the negative reference voltage, −VR when the corresponding input bits are equal to '1'.

在上面的电路中,运放的非反相输入端连接到接地。这意味着运放的非反相输入端施加零伏特电压。

In the above circuit, the non-inverting input terminal of an op-amp is connected to ground. That means zero volts is applied at the non-inverting input terminal of op-amp.

根据虚拟短路概念,运放反相输入端的电压与非反相输入端的电压相同。因此,反相输入端节点的电压将为零伏特。

According to the virtual short concept, the voltage at the inverting input terminal of op-amp is same as that of the voltage present at its non-inverting input terminal. So, the voltage at the inverting input terminal’s node will be zero volts.

反相输入端节点的节点方程为−

The nodal equation at the inverting input terminal’s node is −

\mathrm{\frac{0 \: + \: V_{R}b_{2}}{2^{0}R} \: + \: \frac{0 \: + \: V_{R}b_{1}}{2^{1}R} \: + \: \frac{0 \: + \: V_{R}b_{0}}{2^{2}R} \: + \: \frac{0 \: - \: V_{0}}{R_{f}} \: = \: 0}

\mathrm{\Rightarrow \: \frac{V_{0}}{R_{f}} \: = \: \frac{V_{R}b_{2}}{2^{0}R} \: + \: \frac{V_{R}b_{1}}{2^{1}R} \: + \: \frac{V_{R}b_{0}}{2^{2}R}}

\mathrm{\Rightarrow \: V_{0} \: = \: \frac{V_{R}R_{f}}{R}(\frac{b_{2}}{2^{0}} \: + \: \frac{b_{1}}{2^{1}} \: + \: \frac{b_{0}}{2^{2}})}

在上式中代入 R = 2Rf,得到

Substituting, R = 2Rf in the above equation,

\mathrm{V_{0} \: = \: \frac{V_{R}R_{f}}{2R_{f}}(\frac{b_{2}}{2^{0}} \: + \: \frac{b_{1}}{2^{1}} \: + \: \frac{b_{0}}{2^{2}})}

\mathrm{\therefore \: V_{0} \: = \: \frac{V_{R}}{2}(\frac{b_{2}}{2^{0}} \: + \: \frac{b_{1}}{2^{1}} \: + \: \frac{b_{0}}{2^{2}})}

上述方程表示 3 位二进制加权电阻 DAC 的输出电压方程。由于二进制(数字)输入中的位数为三,对于固定的基准电压 VR,通过将二进制输入从 000 变为 111,我们将获得七个可能的输出电压值。

The above equation represents the output voltage equation of a 3-bit binary weighted resistor DAC. Since the number of bits are three in the binary (digital) input, we will get seven possible values of output voltage by varying the binary input from 000 to 111 for a fixed reference voltage, VR.

我们可以根据 3 位二进制加权电阻 DAC 的输出电压方程,写出一个 N 位二进制加权电阻 DAC 的广义输出电压方程,如下所示。

We can write the generalized output voltage equation of an N-bit binary weighted resistor DAC as shown below based on the output voltage equation of a 3-bit binary weighted resistor DAC.

\mathrm{\therefore \: V_{0} \: = \: \frac{V_{R}}{2}(\frac{b_{N-1}}{2^{0}} \: + \: \frac{b_{N-2}}{2^{1}} \: + \dotso \: + \: \frac{b_{0}}{2^{N-1}})}

Disadvantages of Weighted Resistor DAC

二进制加权电阻 DAC 的缺点如下−

The disadvantages of the binary weighted resistor DAC are as follows −

  1. The difference between the resistance values corresponding to LSB & MSB will increase as the number of bits present in the digital input increases.

  2. It is difficult to design more accurate resistors as the number of bits present in the digital input increases.

R-2R Ladder DAC

R-2R 电阻梯形 DAC 克服了二进制加权电阻 DAC 的缺点。顾名思义,R-2R 电阻梯形 DAC 使用反相加法器电路中的 R-2R 电阻梯形网络,产生一个模拟输出,该模拟输出几乎等于数字(二进制)输入。

The R-2R Ladder DAC overcomes the disadvantages of a binary weighted resistor DAC. As the name suggests, R-2R Ladder DAC produces an analog output, which is almost equal to the digital (binary) input by using a R-2R ladder network in the inverting adder circuit.

3 位 R-2R 电阻梯形 DAC 的电路图如下图所示 −

The circuit diagram of a 3-bit R-2R Ladder DAC is shown in the following figure −

r 2r ladder dac

回想一下,二进制数字的比特只能有两种值中的一个。即 0 或 1。令 3 位二进制输入为 b2b1b0。这里,比特 b2 和 b0 分别表示最高有效位 (MSB) 和最低有效位 (LSB)。

Recall that the bits of a binary number can have only one of the two values. i.e., either 0 or 1. Let the 3-bit binary input is b2b1b0. Here, the bits b2 and b0 denote the Most Significant Bit (MSB) and Least Significant Bit (LSB) respectively.

当相应的输入位等于“0”时,上图所示的数字开关将连接到地。同样,当相应的输入位等于“1”时,上图所示的数字开关将连接到负基准电压 −VR。

The digital switches shown in the above figure will be connected to ground, when the corresponding input bits are equal to '0'. Similarly, the digital switches shown in above figure will be connected to the negative reference voltage, −VR when the corresponding input bits are equal to '1'.

很难得到 R-2R 电阻梯形 DAC 的广义输出电压方程。但是,我们可以轻松地找到 R-2R 电阻梯形 DAC 的模拟输出电压值,用于各个二进制输入组合。

It is difficult to get the generalized output voltage equation of a R-2R Ladder DAC. But we can find the analog output voltage values of R-2R Ladder DAC for individual binary input combinations easily.

Advantages of R-2R Ladder DAC

R-2R 梯形 DAC 的优点如下所示 −

The advantages of a R-2R Ladder DAC are as follows −

  1. R-2R Ladder DAC contains only two values of resistor: R and 2R. So, it is easy to select and design more accurate resistors.

  2. If a greater number of bits are present in the digital input, then we have to include required number of R-2R sections additionally.

由于上述优点,R-2R 梯形 DAC 优于二进制加权电阻 DAC。

Due to the above advantages, R-2R Ladder DAC is preferable over binary weighted resistor DAC.

Important Parameters of DACs

以下是为特定应用选择模数转换器时必须考虑的一些关键参数和因素 −

The following are some key parameters and factors that we must consider while selecting a digital to analog converter for a specific application −

Resolution

数模转换器可以产生的离散输出电平的数量称为其分辨率。为了获得更平滑、更准确的模拟输出信号,数模转换器的分辨率必须非常高。DAC 的分辨率通常以位为单位来衡量。

The number of discrete output levels that a digital to analog converter can produce is known as its resolution. To obtain a smoother and accurate analog output signal, the resolution of the digital to analog converter must be significantly high. The resolution of a DAC is typically measured in bits.

让我们了解 DAC 分辨率的重要性。考虑一个可以处理 8 位的 DAC,它可以表示 28 = 256 个离散输出值。另一方面,如果一个 DAC 可以处理 16 位,那么它可以表示 216 = 65536 个离散输出值。因此,与 8 位 DAC 相比,具有 16 位的 DAC 可以提供更平滑、更准确的模拟格式数字信号的表示。

Let us understand the importance of resolution of DAC. Consider a DAC that can handle 8-bits, it can represent 28 = 256 discrete output values. On the other hand, if a DAC can handle 16-bits, then it is able to represent 216 = 65536 discrete output values. Hence, the DAC with 16-bits can provide a smoother and more accurate representation of the digital signal in analog format as compared to that the 8-bit DAC can do.

Accuracy

模数转换器的精度是对输出模拟信号与输入数字信号的接近程度的度量。DAC 的高精度是产生高精度的模拟输出信号的一个重要因素。

The accuracy of a digital to analog converter is the measure of how closer is the output analog signal to the input digital signal. The high accuracy of DAC is an essential factor to produce a highly precise analog output signal.

Power Consumption

此因素提供有关数模转换器在运行期间消耗的功率的信息。理想情况下,数模转换器必须是节能的,这样才能延长电池寿命并最大程度地降低运营成本。

This factor provides information about the power consumed by the digital to analog converter during its operation. Ideally, a digital to analog converter must be power efficient, so that it can extend the battery life and minimize the operational cost.

Operating Speed

数模转换器的运行速度表示 DAC 将数字信号转换为模拟信号的速度。通常,DAC 的速度以每秒采样数 (S/s) 或兆赫 (MHz) 来衡量。

The operating speed of a digital to analog converter represents the rate at which the DAC converts a digital signal into analog signal. Typically, the speed of a DAC is measured in samples per second (S/s) or megahertz (MHz).

数模转换器的运行速度还决定了 DAC 可以准确产生的模拟输出信号的最大频率。

The operating speed of the digital to analog converter also determines the maximum frequency of the analog output signal that the DAC can generate accurately.

具有高速度对于在诸如实时信号处理、快速波形生成、高速通信等应用中使用的数模转换器至关重要。

It is essential that a digital to analog converter used in applications like real-time signal processing, generation of fast waveforms, high-speed communication, etc. must have a significantly high-speed.

Noise Performance

数模转换器的噪声性能表示在转换过程中可能引入输出信号中的噪声量。不必要的噪声会影响信噪比,进而影响信号质量。因此,我们应该尽可能地减少噪声,以获得高质量的输出模拟信号。

The noise performance of a digital to analog converter represents the amount of noise that can be introduced in the output signal during the conversion process. The unwanted noise can affect the signal-to-noise ratio and hence the signal quality. Therefore, we should minimize the noise as much as possible to obtain a high-quality output analog signal.

Applications of Digital to Analog Converters

数模转换器广泛应用于数字电子领域的各种应用中。数模转换器的主要功能是将数字信号转换为模拟格式。

Digital to analog converters are widely used in a variety of applications in the field of digital electronics. The main function of a digital to analog converter is to convert a digital signal into analog format.

以下是使用数模转换器的某些常见设备和系统 −

The following are some common devices and systems in which the digital to analog converters are used −

  1. Audio amplifiers and playback systems

  2. Video encoder systems

  3. Data acquisition systems

  4. Calibration of testing and measuring instruments

  5. Motor control circuits

  6. Digital signal processors

  7. Telecommunication systems, etc.

Conclusion

数模转换器用于电子领域,以提供数字输入和模拟输出之间的接口。在本章中,我们详细解释了模数转换器的类型和应用。

Digital to analog converters are used in the field of electronics to provide an interface between digital input and analog output. In this chapter, we explained in detail about the types and applications of analog to digital converters.