Digital to Analog

Table of Contents


Introduction

Digital data can be described as discrete (binary), while analog data can be described as continuous. A digital to analog converter (DAC for short), like what the name suggests, converts digital data into analog data. The "real-world" is analog, meaning that everything that is measurable is continuous. So for example, to output an audio signal that is stored in digital memory, a DAC needs to be used.

General Operation of a DAC

Digital data is grouped into bytes, and the position or order of each bit is given a significance or weighting. The weighting is in the form of 2^n, where n is the position of the bit. The numbering of "n" increase from the right to the left of the number, the number "n" starts with a value of 0. For example, given the 8-bit binary number below, we will do the operations that a DAC does to convert a digital signal into an analog one.


00101010(2)

The bits of each number are then multiplied by their weighting, and summed. 

0*2^70*2^61*2^50*2^41*2^30*2^21*2^10*2^0=42(10)

Therefore the 8-bit digital signal 0010 1010 is converted to the analog signal 42. So, if 5 volts is mapped to 255, then the voltage output would be 42/255 * 5 V = 0.823 volts. Example derived from [1].


Types of Converters

The type of DAC depends on the specifications required for the circuit you are designing. There are many types of DAC that can be found and used. In this page, only the most commonly used methods are outlined. Note that there are many different types of converters, but the general operations of how a DAC converts a digital signal to an analog one is the same for all types.

Binary Weighted Resistor

The summing amplifier method is also referred to as a binary-weighted resistor. As the name suggests, a summing operational amplifier circuit is used to convert a binary signal to an analog one. In the diagram below LSB stands for the least significant bit, and MSB stands for the most significant bit. The equation for the summing amplifier can then be used to determine the voltage output [2]. An operational amplifier is shown in the illustration below, more information on operational amplifier can be found here: Operational Amplifiers.

Summing Amplifier Method [2]

A diagram of the summing amplifier circuit.

R-2R Ladder Method

This method also uses a summing amplifier. The main difference between the R-2R ladder method and the binary-weighted resistor method is the resistor network. The advantage of using this type of resistor network rather than the binary-weighted network is only two values of resistors are needed, and adding an extra bit is easy [3].

R-2R Ladder Resistor Network [3]

A diagram of the R-2R amplifier circuit.

Pulse Width Modulator

Note that pulse width modulation is not a type of digital to analog, it's an alternative technique of outputting a specific voltage. The difference being that PWM is an approximation based on the average of the signal over time, and DACs output a specific voltage based on a binary signal. Pulse width modulation is a technique mainly used for motor speed control, and LED light dimming. PWM can be described as a square wave with a specified duty cycle that can be changed to control the speed of a motor or brightness of LEDs. A PWM signal is either high or low, no real change in the output signal is made. The output voltage is only high and low rapidly switching, but the average of the PWM signal is what is being read by the motor or LED [4].

Pulse Width Modulator [5]

An animation of PWM on LED brightness.


Specifications

When choosing a DAC, these specifications must be taken into consideration. Information below from [6].

Resolution

The resolution of a DAC is dependent on the number of input bits the DAC has. For example, if a DAC has an 8-bit input, the resolution of the DAC is 2^8, or 256 steps.

Range

The range, also known as full scale is the maximum voltage the DAC can output, minus the minimum voltage the DAC can output.

Precision

Precision refers to the smallest change in voltage from one binary number to the next. The precision of a DAC is dependent on the resolution. For example, the precision of an 8-bit DAC is 1 in 2^8, so 0.391% of full scale.

Least Significant Bit

LSB is the smallest voltage increment the DAC can perform. The LSB is based on the precision of the DAC.

Accuracy

Accuracy refers to the degree to which the output is close to the correct value. Accuracy is often specified as a fraction of the least significant bit (e.g. ±0.5xLSB).


Applications

As mentioned before, PWM can be used for many things. For example, PWM can be used to control the speed of motors and the dimming of LEDs. Traditional DACs are mainly used for audio, outputting a digitally stored audio signal to a speaker requires the use of a DAC. DACs can also be found in some applications for videos. Nowadays HDMI is dominating, which is a digital video protocol, so analog displays are becoming obsolete [7].


References

[1] Electrical Technology, "Digital to Analog Converter (DAC) – Types, Working & Applications," [Online]. Available: https://www.electricaltechnology.org/2020/04/digital-to-analog-converter-dac.html. [Accessed 12 April 2021].

[2] MathWorks, "Binary Weighted DAC," [Online]. Available: https://www.mathworks.com/help/msblks/ref/binaryweighteddac.html. [Accessed 12 April 2021].

[3] All About Circuits, "The R/2R DAC (Digital-to-Analog Converter)," [Online]. Available: https://www.allaboutcircuits.com/textbook/digital/chpt-13/r-2r-dac/. [Accessed 12 April 2021].

[4] J. Heath, "PWM: Pulse Width Modulation: What is it and how does it work?," 4 April 2017. [Online]. Available: https://www.analogictips.com/pulse-width-modulation-pwm/. [Accessed 12 April 2021].

[5] Explore Embedded, "PWM on Explore M3," [Online]. Available: https://exploreembedded.com/wiki/PWM_on_Explore_M3. [Accessed 12 April 2021].

[6] B. Bishop, "Section VIII: Analog Interfaces," Waterloo, 2020.

[7] ELPROCUS, "About Digital to Analog Converter (DAC) and Its Applications," [Online]. Available: https://www.elprocus.com/digital-to-analog-converter-dac-applications/. [Accessed 12 April 2021].

Contributors:

UserLast Update
Mayurakhi Khan 924 days ago
Former user (Deleted)
Former user (Deleted)
Former user (Deleted)

Faculty Advisors: Allyson Giannikouris, Kim Pope, John Thistle, Michael Lenover (alumni)