A digital-to-analog converter (DAC for short) is a device for converting a digital (usually binary) code to an analog signal (current, voltage or charges). Digital-to-Analog Converters are the interface between the digital world and the analog real life.
One of the more frequently asked questions that I find online with regard to audio production is:
“Does a DAC improve sound quality?”
well, the truth is, without a DAC there simply would not be any sound produced at all. A DAC is basically implemented into everything from your smart phone to your PC and anywhere sound needs to be produced, and converted to analog real sound. The higher the quality of the DAC being used the higher the improvement of sound that can be achieved. So yes, a high quality DAC can and will improve sound quality.
Types of DACs
1. Summing Amplifier
Digital to analog conversion is simply a weighted sum of the binary input, a circuit called a summing amplifier is used.
This is basically an amplifier with multiple resistors connected to a single input. The junction where the resistors meet is called the summing junction or the virtual ground.
The binary input goes into the resistors and the analog output is obtained on the output of the op-amp.
What makes this circuit work is the resistors – each resistor basically has to be diligently chosen and matched in order to obtain an accurate analog output.
Therefore, the more bits you generally have, the more different values of resistors you need – but this is not always practical but any limitations can be easily overcome by using the R-2R which is discussed in the next point.
2. R-2R Ladder
This is the simplest type of DAC and all it needs are two resistor values arranged in a ladder.
You can think of this as a somewhat complex voltage divider, though the math involved is quite complex.
The binary input goes into the 2R resistors and the output is obtained at the bottom of the ladder.
3. PWM DAC
This is the type of DAC that most of us have on our devices and don’t even realise it.
The popular Arduino microcontroller has the capability to output analog signals using a PWM signal.
On the outset the PWM signal basically looks like a binary waveform with only high and low peaks with a variable duty cycle (ratio of on time to time period).
However, this is intended to be used with a RC filter to be able to convert the PWM signal into a voltage value by filtering out the AC component and leaving behind the DC component.
The voltage output is proportional to the duty cycle of the input, that is, the higher the duty cycle the greater the output voltage of the filter.
Applications of DACs
1. Digital Signal Processing
DAC are ultimately the signal processor in most devices because It is much easier to work with signals once they have been converted to binary.
A good example of this, is in audio editing where audio is converted to binary after which various operations can be performed on it.
Then, In order to play back this audio, a DAC is what is needed to convert it into a sound signal that can be played back on a speaker.
2. Digital Power Supplies
Most microcontrollers are generally too slow to be a part of a power supply control loop.
In order to change the voltage or current of a power supply, the reference can be easily changed.
This can be achieved by connecting a DAC to the output of a microcontroller and then using that to change the reference voltage to a preselected value.
Drawbacks of DACS
One drawback of DACs is that they can only produce as many voltage steps as the binary number will allow,
this means that it is nearly impossible to produce truly continuous voltage values.
Most of the DAC circuits mentioned above are complex and need a few parts and this is not always practical.
However, discrete DAC chips are available that can communicate with a microcontroller through SPI and I2C.
A Digital analog converter which is commonly referred as DAC is a device that converts binary values (0s and 1s) to a set of continuous analog voltages.
A computer is a binary machine used in an analog world, so to be able to produce an output that is understandable by other devices a DAC is used.
For example, a computer stores audio in the form of binary values of the sound wave.
Therefore, to play these back as sound on a speaker we need analog signals, because as we know the speaker’s diaphragm vibrates based on the intensity of the analog signal to produce sound/music.
So here, a DAC is used to convert the digital audio file to analog signal in order to play it on a speaker so you can hear it with your ears.