A Digital-to-Analog Converter (DAC) translates discrete digital binary codes into continuous analog voltages. If you are asking what a DAC converter does in practical microcontroller terms, the direct answer for a standard 12-bit external DAC (like the ubiquitous MCP4725) running on a 3.3V reference is a conversion step size (Least Significant Bit, or LSB) of exactly 0.805 mV per step. This means every increment of 1 in your digital code raises the analog output by 0.805 millivolts, allowing you to output anything from 0V to roughly 3.3V in 4,096 discrete slices.
Vout = (D / 2n) × Vref
Substituted for 12-bit at 3.3V:
Vout = (2048 / 4096) × 3.3V = 1.65V (exactly mid-scale)
The Bit-to-Voltage Conversion Table
The two assumptions that fix your analog output are the bit-depth (n) of the DAC architecture and the reference voltage (Vref). If either of these shifts, your step size changes entirely. Below is a table showing the neighboring resolution tiers (±20% around the common 12-bit standard) and how their step sizes shift between standard logic levels.
| Resolution (Bit-Depth) | Total Steps (2n) | Step Size (LSB) at 3.3V | Step Size (LSB) at 5.0V |
|---|---|---|---|
| 10-bit | 1,024 | 3.222 mV | 4.882 mV |
| 12-bit (Standard) | 4,096 | 0.805 mV | 1.220 mV |
| 14-bit | 16,384 | 0.201 mV | 0.305 mV |
How Reference Voltage and Architecture Shift the Output
Just as AC power calculations shift drastically between 120V and 230V systems, DAC conversions shift based on your voltage reference architecture. A 12-bit DAC is not universally 0.805 mV per step; that is only true if Vref is locked at 3.3V.
- 3.3V Logic (ESP32-S3, Raspberry Pi Pico 2): Most modern I2C DACs default to the microcontroller's 3.3V rail. This gives you the 0.805 mV step size, which is generally sufficient for generating CV (control voltage) for analog synthesizers or basic sensor simulation.
- 5V Logic (Arduino Uno R3/R4): If you power an MCP4725 at 5V, your step size jumps to 1.22 mV. You gain a higher maximum voltage swing, but you lose fine-grained precision at the lower end of the scale.
- Precision External Vref (2.048V or 4.096V): In industrial PLC or precision lab equipment designs, engineers feed a dedicated voltage reference IC (like the TI REF3033) into the DAC's Vref pin. Using a 2.048V reference on a 12-bit DAC yields a mathematically perfect 0.500 mV per step, eliminating rounding errors in firmware calculations.
For deeper architectural insights on how internal resistor ladders affect these voltages, refer to the Texas Instruments DAC architecture overview.
When the Digital-to-Analog Conversion Becomes Meaningless
Calculating the theoretical step size is only half the battle. In real-world bench testing, the digital-to-analog conversion becomes entirely meaningless under three specific conditions:
- Unbuffered Output Loading: Many cheap DACs and internal microcontroller DACs use an unbuffered resistor ladder. If you connect a low-impedance load (like a 1kΩ resistor or a direct motor driver input) to the output pin, the voltage will droop significantly. Your firmware might command 2.5V, but the multimeter will read 1.8V. You must use a DAC with a built-in output buffer or add an op-amp voltage follower.
- Noisy Vref Rails: If your 3.3V microcontroller rail has 25mV of switching ripple from a nearby buck converter, your 0.805mV precision is a lie. The analog output will inherit all the noise of the reference rail. Garbage in, garbage out.
- Exceeding Settling Time: Every DAC requires a finite amount of time to physically move the voltage from one step to the next (settling time). If you push SPI or I2C updates faster than the DAC's analog front-end can settle (often 5μs to 10μs for precision parts), the output will look like a distorted, jagged mess on an oscilloscope rather than a smooth waveform.
Frequently Asked Questions
What is the difference between a DAC converter and PWM?
PWM (Pulse Width Modulation) outputs a digital square wave that rapidly switches between 0V and VCC. You can pass PWM through a low-pass RC filter to 'fake' an analog voltage, but it is inherently slow to update and prone to ripple. A true DAC converter outputs a steady, continuous DC voltage directly from an internal resistor ladder or current-steering array, requiring no external filtering and allowing for instantaneous, ripple-free voltage changes.
Does the ESP32-S3 have a built-in DAC converter?
No. While the original ESP32 featured a notoriously non-linear 8-bit internal DAC, Espressif removed the internal DAC hardware in the ESP32-S3 architecture. To get true analog output on an ESP32-S3 or Raspberry Pi Pico 2 in 2026, you must use an external I2C DAC (like the MCP4725) or an I2S audio DAC (like the PCM5102A).
How do I choose the right DAC converter for audio projects?
For audio, standard I2C DACs are too slow. You need an I2S DAC with at least 16-bit (preferably 24-bit) resolution and high sampling rates (44.1kHz to 192kHz). The PCM5102A is the standard hobbyist choice for I2S audio, providing excellent signal-to-noise ratios. For control voltages (like motor speed or LED dimming), a 12-bit I2C DAC like the Microchip MCP4725 is the correct tool.
Why is my DAC output voltage lower than the calculated value?
If your calculated value is 3.3V but your multimeter reads 3.15V, you are likely hitting the 'headroom' limit of the DAC's internal output amplifier. Most rail-to-rail DACs cannot quite reach the absolute positive Vref rail when sourcing current. To guarantee you can hit the full 3.3V, you must either use a DAC powered by a slightly higher voltage (e.g., 5V VDD with a 3.3V Vref) or ensure the output is strictly high-impedance (buffered).






