Skip to the content
2 layers30 × 65 mmI2s codec, the printed circuit board in 3D

I2S Audio pHAT

Size
30 × 65 mm
Copper layers
2
Thickness
1.6 mm
Parts
60
Nets
70
Pads
205
Tracks, vias
510, 40
Pours
2
Routed
Yes
KiCad
KiCad 4
Created
6 Sep 2017
Updated
18 Jan 2018

Overview

I2s codec is an open-source printed circuit board by skiselev, from the skiselev/i2s_audio_phat repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board of 30 × 65 mm with 60 parts on 70 nets, routed with 510 tracks and 40 vias.

It is built around the CAT24C32WE- and TPS79333DBVR-TP. Its parts include 23 capacitors, 22 resistors, 4 connectors, 3 ICs and 1 crystal. It belongs with the audio and music boards of this library.

Main components

2

README

README.md

I2S Audio pHAT

I2S Audio Interface for Raspberry Pi Zero

Introduction

This is a Raspberry Pi Zero pHAT form-factor I2S audio interface board based on a Cirrus Logic (Wolfson) WM8731 audio codec. It provides line input, line output, headphones output, and includes an on-board microphone.

Micro 8088 Assembled Board

Hardware Documentation

Schematic and PCB Layout

Schematic - Version 3.0

PCB Layout - Version 3.0

Bill of Materials

I2S Audio pHAT project on Mouser.com - View and order all components except of the PCB.

I2S Audio pHAT project on OSH Park - View and order the PCB.

Component typeReferenceDescriptionQuantityPossible sources and notes
PCBI2S Audio pHAT PCB - Version 3.01Order from OSH Park
Integrated CircuitU1WM8731, I2S audio codec, SSOP281Mouser 238-WM8731SEDS/V
Integrated CircuitU2TPS79333DBVR, LDO, SOT23-51Mouser 595-TPS79333DBVR
Integrated CircuitU3CAT24C32WI-GT3, I2C EEPROM, SOIC81Mouser 698-CAT24C32WI-GT3
CrystalX112.288MHz, 3 mm x 5.3 mm1Mouser 717-7A-12.288MAAJ-T
MicrophoneMK19.7 mm, electret condenser microphone1Mouser 490-CMA-4544PF-W
ConnectorP13.5 mm audio jack, blue1Mouser 806-STX-31205B284C
ConnectorP23.5 mm audio jack, green1Mouser 806-STX-31205B577C
ConnectorP33.5 mm audio jack, black1Mouser 806-STX-3120-5B
ConnectorP420x2, 2.54 mm, socket1Mouser 517-929852-01-20-RB
HeaderJP12x1, 2.54mm, header1(optional) Mouser 855-M20-9990245
CapacitorC1, C222pF, 06032Mouser 77-VJ0603A220JXACBC
CapacitorC3-C5220pF, 06033Mouser 77-VJ0603A221GXAPBC
CapacitorC60.01uF, 06031Mouser 77-VJ0603Y103KXACBC
CapacitorC7-C120.1uF, 06036Mouser 77-VJ0603Y104JXJPBC
CapacitorC13-C151uF, 5 mm, radial3Mouser 647-USW1H010MDD
CapacitorC16, C1710uF, 5 mm, radial2Mouser 647-USW1H100MDD
CapacitorC18-C2110uF, 06034Mouser 81-GRM188R61A106KE9D
CapacitorC22, C23220uF, 6.3 mm, radial2Mouser 647-USW0J221MDD
ResistorR1-R633 ohm, 06036Mouser 603-RC0603FR-0733RL
ResistorR7, R8100 ohm, 06032Mouser 603-RC0603FR-07100RL
ResistorR9330 ohm, 06031Mouser 603-RC0603FR-07330RL
ResistorR10680 ohm, 06031Mouser 603-RC0603FR-07680RL
ResistorR111 kohm, 06031Mouser 603-RC0603FR-071KL
ResistorR12, R133.9 kohm, 06032Mouser 603-RC0603FR-073K9L
ResistorR14-R185.6 kohm, 06035Mouser 603-RC0603FR-075K6L
ResistorR19-R2247 kohm, 06034Mouser 603-RC0603FR-0747KL

Software Documentation

Raspbian Configuration

Open /boot/config.txt in your favorite editor (nano, vi) as root, for example:

text
sudo nano /boot/config.txt

Comment out the dtparam=audio=on line:

text
# Enable audio (loads snd_bcm2835)
#dtparam=audio=on

When using I2S Audio pHAT without ID EEPROM (see Raspberry Pi HAT ID EEPROM Programming section below), add the following lines:

text
# Enable WM8731 codec
dtparam=i2c_arm=on
dtparam=i2s=on
dtoverlay=i2s-mmap
dtoverlay=rpi-proto

Save the file and reboot the system.

Start alsamixer. If the I2S Audio pHAT is detected properly, it should show Card: snd_rpi_proto on the top left. Also use this opportunity to unmute Output Mixer HiFi control, otherwise the codec will not play any sound. To do so, use cursor keys to highlight that control, and then press the M key to unmute it.

When recording the sound, switch to Capture controls in alsamixer by pressing the F4 key. Next select the capture source: Line or Mic, and unmute it by pressing the Space key.

Now you can use your favorite application to play music or record sound. Enjoy!

Raspberry Pi HAT ID EEPROM Programming

The I2S Audio pHAT includes an ID EEPROM as specified by HAT requirements. This ID EEPROM allows Raspbian to automatically detect the I2S Audio pHAT, add it to the device tree, and load approprate overlays and kernel modules. Follow the instructions below to program the EEPROM.

Clone the Raspberry Pi hats repostory from GitHub:

text
git clone https://github.com/raspberrypi/hats

Clone the I2S Audio pHAT repository from GitHub:

text
git clone https://github.com/skiselev/i2s_audio_phat

Build the eepromutils in the hats repository:

text
cd hats/eepromutils
make

Create the i2s_audio_phat.eep ID EEPROM image, using the eeprom_settings_i2s_audio_phat.txt file provided in the i2s_audio_phat repository:

text
./eepmake ../../i2s_audio_phat/eeprom_settings_i2s_audio_phat.txt i2s_audio_phat.eep /boot/overlays/rpi-proto.dtbo

Finally, flash the i2s_audio_phat.eep ID EEPROM image to the EEPROM. Make sure to close the JP1 jumper on the I2S Audio pHAT before writing the EEPROM, for example using male to male jumper wire, or otherwise the write will fail.

text
sudo ./eepflash.sh -w -f=i2s_audio_phat.eep -t=24c32

Parts

60
QtyValueFootprintReferences
60.1uFCapacitors_SMD:C_0603_HandSolderingC7, C8, C9, C10, C11, C12
633Resistors_SMD:R_0603_HandSolderingR1, R2, R3, R4, R5, R6
547kResistors_SMD:R_0603_HandSolderingR18, R19, R20, R21, R22
410uFCapacitors_SMD:C_0603_HandSolderingC18, C19, C20, C21
45.6kResistors_SMD:R_0603_HandSolderingR14, R15, R16, R17
4HOLEmy_components:Hole_2.75mmHOLE1, HOLE2, HOLE3, HOLE4
31uFmy_components:Cap_Elec_Radial_5mmC13, C14, C15
3220pFCapacitors_SMD:C_0603_HandSolderingC3, C4, C5
2100Resistors_SMD:R_0603_HandSolderingR7, R8
210uFmy_components:Cap_Elec_Radial_5mmC16, C17
2220uFmy_components:Cap_Elec_Radial_6.3mmC22, C23
222pFCapacitors_SMD:C_0603_HandSolderingC1, C2
23.9kResistors_SMD:R_0603_HandSolderingR12, R13
10.01uFCapacitors_SMD:C_0603_HandSolderingC6
112.288MHzmy_components:Crystal_5.0x3.2mmX1
11kResistors_SMD:R_0603_HandSolderingR11
1330Resistors_SMD:R_0603_HandSolderingR9
1680Resistors_SMD:R_0603_HandSolderingR10
1CAT24C32Wmy_components:IC_SOIC8_NarrowU3
1Headphonesmy_components:Conn_Audio_3.5mm_StereoP3
1ID_WPmy_components:Conn_Pin_Header_2x1_2.54mm_NoKeyJP1
1Line Inputmy_components:Conn_Audio_3.5mm_StereoP1
1Line Outputmy_components:Conn_Audio_3.5mm_StereoP2
1Micmy_components:MicrophoneMK1
1OSHW-logo_silkscreen-front_4mmOSHW-logo:OSHW-logo_silkscreen-front_4mmG***
1RPi_Headermy_components:Conn_Pin_Header_20x2_2.54mmP4
1TPS79333DBVRmy_components:IC_SOT23-5_Hand_SolderingU2
1WM8731my_components:IC_SSOP28U1

Similar boards

  • 2 layers81.8 × 55.4 mmCm4-digipi carrier, the printed circuit board in 3D

    Cm4-digipi carrier

    hemna/cm4-digipi-carrier

    Raspberry Pi CM4 Carrier board for Ham radio PTT Control

    52 parts3
  • 4 layers20 × 55.7 mmQcomlt debugboard, the printed circuit board in 3D

    Qcomlt debugboard

    CodeLinaro-mirror/qcomlt_debugboard

    96boards specifications compliant Mezzanine used to control the DC Input, USB VBUS, PWR/RST buttons and Debug UART via a single USB2.0 CDC interface.

    40 partsCERN-OHL-P-2.0
  • 4 layers60 × 40 mmFrx, the printed circuit board in 3D

    Frx

    EIGSEP/CAD

    106 parts
  • 2 layers8.8 × 22.1 mmPsu, the printed circuit board in 3D

    Psu

    OpenSiPM/sipm-bias-control

    Single channel silicon photomultipliers for high-speed fluorescence imaging

    14 parts44
  • 4 layers65 × 18.1 mmPsu, the printed circuit board in 3D

    Psu

    OpenSiPM/sipm-linear-1mm

    SiPM spectrometer using 16 individual 1mm element

    32 parts7
  • 4 layers60 × 40 mmFrx, the printed circuit board in 3D

    Frx

    SETIatHCRO/Front-Page

    Documentation related to the Allen Telescope Array at the Hat Creek Radio Observatory Wiki Link Below

    100 parts5
  • 2 layers23 × 57 mmTeapot, the printed circuit board in 3D

    Teapot

    cillian64/teapot

    ukhasnet node with temperature, light and humidity sensing

    49 parts1
  • 2 layers8.8 × 10.6 mmPsu, the printed circuit board in 3D

    Psu

    kitspace-test-repos/kicad6-file-collection

    16 partsMIT

Questions

How big is the I2s codec PCB?

It measures 30 × 65 mm and has 2 copper layers, 1.6 mm thick.

What parts does the I2s codec use?

60 parts, built around the CAT24C32WE- and TPS79333DBVR-TP. 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 I2s codec KiCad files?

From the skiselev/i2s_audio_phat repository on GitHub, at the commit this page was made from: the board is KiCad/i2s_codec.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the I2s codec design in my own project?

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