Skip to main content
Raspberry Pi HATs

Building a USB Power Delivery Trigger HAT

Overview

This tutorial will walk you through building a USB Power Delivery (PD) trigger HAT for Raspberry Pi. The HAT uses a CH224K controller to negotiate voltage from USB-C PD power supplies, providing configurable 5V to 20V output.

Objectives

A USB PD trigger HAT demonstrates advanced power electronics concepts:

  • USB Power Delivery Protocol - Understanding PD negotiation
  • Voltage Selection - Configuring output voltage via pins
  • Power Distribution - Safe delivery of higher voltages
  • HAT Design - Raspberry Pi expansion board conventions

Use Cases

  • High Power Projects - Power motors, heaters, or high-brightness LEDs
  • Battery Charging - Build chargers for various battery chemistries
  • Lab Power Supply - Portable voltage source from USB-C chargers
  • Raspberry Pi Clusters - Efficient power for multiple Pis

Bill of Materials

ComponentValueFootprintPurpose
USB-C Connector-16-pinPD power input
CH224K-ESSOP-10PD controller
LED1Green0603Power good indicator
R11kΩ0402LED current limit
C110µF0805Output filtering
C2100nF0402High-freq filtering
J22-pin5.08mmTerminal block output
J340-pin2.54mmRaspberry Pi header

Understanding USB Power Delivery

USB PD allows negotiation of higher voltages and currents:

ProfileVoltageMax CurrentMax Power
5V5V3A15W
9V9V3A27W
12V12V3A36W
15V15V3A45W
20V20V5A100W

The CH224K handles all PD communication automatically.

Circuit Design

Step 1: CH224K Voltage Configuration

The CH224K selects output voltage based on CFG pin connections:

CFG3CFG2CFG1Output Voltage
FloatFloatFloat5V
FloatFloatGND9V
FloatGNDFloat12V
FloatGNDGND15V
GNDFloatFloat20V
Schematic Circuit Preview

Step 2: USB-C Connection

Connect the USB-C CC pins to the controller for PD communication:

Schematic Circuit Preview

Step 3: Output Filtering

Output capacitors ensure stable voltage delivery:

Schematic Circuit Preview

Step 4: Power Good LED

The PG pin indicates successful voltage negotiation:

Schematic Circuit Preview

Complete Schematic

Schematic Circuit Preview

Testing the HAT

  1. Visual Inspection - Check solder joints and component orientation
  2. Continuity Test - Verify no shorts between VOUT and GND
  3. Power Test - Connect to a USB-C PD charger
  4. LED Check - Green LED should illuminate when voltage is negotiated
  5. Voltage Verify - Measure output with a multimeter

Safety Considerations

  • Always verify voltage before connecting loads
  • Use appropriate gauge wires for high current
  • Include reverse polarity protection for sensitive loads
  • Consider adding a fuse for overcurrent protection

Ordering the PCB

Export the fabrication files and upload to JLCPCB. See Ordering Prototypes for detailed instructions.