ESP32 DAC Output Not Producing Analog Voltage
DodaTech
Updated 2026-06-26
1 min read
In this tutorial, you'll learn about ESP32 DAC Output Not Producing Analog Voltage. We cover key concepts, practical examples, and best practices.
The Problem
ESP32 DAC pin produces 0V or constant voltage instead of variable analog output.
Quick Fix
Wrong
dacWrite(25, 128); // GPIO 25: expected 1.65V output
Pin 25 outputs 0V or stays at 3.3V regardless of dacWrite value.
Right
dacWrite(25, 128); // 8-bit value: 128 = 50% of 3.3V = 1.65V
int val = analogReadMilliVolts(34); // Verify with ADC
Serial.printf("DAC output: %dmV\n", val);
DAC output: 1650mV
(Measured 1.65V on GPIO 25 with 128 value)
Prevention
DAC is available only on GPIO 25 and 26. Use dacWrite(value) with 0-255 range. Output voltage = value * 3.3 / 255. Do not use DAC pins for other purposes. Disable ADC on the same pin if active.
DodaTech engineers apply these same patterns across Doda Browser, DodaZIP, and Durga Antivirus Pro for production IoT reliability.
FAQ
Built by the developers of DodaTech
Doda Browser, DodaZIP & Durga Antivirus Pro