Raspberry Pi Pico Audio Line Out Via PCM5102A I2S Breakout

By Jeremy S. Cook

Freelance Tech Journalist / Technical Writer, Engineering Consultant

Jeremy Cook Consulting

August 09, 2023


Image Credit: Jeremy Cook

In a previous article, I went over how you to use a MAX98357 amplifier breakout to power a speaker via digital I2S (Inter-IC Sound) signals. While this opens up audio output possibilities, it’s not meant to work with an external amplifier. For that you’ll need a simple DAC, or digital-to-analog converter.


Per a suggestion by Tod Kurt, AKA todbot, I obtained a trio of PCM5102A I2S DAC boards. These devices produce stereo line-out signals appropriate for driving externally powered speakers or headphones directly.

Trying It Out

Image Credit: Jeremy Cook

The linked article has example code for using this device with a Raspberry Pi Pico and an SD card reader as an audio player, but I wanted to forgo the SD card part. My adapted Pico code is found here, which plays audio directly off of its memory chip. As shown in the above photo, you can line up pins 16 (DIN), 17 (BCK), and GND (SCK) for direct connections on a breadboard sans jumpers. You will need to add jumpers for the LCK pin, GND, and VIN.

Once properly connected and programmed, I was able to plug in earbuds to hear a recording of me playing the baritone ukulele. Using a 3.5mm to ¼ inch connector, I also plugged the setup into my powered Positive Grid Spark Mini guitar amplifier, which sounded excellent.

The Board

Given its low price and rather ambiguous origins–todbot has tried, unsuccessfully, to track down its designer–one might be tempted to write this off as a low-quality device. Examining the schematic available here, however, this assumption appears to be far from the truth. Not only does this add in a similar arrangement of capacitors and resistors to the typical application shown in section 10.1.1 of Ti’s official datasheet, it also provides two separate onboard 3.3V supplies to separate out the analog and digital sections of the chip.

The board provides what appears to be a good 3.5mm connector, as well as separate breakouts for the left and right audio channels. Of course, given its ubiquitous and ambiguous nature, some boards might be constructed differently than others.

The Chip


Image Credit: Jeremy Cook

Per Ti’s datasheet (linked above), the PCM510xA comes in three different variations, with different dynamic range, signal-to-noise (SNR), and total harmonic distortion (THD). 

The chip onboard my PCB reads as a PCM5102A chip, though given the price of the board, and that it says BB on it, I suspect it wasn’t made by TI. Still, the module sounds good to my ears.

Other Options and Possible Improvements

This board isn’t the only DAC option on the market. As a versatile–though more expensive at around $19 USD–option, check out the Pico Audio Pack from Pimoroni. This includes both a stereo line out and a headphone amplifier. For the world of Raspberry Pi (SBCs), the Adafruit i2S Audio Bonnet gives your Pi line-out capabilities. You can also search for your preferred chip suppliers for I2S DACs. This will produce a plethora of chip options, though ready-to-go integrated audio boards are harder to find.



As an inexpensive audio add-on board for hobby projects, I would call the PCM5102A I2S DAC (available via a variety of online vendors) a very good option. Where I think something like this could also really shine would be as solder-on module with castellated holes, suitable for use as a component on a larger PCB. Additionally, breaking out the soft mute (XSMT) pin might be useful.



Jeremy Cook is a freelance tech journalist and engineering consultant with over 10 years of factory automation experience. An avid maker and experimenter, you can follow him on Twitter, or see his electromechanical exploits on the Jeremy S. Cook YouTube Channel!

More from Jeremy