Custom Raspberry CM5 carrier board with Class-D amplifier
Custom Raspberry Pi CM5 IO Board with Class-D Stereo Amplifier

Custom Raspberry Pi CM5 Carrier Board with Class-D Stereo Amplifier

In this design, Texas Instruments TPA3118 Class-D amplifier is integrated on the PCB carrying Raspberry Pi CM5.
Power supply is coming from USB-PD input via Type-C port.

Key Features

  • Raspberry Pi Compute Module 5 (with eMMC)
  • I/O ports
    • 1 x HDMI
    • 1 x DSI 22p FPC connector
    • 2 x USB 3.0 Type-A
    • 2 x USB 2.0 Type-A
    • 1 x M.2 M-Key PCIe slot for SSD
    • 1 x 3.5mm stereo Line-out jack
    • 1 x USB Type-C Debug/Flash
    • 1 x USB Type-C PD
    • 1 x PWM Fan connector
    • 1 x RGB LED 3-p connector connected to GPIO
    • 1 x rotary encoder input connected to GPIO
  • ICs
    • Texas Instruments PCM5102A, 2.1 VRMS, 112/106/100 dB Audio Stereo DAC with PLL and 32-bit, 384 kHz PCM Interface
    • Texas Instruments TPA3118D2, 30-W stereo, 60-W mono, 4.5- to 26-V supply, analog input Class-D audio amplifier
    • Injoinic IP2721, TYPEC/PD2.0/PD3.0 Physical Layer IC for USB Type-C input Interfaces
    • Terminus Tech FE1.1s, USB 2.0 High Speed 4-port Hub Controller

PCB Design

Raspberry Pi CM5 comes with 2 x USB 3.0 ports. Thus, I could directly connect the USB 3.0 connectors to CM5’s 100p connector.

The board also needed to have 2 x USB 2.0 ports. So I added an USB 2.0 hub IC and an USB path switch chip, similar to the official Raspberry Pi CM5 IO board. The CC pins of Type-C port is directly connected to CM5’s CC pins. Thus, the board will draw 5V 5A when it is plugged to a compatible USB PD adapter from Raspberry Pi. However, this Type-C port is only for flashing OS to CM5. It is not for main power supply input.

For main power supply input, another Type-C port is added for USB-PD input. The Injoinic IP2721 USB-PD controller is set to draw 15V 2A from a compatible USB-PD adapters. The main power supply voltage is chosen as 15V, because the speaker output power is designed for 2 x 10W speakers. However, in case we need higher audio output power, a DNP resistor placeholder is added on the PCB, so that 20V power option can be added later easily.

DNP resistor for setting the main power supply voltage as 20V from USB-PD

To minimize EM emission for EMI/EMC testing, the path between TPA3118 amplifier IC and filtering inductors are kept as short as possible. However, this resulted the power inductors placed very close each other. This may cause heat dissipation issue. In the testing, if the inductors get hot more than the expected 85°C at room temperature, we may need to make them sparsely placed.

Class-D amplifier PCB layout for Texas Instruments TPA3118

The differential pairs for HDMI, DSI, USB, and PCIe Gen2 are all set as 90Ω, which is within the specification of USB, HDMI, and PCIe. By using 1.6mm thickness 4-layer FR4 stack of JLCPCB, JLCPCB’s impedance calculator gives the result of 5.1mm trace thickness with 8mm clearance between trace and trace-to-copper region.

JLCPCB Impedance Calculator is calculating differential pair impedance.
Differential Pair Routings for HDMI, USB, MIPI DSI, and PCIe Gen2

PCBA Prototyping and Testing

The PCBA is ordered on both JLCPCB and PCBWay. The pricing was similar, however, JLCPCB delivered the assembled board much faster than PCBWay did.

PCBA prototype by JLCPCB for Raspberry Pi CM5 carrier board

At the initial testing, the Raspberry CM5 was successfully booting, and all digital ports like HDMI, USB 2.0, and USB 3.0 worked as expected. Futher testing for Class-D amplifier is left to be done, because the PCM5102A driving and GPIO control for TPA3118 is not ready for the Raspberry OS application in development.

Initial testing of the custom Raspberry Pi CM5 carrier board with Class-D amp

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *