Skip to main content
Tutorials

Building a USB PD Trigger HAT

Overview

This tutorial will walk you through building a USB Power Delivery (PD) Trigger HAT using tscircuit. This board uses a USB PD Controller (like the CH224K or IP2721) to negotiate higher voltages (up to 20V) from a standard USB-C Power Delivery charger. It features terminal block outputs, a status LED, and filtering capacitors.

What is a USB PD Trigger?

A USB Power Delivery (PD) Trigger is a circuit that acts as a "sink" device to a USB PD host (like a laptop charger). Instead of receiving the default 5V, the trigger chip communicates with the charger to request a higher voltage (such as 9V, 12V, 15V, or 20V) depending on the configuration.

This is extremely useful when you need to power higher-voltage components (like motors or large LED arrays) from a standard USB-C charger.

Circuit Requirements

Our USB PD Trigger HAT needs to:

  • Accept a USB-C input from a PD-capable power supply
  • Use a PD controller (CH224K or similar) to negotiate the desired voltage
  • Filter the output using decoupling capacitors
  • Display the power status using an LED
  • Provide the negotiated voltage through a terminal block for external use

Building the Circuit Step by Step

Step 1: Add the USB-C Connector

We use the `SmdUsbC` component to provide the USB-C port. The `connections` property automatically wires the `VBUS` and `GND` nets.

Schematic Circuit Preview

Step 2: Add the PD Controller

Next, we define our CH224K PD Controller chip. We specify its pins and schematic port arrangement.

Schematic Circuit Preview

Step 3: Voltage Negotiation and Capacitors

We use the `CFG` pins to request a specific voltage. By connecting `CFG1` to `VDD` via a resistor, and grounding `CFG2` and `CFG3`, we tell the CH224K to request 20V.

We also add a 10uF and a 0.1uF capacitor to filter the VBUS power line.

Schematic Circuit Preview

Step 4: Status LED and Terminal Block

To monitor if the board has power, we add an LED with a 2.2k current-limiting resistor. The `Terminal Block` is represented by a 2-pin header to easily connect our external load.

Schematic Circuit Preview

Bill of Materials

  • 1x USB-C SMD Connector
  • 1x CH224K (or similar) PD Controller
  • 1x 10uF Capacitor (0603)
  • 1x 0.1uF Capacitor (0402)
  • 1x Green LED (0603)
  • 1x 2.2kΩ Resistor (0603)
  • 1x 10kΩ Resistor (0402)
  • 1x 2-Pin Terminal Block (2.54mm or 5.08mm pitch)

Testing Procedures

  1. Continuity Check: Before plugging in the USB cable, use a multimeter to verify there is no short circuit between `VBUS` and `GND`.
  2. First Power Up: Plug in a USB PD power bank or charger. Verify the Status LED lights up.
  3. Voltage Measurement: Measure the voltage at the terminal block outputs. It should read approximately 20V (if configured for 20V) or whatever voltage you set via the `CFG` pins.
  4. Load Testing: Connect a small load (e.g., a power resistor or a DC motor) to the terminal blocks and ensure the voltage does not drop significantly.

Conclusion

You've built a USB Power Delivery Trigger HAT capable of pulling up to 20V from a modern USB-C charger! You can expand this project by adding DIP switches to the `CFG` pins, allowing you to select different output voltages dynamically.