UDA1334A I2S stereo DAC with ESP32

Supply 3.3-5 V Bus GPIO
VIN3VOGNDWSELDINBCLKLOUTAGNDROUT

Pins and ESP32 wiring

PinRoleESP32 pinNotes
VINPower3V3Pin order varies between boards: match by the printed label. 3.3 V or 5 V
3VONot wired to the ESP32—3.3 V output of the regulator. Leave unconnected
GNDGroundGND
WSELSPI chip selectD25I2S word select (LRC), not SPI
DINInput (the ESP32 drives it)D26I2S audio data from the ESP32
BCLKSPI clockD27I2S bit clock, not SPI
LOUTNot wired to the ESP32—Line out left (or use the headphone jack)
AGNDNot wired to the ESP32—Audio ground for the line outputs
ROUTNot wired to the ESP32—Line out right

Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.

Starter code (Arduino)

void setup() { pinMode(26, OUTPUT); }  // DIN

void loop() {
  digitalWrite(26, HIGH);
  delay(500);
  digitalWrite(26, LOW);
  delay(500);
}

Sources

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.