ExpertAudio
Digital Audio DAC and Class-D Speaker Chain
Build an I²S-to-analog-to-speaker signal chain with a PCM5102A DAC and a separate TPA3116D2 amplifier module.
Parts from the database
- PCM5102APTR × 1Audio DAC on a breakout
- TPA3116D2DADR × 1Amplifier IC on a tested module
- ESP32-WROOM-32 × 1Use on an I²S-capable development board
Other supplies
- PCM5102A I²S DAC breakoutCommon build supply
- TPA3116D2 amplifier moduleCommon build supply
- 4–8 Ω speakers rated for the moduleCommon build supply
- regulated amplifier supply within module rangeCommon build supply
- USB supply for ESP32Common build supply
- audio files/source softwareCommon build supply
Amazon links may be affiliate links. As an Amazon Associate, Electronics Hobby Hub earns from qualifying purchases.
Connections
- Wire ESP32 I²S BCLK, LRCLK and DATA to the DAC module's documented pins; join signal ground.
- Connect DAC analog L/R outputs to the amplifier's line inputs; check input level and AC coupling.
- Power the amplifier only from its specified supply. Keep speaker outputs floating across each speaker pair; neither lead is ground.
Build steps
- Test the DAC output with a high-impedance line input before connecting the power amplifier.
- Configure the ESP32 I²S peripheral for the DAC's supported format/rate and play a low-level test tone.
- With amplifier power off, connect speakers and verify impedance; power up with volume low.
- Increase level slowly and inspect output clipping/temperature; document supply, load and measurement conditions.
Software and firmware setup
Firmware is required, but a complete audio-player sketch is not included yet. Start from the Espressif Arduino I2S output example and configure BCLK, LRCLK, data, sample format, and rate for the PCM5102A module. Test the DAC at line level before connecting the TPA3116 amplifier, and keep both BTL speaker outputs floating.
Test your build
A low-level stereo signal should emerge from both channels without clipping. The DAC is line-level; it cannot drive speakers by itself.
Troubleshooting
- Silence often means BCLK/LRCLK pin assignment or I²S format mismatch.
- If only one channel works, check LRCLK/data routing and module channel configuration.
- If amplifier protection trips, inspect speaker wiring and supply sag before retrying.
Safety and limitations
Power amplifier outputs can be loud and high current. Do not connect BTL speaker terminals to ground; use a fused supply and disconnect power before rewiring.
Manufacturer and platform documentation
Community Notes for This Project
These are unverified visitor contributions, separate from the build guide and manufacturer specifications. Verify technical advice against the linked datasheets before relying on it.
Set up the comments service to load community notes.