# Adafruit PCM510x I2S DAC

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/135/542/medium800/adafruit_products_6250-04.jpg?1741011039)

Info: This guide is for both the PCM5100 and the PCM5102. Both boards have identical functionality, the only difference is the signal-to-noise/dynamic range (100dB for the PCM5100 and 112dB for the PCM5102).

We stock a lot of chips and development boards that are able to do high quality digital I2S out, which makes for great quality audio playback. That's great when you have enough processing power to decode WAVs or MP3s in real time. However, we don't have a good selection of I2S DAC boards...until now! We really love the sounds coming out of the **Adafruit PCM5102 I2S DAC with Line Level Output** - it's got clean, excellent-quality stereo audio and does not need any MCLK or I2C configuration. Literally just pipe some I2S audio in and it will just work.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/543/medium800/adafruit_products_6250-02.jpg?1741011099)

The PCM510x comes in a few different varieties: we've got the the good-quality **PCM5100** with 100dB signal-to-noise/dynamic range, and the excellent-quality **PCM5102** with 112dB. The '02 is a little more expensive but they are both quite good for any use and are pin-compatible so one may swap between the two.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/544/medium800/adafruit_products_6250-03.jpg?1741011152)

This breakout makes I2S digital audio easy: all you need to do is power it with 3.3 to 5VDC, and provide BCLK (bit clock), WSEL (left/right word select), and DIN (data in). The data lines are 3.3V logic only. By default it's configured for I2S but you can also do Left-Justified by toggling the Format pin. Audio can be 16, 24 or 32-bit wide, the chip will automagically determine the right format from the WSEL / BCLK ratio. No MCLK pin is needed, the chip will auto-generate it internally from the bit clock - or you can provide it on the MCLK input if you want.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/545/medium800/adafruit_products_6250-01.jpg?1741011183)

Other breakout pads provide: filtering (change from normal to low-latency by pulling high), mute (pull low to quickly set the outputs to ground), and de-emphasis for 44.1khz audio (default is off). The audio outputs are also available on breakout pads if you want to wire directly without using the 3.5mm jack.

Audio output is not AC-coupled because it is centered on ground: you can plug it into anything that is either AC coupled or has the same ground reference. Note that this is a line-level output, it cannot drive headphones - the output is for no less than 1K ohm loads!

Each order comes with one I2S Stereo DAC breakout and some header you can solder on for breadboard usage.

# Adafruit PCM510x I2S DAC

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/135/667/medium800/adafruit_products_double.jpg?1741122562)

Info: This guide is for both the PCM5100 and the PCM5102. Both boards have identical functionality, the only difference is the signal-to-noise/dynamic range (100dB for the PCM5100 and 112dB for the PCM5102).

## Power Pins

- **VIN** - this is the power pin. It can be powered with 3.3 to 5VDC, however, the data lines are 3.3V logic only.
- **3V&nbsp;** - this is the 3.3V output from the onboard regulator
- **GND** - common ground for power and logic

Warning: The data lines are 3.3V logic level only

## I2S Pins

- **WSEL** (Word Select or Left/Right Clock) - this is the pin that tells the DAC when the data is for the left channel and when it's for the right channel.
- **DIN** (Data In) - This is the pin that has the actual data coming in, both left and right data are sent on this pin, the WSEL pin indicates when left or right is being transmitted.
- **BCK** (Bit Clock) - This is the pin that tells the amplifier when to read data on the data pin.
- **MCK** (Main clock, optional) - This pin is optional for the PCM510x because it will auto-generate the main clock internally from BCK.

## Audio Output

The audio output from this breakout is line-level. It is not AC-coupled because it is centered on ground. You can plug it into anything that is either AC coupled or has the same ground reference.

- **Lout** - This is the left channel audio output
- **Rout** - This is the right channel audio output
- **G** - This is a clean analog ground signal for the audio output
- **3.5mm output jack** - This is the onboard output audio jack. Note that it cannot drive headphones - the output is for no less than 1K ohm loads!

Warning: Note that it cannot drive headphones - the output is for no less than 1K ohm loads!

## Control Pins

- **DE** - This is the de-emphasis pin for 44.1khz audio. By default it is off.
- **FIL** - This is the filter pin. You can change the filter from normal to low-latency by pulling the pin high.
- **MU** - This is the mute pin. You can pull this pin low to set the outputs to ground.
- **FM** - This is the format pin. You can change the format from I2S to Left justified by pulling the pin high.

# Adafruit PCM510x I2S DAC

## CircuitPython

It's easy to use the **PCM510x I2S DAC** with CircuitPython and the builtin&nbsp;`audiobusio` module. This module allows you to easily write Python code that lets you play audio.

## CircuitPython Microcontroller Wiring

First wire up the DAC to your board exactly as follows. The following is the DAC wired to a Feather RP2040:

- **Board 3.3V** to **DAC VIN (red wire)**
- **Board GND** to **DAC GND (black wire)**
- **Board D9** to **DAC BCK (yellow wire)**
- **Board D10** to **DAC WSEL (green wire)**
- **Board D11** to **DAC DIN (blue wire)**
- **DAC 3.5mm output** to **line-level speaker**

![fritzing diagram with a feather rp2040 and the i2s dac](https://cdn-learn.adafruit.com/assets/assets/000/135/688/medium640/adafruit_products_pcm510x_feather.jpg?1741275367)

## CircuitPython Tone Playback

Click the **Download Project Bundle** button below to download the **code.py** file in a zip file. Extract the contents of the zip, and copy the&nbsp; **code.py** &nbsp;file to your&nbsp; **CIRCUITPY** &nbsp;drive.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PCM510x_Examples/CircuitPython_Tone/code.py

Once successfully copied, you'll begin hearing a one second 440Hz tone, every other second.

## WAV Playback

Click the **Download Project Bundle** button below to download the **code.py** file and the&nbsp; **StreetChicken.wav** file in a zip file. Extract the contents of the zip, and copy the&nbsp; **code.py** and **StreetChicken.wav**** &nbsp; **files to your&nbsp;** CIRCUITPY**&nbsp;drive.

Your **CIRCUITPY** drive contents should resemble the following.

![CIRCUITPY](https://adafruit.github.io/Adafruit_Learning_System_Guides/PCM510x_Examples_CircuitPython_WAV.png )

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PCM510x_Examples/CircuitPython_WAV/code.py

Once successfully copied, you'll hear the Street Chicken WAV file play once.

# Adafruit PCM510x I2S DAC

## Arduino

Using the PCM510x I2S DAC with Arduino involves wiring up the DAC and running the provided example code.

## Wiring

You can power the DAC with 3.3 to 5VDC, however, the data lines are 3.3V logic only. You'll want to use a 3.3V logic level board.

Here is an Adafruit Feather RP2040 wired up to the DAC:

- **Board 3.3V** to **DAC VIN (red wire)**
- **Board GND** to **DAC GND (black wire)**
- **Board D9** to **DAC BCK (yellow wire)**
- **Board D10** to **DAC WSEL (green wire)**
- **Board D11** to **DAC DIN (blue wire)**
- **DAC 3.5mm output** to **line-level speaker**

![](https://cdn-learn.adafruit.com/assets/assets/000/135/687/medium640/adafruit_products_pcm510x_feather.jpg?1741274766)

Info: No additional libraries are required for these examples.

## Tone Example Code
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PCM510x_Examples/Arduino_Tone/Arduino_Tone.ino

Once you have uploaded the sketch to your board, you'll hear a tone.

You can change the frequency (pitch) of the tone by updating the `frequency` variable.

```cpp
const int frequency = 440; // frequency of square wave in Hz
```

## Audio Playback Example Code
This example plays a PCM audio file when the Boot button is pressed. Check out [this Python script to convert WAV files to PCM files](https://github.com/adafruit/Adafruit_Media_Converters).

Click the button below to download the source code and header file. Unzip it, and open it with the Arduino IDE.

[Arduino_Audio_Playback.zip](https://cdn-learn.adafruit.com/assets/assets/000/135/684/original/Arduino_Audio_Playback.zip?1741272353)
When you open the code in the Arduino IDE, you will see the Arduino sketch code in one tab, and the header file in a second tab.

![](https://cdn-learn.adafruit.com/assets/assets/000/135/685/medium800/adafruit_products_Screenshot_2025-03-06_094802.png?1741272493)

Once you've uploaded the sketch to your board, you'll hear the startup tone play in a loop with a short pause.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/PCM510x_Examples/Arduino_Audio_Playback/Arduino_Audio_Playback.ino

# Adafruit PCM510x I2S DAC

## Downloads

## Files

- [PCM510x Datasheet](https://cdn-learn.adafruit.com/assets/assets/000/135/546/original/pcm5102.pdf?1741011272)
- [EagleCAD PCB Files on GitHub](https://github.com/adafruit/Adafruit-PCM510x-I2S-DAC-PCB)
- [Fritzing object in the Adafruit Fritzing Library](https://github.com/adafruit/Fritzing-Library/blob/master/parts/Adafruit%20PCM510x%20I2S%20DAC.fzpz)

## Schematic and Fab Print
![](https://cdn-learn.adafruit.com/assets/assets/000/135/547/medium800/adafruit_products_schem.png?1741011933)

![](https://cdn-learn.adafruit.com/assets/assets/000/135/548/medium800/adafruit_products_fab.png?1741011940 dimensions are in inches)


## Primary Products

### Adafruit PCM5102 I2S DAC with Line Level Output - 112dB SNR

[Adafruit PCM5102 I2S DAC with Line Level Output - 112dB SNR](https://www.adafruit.com/product/6250)
We&nbsp;stock a lot of chips and development boards&nbsp;that are able to do high quality digital I2S out, which makes for great quality audio playback. That's great when you have enough processing power to decode WAVs or MP3s in real time. However, we don't have a good selection of...

In Stock
[Buy Now](https://www.adafruit.com/product/6250)
[Related Guides to the Product](https://learn.adafruit.com/products/6250/guides)
### Adafruit PCM5100 I2S DAC with Line Level Output - 100dB SNR

[Adafruit PCM5100 I2S DAC with Line Level Output - 100dB SNR](https://www.adafruit.com/product/6251)
We&nbsp;stock a lot of chips and development boards&nbsp;that are able to do high quality digital I2S out, which makes for great quality audio playback. That's great when you have enough processing power to decode WAVs or MP3s in real time. However, we don't have a good selection of...

In Stock
[Buy Now](https://www.adafruit.com/product/6251)
[Related Guides to the Product](https://learn.adafruit.com/products/6251/guides)

## Related Guides

- [CircuitPython Chiptune Player](https://learn.adafruit.com/circuitpython-chiptune-player.md)
- [How to Fuse Motion Sensor Data into AHRS Orientation (Euler/Quaternions)](https://learn.adafruit.com/how-to-fuse-motion-sensor-data-into-ahrs-orientation-euler-quaternions.md)
- [Adafruit NAU7802 24-Bit ADC - STEMMA QT / Qwiic](https://learn.adafruit.com/adafruit-nau7802-24-bit-adc-stemma-qt-qwiic.md)
- [Introducing the Adafruit WICED Feather WiFi](https://learn.adafruit.com/introducing-the-adafruit-wiced-feather-wifi.md)
- [Adafruit VCNL4200 Long Distance IR Proximity and Light Sensor](https://learn.adafruit.com/adafruit-vcnl4200-long-distance-ir-proximity-and-light-sensor.md)
- [Adafruit TSSP77038 38KHz Infrared IR Demodulator Breakout](https://learn.adafruit.com/adafruit-tssp77038-38khz-infrared-ir-demodulator-breakout.md)
- [Adafruit MCP3421 18-Bit ADC](https://learn.adafruit.com/adafruit-mcp3421-18-bit-adc.md)
- [UFO Flying Saucer with Circuit Playground Express](https://learn.adafruit.com/ufo-circuit-playground-express.md)
- [Using Circuit Playground Express, MakeCode and CircuitPython on a Chromebook](https://learn.adafruit.com/using-circuit-playground-express-makecode-circuitpython-on-a-chromebook.md)
- [Fisher-Price USB Foot Pedal](https://learn.adafruit.com/fisher-price-usb-foot-pedal.md)
- [Adafruit LTC4316 I2C Address Translator](https://learn.adafruit.com/adafruit-ltc4316-i2c-address-translator.md)
- [Adafruit CC3000 WiFi](https://learn.adafruit.com/adafruit-cc3000-wifi.md)
- [MacroPad Braille Keycaps](https://learn.adafruit.com/macropad-braille-keycaps.md)
- [CustomEyesation: DIY Monster M4SK Graphics](https://learn.adafruit.com/customeyesation-diy-monster-m4sk-graphics.md)
- [Adafruit 1.9" Color IPS TFT Display](https://learn.adafruit.com/adafruit-1-9-color-ips-tft-display.md)
