Skip to the content
4 layers65 × 56.5 mmRPi Hat, the printed circuit board in 3D

Raspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver

Size
65 × 56.5 mm
Copper layers
4
Thickness
4.69 mm
Parts
64
Nets
62
Pads
213
Tracks, vias
252, 83
Pours
4
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
28 Aug 2022
Updated
28 Aug 2022

Overview

RPi Hat is an open-source printed circuit board by paulh002, from the paulh002/rpi-audio-hat repository on GitHub, published under the MIT licence. It is a 4-layer board of 65 × 56.5 mm with 64 parts on 62 nets, routed with 252 tracks and 83 vias.

It is built around the LM1117-3.3 and PCM5102PW. Its parts include 25 capacitors, 16 resistors, 8 connectors, 5 inductors and 3 ICs. It belongs with the audio and music and radio and wireless boards of this library.

Main components

2

README

README.md

rpi-audio-hat

Raspberry Pi PCM1808 and 5102 audio hat for SDR tranceiver. This board can be used with the Tayloe mixers in this repo https://github.com/paulh002/SoapyHifiBerry as alternative for the HifiBerry The SoapyHifiBerry driver is used to supply IQ signals to the SDR software see sdrberry SDR software (https://github.com/paulh002/sdrberry) Configure the SoapyHifiBerry config file with the correct audio board name and sample frequencey

To test the board:

  • To check if board is loaded:
text
aplay -l 
arecord -l
  • Reord and play:
text
arecord -D hw:0,1 -c 2 -f S24_LE -r 96000 test.wav
aplay -c2 -f S24_LE -r 96000 test.wav

Hardware

Kicad files and gerbers are availeble in hardware directory. R10 and R11 are used to switch between clock from the Pi or internal PLL of the pcm5102 (gnd is internal pll) J5 exposes I2S for setting the mixer frequency of the si5351 on the Tayloe mixer board.

Prototype

Picture shows prototype using cheep aliexpress adc and dac boards To connect the boards you can use this table:

pcm 5102

BoardGPIOPin
SCK412
LCK1935
BCK1812
DIN2140
5V5V2
FMTGND19
FLTGND19
XSMT3v1

pcm 1808

BoardGPIOPin
SCK412
LCK1935
BCK1812
Dout2038
MD03V1
MD13V1
5V5V2
3V3V1
SCLK47

prototype

Kicad files

Kicad design is a pcb version of the audio board

pcb

How compile and install driver for pcm1808 and pcm5102

To support the audio card in slave mode an overlay need to be created. The raspberry pi supports already most audio cards with pcm1808 and pcm5102. The procedure and files are taken from Akiyuki Okayasu github page https://github.com/AkiyukiOkayasu/RaspberryPi_I2S_Slave

Compile on Raspberry Pi

bash
dtc -@ -H epapr -O dtb -o genericstereoaudiocodec.dtbo -Wno-unit_address_vs_reg genericstereoaudiocodec.dts

Copy genericstereoaudiocodec.dtbo to /boot/overlays

bash
sudo cp genericstereoaudiocodec.dtbo /boot/overlays

Edit /boot/config.txt
Enable I2S and add genericstereoaudiocodec device tree overlay

/boot/config.txt
#dtparam=i2c_arm=on
dtparam=i2s=on
#dtparam=spi=on
dtoverlay=genericstereoaudiocodec

If you don't need HDMI audio output and Raspberry Pi's headphone output, comment out "dtparam=audio=on" by hash.
like this.

/boot/config.txt
#dtparam=audio=on

Parts

64
QtyValueFootprintReferences
910uCapacitor_SMD:C_0805_2012MetricC1, C2, C3, C5, C9, C13, C15, C19, C20
8100nCapacitor_SMD:C_0805_2012MetricC7, C8, C10, C14, C16, C21, C23, C25
851Resistor_SMD:R_0805_2012MetricR4, R5, R6, R7, R8, R9, R10, R11
5LResistor_SMD:R_0603_1608MetricL1, L2, L3, L4, L5
4RPi_Hat:RPi_Hat_Mounting_Hole, , ,
21.5nCapacitor_SMD:C_0805_2012MetricC22, C24
2100pCapacitor_SMD:C_0805_2012MetricC4, C6
210kResistor_SMD:R_0805_2012MetricR2, R3
21kResistor_SMD:R_0805_2012MetricR1, R14
22.2kResistor_SMD:R_0805_2012MetricR15, R16
22.2uCapacitor_SMD:C_0805_2012MetricC17, C18
2470Resistor_SMD:R_0805_2012MetricR12, R13
247uCapacitor_THT:C_Radial_D5.0mm_H7.0mm_P2.00mmC11, C12
2Conn_CoaxialConnector_Coaxial:SMA_Amphenol_132134_VerticalJ3, J4
2InConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ7, J8
1I2CConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ5
1INLConnector_Coaxial:SMA_Amphenol_132134_VerticalJ2
1INRConnector_Coaxial:SMA_Amphenol_132134_VerticalJ1
1LM1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1MD0Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP1
1MD1Jumper:SolderJumper-2_P1.3mm_Open_Pad1.0x1.5mmJP2
1OscillatorCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1PCM1808PWRLibrary:SOP65P640X120-14NU1
1PCM5102Package_SO:TSSOP-20_4.4x6.5mm_P0.65mmU3
1RPi_GPIORPi_Hat:Pin_Header_Straight_2x20J6

Similar boards

  • 2 layers150.5 × 127 mmEurorack engine, the printed circuit board in 3D

    Eurorack engine

    sinneb/esp32-hvcc

    Heavy compiler (hvcc) sources running on ESP32-DevKitC powered eurorack module

    81 parts29
  • 2 layers53.5 × 101.8 mmSony scopeman, the printed circuit board in 3D

    Sony scopeman

    lucysrausch/sony-scopeman

    Hardware Design files of a replacement mainboard for the Sony Watchman FD-10. This turns it into a bluetooth and WiFi-enabled vector display.

    135 parts69
  • 2 layersT41-Main+RF board V012, the printed circuit board in 3D

    T41-Main+RF board V012

    DRWJSCHMIDT/T41

    This is the repository for the officially released V10, V11, and V12 versions of the T41 Software Defined Transceiver hardware and kits.

    255 parts66
  • 4 layers55 × 97 mmMelodio SelfMate V2, the printed circuit board in 3D

    Melodio SelfMate V2

    zeeblaze/Melodio-SelfMate

    Your Ultimate Portable Music Companion For Home Automation.

    121 parts53
  • 2 layers80 × 65 mmSquishbox8, the printed circuit board in 3D

    Squishbox8

    GeekFunkLabs/squishbox

    Software and design files for a Raspberry Pi sound module enclosure

    35 parts51MIT
  • 2 layers130.8 × 81.5 mmMinidexed, the printed circuit board in 3D

    Minidexed

    handeyeco/minidexed-pcb

    PCB for MiniDexed

    53 parts23
  • 2 layers39.9 × 54.6 mmSimplecodec3, the printed circuit board in 3D

    Simplecodec3

    cyberomusubi/simplecodec3

    Audio input/output board for Raspberry Pi, Jetson Nano (PCM5102A+PCM1808)

    44 parts19
  • 2 layers99.1 × 72.9 mmTone ale, the printed circuit board in 3D

    Tone ale

    lxschwalb/tone_ale

    rp2040 based guitar pedal

    57 parts19

Questions

How big is the RPi Hat PCB?

It measures 65 × 56.5 mm and has 4 copper layers, 4.69 mm thick.

What parts does the RPi Hat use?

64 parts, built around the LM1117-3.3 and PCM5102PW. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the RPi Hat KiCad files?

From the paulh002/rpi-audio-hat repository on GitHub, at the commit this page was made from: the board is hardware/RPi_Hat.kicad_pcb and its schematic hardware/RPi_GPIO.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the RPi Hat design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).