what is D.A.C. (Digital-to-analog converter)?

A DAC converting digital data into an analog voltage or current

What does a digital-to-analog converter do?

A digital-to-analog converter, or DAC, turns a numerical code into a corresponding electrical voltage or current. It gives a digital system a way to generate an analog signal. Audio playback, signal generators and PLC output modules all use this principle. In industrial analog I/O, the result is often a command that another device can read.

How a number becomes an electrical output

A DAC uses a voltage or current reference to establish its scale. Its internal switching circuitry selects the fraction of that reference associated with the input code. The reference and the power supply serve different purposes. A controller powered from 24 V can therefore have a 0–10 V analog output.

Although each binary bit has only two states, a word contains many possible values: 8 bits provide 256 codes, 12 bits provide 4,096, and 16 bits provide 65,536. A DAC assigns an output level to each code. An analog-to-digital converter (ADC) works in the opposite direction, measuring an analog quantity and producing a numerical code.

A simple example: 8 bits with a 5 V reference

For an ideal unipolar DAC with unity gain, the following model relates the output to the code. D is the code, N is the number of bits, and Vref is the reference voltage:

Vout = Vref × D / 2N
One-code step (1 LSB) = Vref / 2N

With N = 8 and Vref = 5 V, the valid codes run from 0 to 255. Each ideal step is approximately 19.53 mV.

Decimal code 8-bit binary word Ideal output
0000000000 V
64010000001.25 V
128100000002.50 V
192110000003.75 V
25511111111≈ 4.9805 V

The highest code falling slightly short of 5 V is expected in this model. Code 255 produces 255/256 of the reference. Other DACs use different gains, offsets or output ranges. Use the transfer equation in the device's data sheet rather than assuming this formula applies to every output.

What this means for an industrial analog output

An output module combines conversion with the circuitry needed to deliver a range such as 0–10 V, ±10 V or 4–20 mA. Voltage signalling and current signalling have different wiring and load requirements. The receiving analog input must support the selected format.

If a 0–100% command is mapped to 0–10 V, a 50% request corresponds to approximately 5 V. Map the same command to 4–20 mA and the midpoint is approximately 12 mA. These are engineering-unit mappings; they do not establish a universal internal DAC code.

The output might send a frequency reference to a variable frequency drive, a valve command in pressure control, or a power demand in temperature control. It is a command signal, not the power connection for the motor or heater. Also, some temperature controllers use relay or SSR drive outputs instead of an analog output.

Common ways to implement conversion

R–2R ladder: A network of resistors with values R and 2R combines the weighted contributions selected by the digital bits. Accurate resistance ratios matter. Resistor-string and current-steering designs provide other ways to implement a DAC.

Filtered PWM: Pulse-width modulation varies the duty cycle of a switching signal. A suitable low-pass filter, which can use resistors and capacitors, averages the pulses. A 0–5 V PWM signal at 50% duty cycle has an ideal average of 2.5 V. The unfiltered pin still switches between 0 V and 5 V. Stronger filtering reduces ripple but can slow the response.

Sigma-delta: Digital processing produces a high-rate switching stream, using noise shaping and output filtering to recover the wanted analog signal within its operating band. The internal conversion stage can be single-bit or multibit. The term “multibit” alone does not establish the accuracy or quality of a converter.

Finite steps, practical errors and response time

Quantization error is finite. It arises when a continuously variable target is assigned to one of the available output levels. For ideal, evenly spaced levels, rounding to the nearest level gives an error of at most approximately ±0.5 LSB, provided the target lies within the representable range. That is not a guarantee for the total error of a real circuit.

Resolution, accuracy and speed describe different things. Reference error, offset, gain error, nonlinearity and temperature effects influence the actual output. Settling time specifies how long the output takes to reach a defined tolerance after a code change. Waveform applications also depend on update rate, bandwidth and output filtering.

Check the load specifications. Voltage outputs have a limited current capability; current outputs have a limited load resistance for the available supply voltage. A digital potentiometer is also a different component: it is an electronically adjustable resistance element, not automatically a replacement for a DAC that generates a voltage or current.