For a standard 12-bit digital analog converter circuit operating on a fixed 5.0V reference, the digital input code 1500 converts to exactly 1.831 V. The governing formula is Vout = (D ÷ 2n) × Vref. Substituting our exact values: Vout = (1500 ÷ 4096) × 5.0V = 1.83105V. This direct answer assumes a voltage-output DAC architecture, a precision 5.0V reference, and a high-impedance load that does not draw down the output stage.

Bench Tip: Always measure your actual Vref pin with a 4.5-digit multimeter before calculating. A 5.0V USB supply often sags to 4.85V under load, which will shift your 1.831V expectation down to 1.776V.

The Code-to-Voltage Conversion Matrix

In a 12-bit system, you have 4,096 discrete steps (0 to 4095). The voltage resolution—often called the Least Significant Bit (LSB) weight—is 5.0V ÷ 4096 = 1.22 mV. Every time your digital code increments by 1, the analog output steps up by 1.22 mV. Below is the conversion table for a ±20% range around our target code of 1500, assuming the fixed 5.0V reference.

12-Bit DAC Output Voltages (Vref = 5.0V)
Digital Code (D)Hex ValueAnalog Output (Vout)Delta from Target
12000x4B01.465 V-0.366 V
13000x5141.587 V-0.244 V
14000x5781.709 V-0.122 V
1500 (Target)0x5DC1.831 V0.000 V
16000x6401.953 V+0.122 V
17000x6A42.075 V+0.244 V
18000x7082.197 V+0.366 V

This matrix highlights why 12-bit resolution is the practical floor for precision DC control loops. If you need sub-10mV accuracy, a 12-bit DAC on a 5V rail barely makes the cut. For tighter tolerances, you must either drop the reference voltage or step up to a 16-bit architecture, which yields an LSB of just 76 µV on a 5V rail.

Boundary Conditions: When Mains Math is Meaningless

A common point of confusion for makers transitioning from home wiring to embedded electronics is attempting to apply AC power formulas to signal-level circuits. How the answer shifts for 120V vs 230V vs 3-phase: It doesn't. Applying AC mains power equations (like P = V × I × PF) to a DAC signal output is a category error and mathematically meaningless.

A DAC outputs low-voltage, low-current DC signals (typically 0–5V or 4–20mA). Power Factor (PF) and phase angles do not exist in this domain. However, if your question is actually about sizing the AC/DC power supply that feeds the DAC's VCC rail, here is how the physics shift:

  • 120V vs 230V AC Input: This only changes the primary-side winding ratio and bulk capacitor sizing of your isolated flyback converter. The secondary side (the 5V or 3.3V DC rail feeding the DAC) remains identical. The DAC's code-to-voltage math is completely blind to the AC mains input.
  • 3-Phase Power: Entirely irrelevant to a DAC circuit unless you are using the DAC to generate the PWM modulation signals for a 3-phase variable frequency drive (VFD) inverter. Even then, the DAC outputs 0–3.3V logic signals to the gate drivers; it does not handle the 480V 3-phase bus directly.
  • When the Conversion is Meaningless: The Vout formula becomes useless if your DAC is unbuffered and driving a low-impedance load (like a 50Ω coaxial cable) without an op-amp. The internal resistor ladder will droop, and the output voltage will collapse regardless of the digital code. It is also meaningless if your Vref is derived from a noisy, unregulated microcontroller VCC pin.

IC Selection Decision Tree

Do not default to the first DAC module you find on a hobbyist marketplace. Match the IC to your specific bandwidth, resolution, and interface requirements. Use this decision path to terminate on the exact part number you need to order.

If your application requires...And your constraint is...Then select this exact ICTypical Price (2026)
Simple DC voltage control (e.g., power supply setpoints, motor speed)I2C interface, 12-bit resolution is sufficient, low costMicrochip MCP4725$1.20 - $1.80
Precision industrial control (e.g., 4-20mA loops, lab equipment)SPI interface, 16-bit resolution, internal precision referenceTI DAC8562$5.50 - $7.00
High-fidelity audio playback or arbitrary waveform generationI2S digital audio interface, high sampling rate (384kHz)TI PCM5102A$3.00 - $4.50
Multi-channel synchronized output (e.g., vector modulators)4+ channels, simultaneous update latch, parallel or fast SPIAD5668 (Analog Devices)$12.00 - $15.00

Concrete Pick: For 90% of general-purpose Arduino, ESP32, or Raspberry Pi projects requiring a programmable DC voltage, buy the MCP4725. It includes an onboard EEPROM to remember the last set voltage across power cycles, saving you from writing initialization code on every boot.

FAQ: Edge Cases and Calibration

Why is my measured analog voltage 40mV lower than the calculated value?

This is almost always caused by one of two issues. First, ground offset: if your multimeter's ground lead is clipped to a different ground point than the DAC's GND pin, the voltage drop across the breadboard's ground bus will subtract from your reading. Second, an unbuffered output: the MCP4725 has an internal output impedance of roughly 1kΩ to 4kΩ depending on the code. If your load draws more than 1mA, Ohm's law dictates a voltage drop across that internal impedance. Fix this by adding a rail-to-rail op-amp (like the MCP6001) configured as a unity-gain buffer.

Can I use the microcontroller's 3.3V pin as the DAC's Vref?

You can, but you shouldn't if you care about accuracy. Microcontroller 3.3V regulators (especially the AMS1117-3.3 found on cheap clone boards) have poor line regulation and introduce switching noise from the MCU's digital core. For precision work, feed the DAC's Vref pin from a dedicated low-dropout reference IC like the TI REF3033.

What happens if I send a code higher than the maximum (e.g., 4096 on a 12-bit DAC)?

The DAC will not output a voltage higher than Vref. Most modern DACs, including the MCP4725 and DAC8562, will simply ignore the overflow bits and clamp the output at the maximum full-scale voltage (Code 4095). However, poorly written I2C libraries might truncate the integer incorrectly, wrapping the value back to zero. Always mask your variables in code: code = code & 0x0FFF; for 12-bit limits.

For deeper architectural differences between string DACs, R-2R ladders, and sigma-delta topologies, refer to the Analog Devices Data Converter Design Center and the Texas Instruments DAC Overview.