Cheap PCM5102a board working


Just a note since I’ve seen a few posts where people either tried or intended to use one of the cheap PCM5102a boards. I got one working with Zynthian this morning, man was I late to work! Choose the HifiBerry DAC+ light.


DAC BOARD   > Raspberry Pi 3 Model B connector J8
SCK         > Not wired but per advice connected to (GND)
BCK         > PIN 12    (GPIO18)
DIN         > PIN 40    (GPIO21)
LRCK        > PIN 35    (GPIO19)
GND         > PIN 6     (GND) Ground
VIN         > PIN 2     (5V)

Tips were from here:

Pimoroni pHat DAC useable
Volume encoder produces clicking sounds

Hi @emu !

Thanks for sharing!!
Would you like to write a tutorial for the wiki? :wink:



I should have mentioned, that build specifically was a stock Zynthian “Gorgona Omega” SD-image, configured for Kits v2 image using the official Raspberry Pi 7" touchscreen display.

Since all GPIO pins are available (ignoring how you choose to power the screen) its a simple "connect it up and change the Hardware/Audio via the web tool to “HifiBerry DAC+ light”. The instructions are identical to the existing * Build a simple Zynthian using only a Pi, the official RPF 7" touchscreen and a USB audio device, but I it worked after several attempts at USB (without knowing comments others made about being careful of what else is plugged into USB and in what order – oops). I’m not even sure I used a fresh image when I got the PCM5102a board working.

I’m actually going to attempt a new build using a 5" HDMI/touchscreen and a variant of the same PCM5102a board and see if I can get it going without hooking up the LCD pins like the troublesome GPIO18 that conflicts with these cheap sound boards. If I get that working, than yes I’ll be doing a write-up :slight_smile:


Could you tell us the performance index of Pianoteq?
You need to open the Pianoteq UI for that


Just got it working with a 5" HMDI touchscreen using the touch pins only and a different version of the PCM5102a module. Had to play with the calibration on the smaller cheaper screen as mine wasn’t responding to touch very well to get to the admin menu.
And the great thing is these are separate builds so I’ve two boxes to play with while I wait for my real V2 kit to arrive.

@mheidt: Is that something I can do from the touch screen or ssh console? I can load Pianotech 6.0 Demo and it sounds great, but I don’t see a “performance index” option. While I have a ton of parts from retro-game builds (various micro-controllers, Zero’s, etc) I don’t have a MCP23017 or more than a “Keyes” rotary encoder or two so I’m literally “pawing” at this thing getting it to load.


You can login via “ssh -X zynthian.local” (from Linux), start Pianoteq and after some seconds the Pianoteq window should appear on your desktop. Then navigate to “options” (or something similar) and search for the performance settings. There is a number named “performance index”.

I also bought two of those boards and hope I can test them soon.

Regards, Holger


When you ssh -X into it and start Pianoteq, a window opens up on your computer with the SSH console.
Look around. I guess you will find it one of the preference windows.


@C0d3man & @mheidt (Randomly banging on the keys):

This is using the non-Waveshare 5" HDMI using only the touch pins and the “2nd DAC” described at this link.

processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

Hardware : BCM2835
Revision : a22082


Here are the two (powered off) side by side. Needless to say for simplicity I would highly recommend the Official Pi Touchscreen and the PCM5102a module with the L-shaped pin arrangement. Had I read about it before trying to hook it up I would have made “built-in” 3.3v and gnd bridges when I soldered the headers on).


This is the Official Pi Display with the “1st DAC” module. Note that the Performance index is 12 compared to 15 on the other. Same version of Pi 3 (not the Pi 3 B+, I’ll grab a couple of those this weekend and see if there’s a difference).


processor : 3
model name : ARMv7 Processor rev 4 (v7l)
BogoMIPS : 38.40
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4

Hardware : BCM2835
Revision : a02082


yes, quite good.
My audioinjector zero setup gets a 16 and Holgers Zynthian-Less Pianoteq image 18


Winner :ok_man: :smile:


@c0d3man Less is best or wrist?


AFAIK less is worse - I hope so, because otherwise I would have lost. :joy:


And what would be the minimum necessary for Pianoteq to behave as expected?


Difficult to say: If you reduce the number of voices (and can live with it) or the sample rate or the buffer size, you can use a “smaller” board if necessary.

I am using the Raspi-3B+ with settings which are ok for my playing (22500 Hz internal Srate, 64 voices, 96 bytes buffer) - perhaps not enough for a pro(?).

The absolute minimum (IMHO): Raspi-2, maybe only working as a toy…

Regards, Holger


fyi, the zynthian with AudioInjector Ultra 2 is showing 16 as well.
But it needs more power and I see the yellow flash again.
I am going to buy a 6A power supply :slight_smile:


The PCM5102a is supported quite well (and quite easily) by Raspbian. It requires enabling i2s and dtoverlay=hifiberry-dac but it fails on the standard “Gorgona Omega” SD-image. I wonder if it relates to the GPIO18 conflict you reference (whatever that is). GPIO18 is the bit-clock hence required by the PCM5120a. Could it be that Zynthian uses GPIO18 for another purpose and hence hijacks the pin from the i2s driver?

I2S is quite simple: PCM data is streamed serially on the data line and is clocked into the ADC using the bit-clock. ADC switching (left / right - or even more channels is permissible) is done by the LRCLK. A master clock can drive the ADCs but tying this input to GND makes the PCM5102a generate it internally which is why this chip works with RPi which does not proved a master clock.

[Edit] I am not sure why but it is now working:

Installed “Gorgona Omega” SD-image.
In Web interface:
Set audio interface to HifiBerry DAC+ light
Set display to Generic HDMI display
Set wiring to Dummies
WORKING with display on HDMI and USB mouse pointer. Sound from I2S. USB MIDI input.
It occurred to me after posting this that GPIO18 can’t be relevant because it is used by HiFiBerry DAC+ Light.