PCM5102A I2S stereo DAC with ESP32

Supply 3.3-5 V Bus GPIO
SCKBCKDINLCKGNDVIN

Pins and ESP32 wiring

PinRoleESP32 pinNotes
SCKGroundGNDSystem clock: connect to GND so the chip makes it from BCK
BCKSPI clockD25I2S bit clock, not SPI
DINInput (the ESP32 drives it)D26I2S audio data from the ESP32
LCKSPI chip selectD27I2S word select (LRCK), not SPI
GNDGroundGND
VINPower3V33.3 V or 5 V. XSMT (solder jumper on the back) must be HIGH or the output stays muted

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.