USB-C Power Delivery (USB PD) turns a common phone charger into a programmable bench supply. A single cable can deliver 5V, 9V, 12V, 15V, 20V and up to 100W, and a small trigger IC or microcontroller negotiates the voltage you need. This guide covers how the protocol works, which hardware to choose, how to wire it, and how to read the negotiated voltage in firmware.
Quick Takeaways
- USB PD negotiates voltage over the CC1/CC2 pins. A passive cable and a bare connector only give you 5V.
- A PD trigger board (such as the CH224K or IP2721) requests 9V, 12V, 15V, or 20V with no firmware.
- A resistor pair of 5.1kΩ on CC1 and CC2 makes a USB-C port advertise itself as a legal 5V sink.
- Always add a TVS diode, a fuse, and bulk capacitance to protect your load.
| Method | Voltage | Max Current | Firmware Needed | Cost | Best For |
|---|---|---|---|---|---|
| Two 5.1kΩ resistors | 5V | 3A | No | Lowest | Simple 5V boards |
| CH224K trigger | 5–20V | 5A (with e-marked cable) | No | Low | Fixed-voltage builds |
| IP2721 trigger | 5–20V | 3A | No | Low | Compact designs |
| STUSB4500 | 5–20V | 5A | Yes (I2C config) | Medium | Custom profiles |
| Dedicated PD controller (e.g., TPS25730) | 5–20V | 5A | Yes | High | Production products |
How USB-C Power Delivery Works
Old USB ports gave you 5V at 500mA on a VBUS line. USB-C changed the physical connector. USB PD changed the electrical contract.
Two devices talk over the CC (Configuration Channel) wire. The source (charger) advertises what it can supply. The sink (your project) picks a profile. The charger then switches VBUS to the chosen voltage.
The Basic Handshake
- The charger places a pull-up resistor, Rp, on CC.
- Your sink places a pull-down resistor, Rd = 5.1kΩ, on CC.
- The charger detects Rd and enables 5V on VBUS.
- For higher voltages, the sink sends PD messages over CC (a BMC-encoded digital signal at 300kHz).
- The source replies with its Source Capabilities list.
- The sink sends a Request for one profile.
- The source confirms with Accept and PS_RDY, then changes the voltage.
Steps 4 through 7 are the part you outsource to a PD trigger IC or a PD sink controller.
Standard Fixed Voltage Profiles
| Voltage | Typical Charger Wattage | Typical Use |
|---|---|---|
| 5V | Up to 15W | Microcontrollers, sensors |
| 9V | Up to 27W | Guitar pedals, small audio |
| 12V | Up to 60W | LED strips, fans, relays |
| 15V | Up to 45W | Laptop-class loads |
| 20V | Up to 100W | Motors, soldering irons, bench supplies |
Voltages above 20V (28V, 36V, 48V) exist under PD 3.1 Extended Power Range (EPR). They require 5A e-marked cables and compatible chargers.
Pinout Configuration of a USB-C Connector
A full USB-C receptacle has 24 pins. Makers usually need only a few.
| Pin | Function | Notes |
|---|---|---|
| VBUS | Power (5–20V) | Four pins, tie them together |
| GND | Ground | Four pins, tie them together |
| CC1 / CC2 | Configuration Channel | Needed for PD and 5V detection |
| D+ / D- | USB 2.0 data | Optional for power-only builds |
| SBU1 / SBU2 | Sideband use | Leave unconnected |
Cheap breakout boards often expose only VBUS, GND, CC1, CC2, D+, and D-. Check that your breakout includes the 5.1kΩ pull-downs. Many do not.
Option 1: Dumb 5V With Two Resistors
This is the simplest design and works with every compliant USB-C charger.
Wiring:
- Connect a 5.1kΩ resistor from CC1 to GND.
- Connect a second 5.1kΩ resistor from CC2 to GND.
- Connect VBUS to your 5V rail.
Without those resistors, a USB-C to USB-C cable from a compliant charger delivers 0V. This is the most common beginner failure. If your project is dead on a USB-C charger, check CC1 and CC2 first.
For USB-A to USB-C cables, the resistors are not required. The cable already includes a 56kΩ pull-up on CC.
Option 2: PD Trigger Boards (No Code)
A PD trigger board hardwires the negotiation. You set the target voltage with solder jumpers, DIP switches, or a resistor on a config pin.
CH224K Trigger Configuration
The CH224K selects its voltage using the CFG1, CFG2, and CFG3 pins.
| CFG1 | CFG2 | CFG3 | Requested Voltage |
|---|---|---|---|
| 1 | — | — | 9V |
| 0 | 0 | 0 | 9V (variant dependent) |
| Open | Open | Open | 9V default on some boards |
Pin tables vary by board vendor. Always read the silkscreen and the datasheet for your exact module. The CH224K supports 5V, 9V, 12V, 15V, 20V, and some revisions support 28V with PPS.
Practical Rules for Trigger Boards
- Confirm the charger supports your voltage. A 5V/3A phone charger will not provide 12V.
- Check current rating of the trigger board’s traces and connector, not just the IC.
- Measure VBUS with a multimeter before connecting your load.
- If negotiation fails, most boards fall back to 5V.
Option 3: Programmable Sink With the STUSB4500
The STUSB4500 is a USB PD sink controller with non-volatile memory (NVM). You program up to three Power Data Objects (PDOs) over I2C, and it stores them permanently.
Key Specifications
| Parameter | Value |
|---|---|
| Input voltage | 4.1V to 22V |
| Interface | I2C (up to 400kHz) |
| I2C address | 0x28 (default, set by ADDR0, ADDR1) |
| PDO count | 3 |
| Max current per PDO | 5A |
| Output control | Drives an external P-channel MOSFET on VBUS_EN_SNK |
Circuit Breakdown
- VBUS from the connector feeds the VBUS_SENSE pin through a divider or direct tie, per datasheet.
- CC1 and CC2 connect directly to the matching CC1DB/CC1 and CC2DB/CC2 pins.
- VBUS_EN_SNK drives the gate of a P-channel MOSFET that gates power to your load.
- Add a 100nF and a 10µF capacitor near VDD.
- Connect SDA and SCL to your microcontroller with 4.7kΩ pull-ups to 3.3V.
The MOSFET matters. Your load stays disconnected until the PD contract completes, so a high-voltage mistake cannot reach your electronics.
Arduino Code: Read STUSB4500 Status
This sketch reads the RDO (Request Data Object) register to confirm which voltage and current were negotiated. It uses the standard Wire library on an ESP32 or Arduino with 3.3V logic.
#include <Wire.h>
// STUSB4500 default 7-bit I2C address
#define STUSB_ADDR 0x28
// Register holding the Request Data Object (RDO), 4 bytes
#define RDO_REG 0x91
void setup() {
Serial.begin(115200);
Wire.begin(); // SDA/SCL default pins
Wire.setClock(400000); // 400kHz fast mode supported by STUSB4500
delay(500); // Allow PD negotiation to complete
}
void loop() {
uint32_t rdo = 0;
Wire.beginTransmission(STUSB_ADDR);
Wire.write(RDO_REG); // Point to the RDO register
Wire.endTransmission(false);
Wire.requestFrom((uint8_t)STUSB_ADDR, (uint8_t)4);
// Assemble 4 bytes, little-endian
for (int i = 0; i < 4 && Wire.available(); i++) {
rdo |= ((uint32_t)Wire.read()) << (8 * i);
}
// Bits 19:10 hold the operating current in 10mA units
uint16_t current_mA = ((rdo >> 10) & 0x3FF) * 10;
Serial.print("Operating current request: ");
Serial.print(current_mA);
Serial.println(" mA");
delay(1000);
}
This reads the negotiated current. To read the active PDO voltage, read the PDO registers starting at 0x85 and decode bits 19:10 (voltage in 50mV units). Use the open-source STUSB4500 library from SparkFun for full NVM programming.
Option 4: Full Software PD With a Sink Controller
When you need PPS (Programmable Power Supply), which lets you request any voltage from 3.3V to 21V in 20mV steps, move to an advanced controller. The TPS25730, CYPD3177, and STUSB4500 (fixed profiles only) serve different needs.
| Feature | STUSB4500 | CH224K | TPS25730 |
|---|---|---|---|
| Fixed PDOs | Yes | Yes | Yes |
| PPS support | No | Limited | Yes |
| I2C control | Yes | No | Yes |
| Firmware development | Config only | None | Required |
| Ease of use | High | Highest | Low |
| Best for | Hobby builds | Quick prototypes | Commercial products |
Use PPS for battery chargers and bench supply builds. A PPS charger can adjust voltage dynamically, which suits CC/CV lithium charging.
Choosing the Right Charger
Not all chargers offer every profile. Look at the label.
- A label reading 5V/3A, 9V/3A, 12V/2.25A, 15V/3A, 20V/5A supports all fixed profiles.
- Chargers from GaN brands often include PPS.
- A phone charger marked 5V/2A only is not a PD charger.
- Laptop chargers are excellent sources: 65W and 100W units are cheap and widely available.
Use a certified e-marked cable for currents above 3A. An unmarked cable limits you to 3A, even if the charger supports 5A.
Protecting Your Circuit
PD chargers hot-plug at up to 20V. Hot-plugging a long cable onto a low-ESR capacitor creates a voltage spike that can reach double the supply voltage due to cable inductance. Protect against it.
| Protection | Part Example | Purpose |
|---|---|---|
| TVS diode | SMBJ24A (for 20V rails) | Clamps spikes above 24V |
| Fuse | PTC resettable, 3A | Limits fault current |
| Reverse polarity | P-channel MOSFET | Blocks reverse connection |
| Bulk capacitor | 100µF electrolytic | Absorbs load transients |
| Ceramic bypass | 100nF X7R | Filters high-frequency noise |
For a 20V rail, select a TVS with a standoff voltage above 20V, such as the SMBJ22A or SMBJ24A. Use capacitors rated for at least 35V. Ceramic capacitors lose a significant part of their capacitance under DC bias, so check the DC-bias curve in the datasheet.
Step-Down: Getting 3.3V and 5V From 12V or 20V
Most microcontrollers need 3.3V or 5V. Add a buck converter after the PD stage.
| Regulator Type | Example | Efficiency | Noise | Cost |
|---|---|---|---|---|
| Linear (LDO) | AMS1117-3.3 | Low (heat at 20V in) | Lowest | Lowest |
| Buck module | MP1584EN | 90%+ | Moderate | Low |
| Buck IC | TPS62160 | 95%+ | Low | Medium |
An LDO from 20V to 3.3V at 200mA wastes (20 − 3.3) × 0.2 = 3.34W as heat. That melts a small package. Use a buck converter whenever the input-to-output drop is large.
Real-World Project: 12V LED Strip Controller With ESP32
This build powers a 12V LED strip and an ESP32 from a single USB-C PD charger.
Parts List
- CH224K PD trigger board (set to 12V)
- MP1584EN buck module (set to 5V)
- ESP32 DevKit
- IRLZ44N logic-level N-channel MOSFET
- 10kΩ pull-down resistor
- 220Ω gate resistor
- 12V LED strip (max 3A)
- SMBJ15A TVS diode
Wiring Steps
- Plug the CH224K into a 30W or higher PD charger.
- Verify 12V on the output with a multimeter.
- Connect the SMBJ15A across the 12V rail and GND.
- Feed 12V to the LED strip positive terminal.
- Connect the LED strip negative to the MOSFET drain.
- Connect the MOSFET source to GND.
- Connect GPIO25 to the MOSFET gate through the 220Ω resistor.
- Place the 10kΩ resistor from gate to GND.
- Feed 12V into the MP1584EN, set it to 5V, and connect the output to the ESP32 VIN pin.
- Tie all grounds together.
MicroPython Code: PWM Dimming
from machine import Pin, PWM
import time
# GPIO25 drives the MOSFET gate
led = PWM(Pin(25), freq=1000) # 1kHz PWM avoids visible flicker
while True:
# Ramp brightness up (duty range is 0-1023 on ESP32 MicroPython)
for duty in range(0, 1024, 8):
led.duty(duty)
time.sleep_ms(10)
# Ramp brightness down
for duty in range(1023, -1, -8):
led.duty(duty)
time.sleep_ms(10)
The ESP32 GPIO outputs 3.3V. The IRLZ44N is a logic-level MOSFET with a gate threshold of 1V to 2V, so 3.3V drive switches it fully on.
Troubleshooting USB-C PD Builds
| Symptom | Likely Cause | Fix |
|---|---|---|
| 0V on VBUS | Missing 5.1kΩ Rd on CC1/CC2 | Add both resistors |
| Stuck at 5V | Charger lacks requested profile | Check charger label |
| Voltage drops under load | Cable or charger current limit | Use a higher-rated charger and cable |
| Board resets at power-on | Inrush current collapses the rail | Add a soft-start MOSFET or lower bulk capacitance |
| Charger shuts off | Overcurrent protection tripped | Reduce load or fix short circuit |
| Works with one cable, not another | Cable missing CC wire or low gauge | Swap to a full-featured cable |
Measure VBUS at the connector, then at your load. A drop above 0.3V points to resistive losses in the cable or traces.
FAQ
Can I power an Arduino from a USB-C PD charger?
Yes. A USB-C PD charger supplies 5V by default to any sink with 5.1kΩ pull-downs on CC1 and CC2. Most Arduino Uno and Nano boards use USB-A, micro-USB, or mini-USB, so use a USB-C to USB-A adapter cable or an Arduino with a USB-C connector, such as the Nano ESP32. The Arduino’s own regulator accepts up to 20V on VIN on some boards, but check your specific board’s rating.
How do I get 12V from a USB-C charger?
Use a PD trigger board such as the CH224K or IP2721 configured for 12V. Plug it into a charger that lists 12V among its profiles. The board negotiates the voltage and outputs 12V on its terminals.
Does USB-C PD need a special cable?
For up to 3A (60W at 20V), any standard USB-C cable works. For 5A (100W at 20V), you need an e-marked cable. Charging at 5V needs no special cable.
Is USB-C PD safe for low-voltage electronics?
It is safe when your design is correct. The charger only raises the voltage after a successful negotiation, and defaults to 5V. Add a TVS diode, a fuse, and a buck converter so downstream 3.3V and 5V parts never see 20V.




