USB Power Delivery
USB Power Delivery
USB Power Delivery is a standard within the USB 3.x protocol that specifies power supply and voltage levels within the USB network. With USB-PD it is possible to daisy-chain consumers which then negotiate power demands with the source(s) automatically. The standard has different versions, of which the latest (2021) allows up to 5 Ampères at 3.3…48V and a maximum of 240 Watts of power.
USB-PD roles
In the USB Power Delivery Standard, there are different roles that participants on the ends of an USB cable can play. They can be host or client for data purposes, and at the same time power source, power sink, or both for other participants.
Role terminology
USB-C uses the acronym DFP
or Down-Facing Port to make clear that the port is the one of a Host. UFP
or Up-Facing Port is used for clients that can be connected to hosts. There’a third role, though: DRP
or Dual-Role Port. This port can serve either as a host or as a client, depending on who the connecting partner on the other side of the cable is and what the USB network negotiates.
In USB-PD context, any of those ports can be configured to be sinking or sourcing current. Example: Although a Laptop’s USB-C port’s role may be configured to DFP
, when connected to a power source, it can still be a power sink. Hmm.
In this post, I’m only using the UFP
role in both USB-C and USB-PD word sense, meaning that I’m trying to configure a power sink for my device so that it will get the input voltage and current it needs.
USB-PD version
- Before USB-PD Standard 2.0, USB-C devices only support so-called Power Profiles with fixed voltages of 5V, 12V, 20V and currents of up to 2A, 3A, or 5A.
- Between USB-PD Standard 2.0 and USB-PD 3.0, Power Delivery Objects replaced the old Power Profiles that allow different voltages/currents to be selected by the sink depending on the power source’s offerings. Voltages are fixed to 5V, 9V, 15V, 20V with current limits of 2.25A, 3A, 5A depending on source capability and voltage setting. PDOs allow fallback strategies, so if a source cannot support the highest power demand, the sink may select another PDO with less voltage/current that works for both source and sink.
- With USB-PD Standard 3.0 PPS , the protocol offered even more flexibility with Programmable Power Supply. Here, a power sink requests a voltage level between 3.3V and 21V, selectable in 20mV steps and 0.2 to 5A, selectable in 50mA steps while staying fully backwards-compatible to USB-PD 2.0’s Power Delivery Objects.
- Latest USB-PD Standard 3.1 even enhances Programmable Power Supplies’ limits and allows 3.3V - 48V and up to 5A using AVS - Adaptable Voltage Files. Whow.
Not all sources (wall plugs, powerbanks etc.) can supply all Voltage levels or currents, or even share the same standard of implementation. But a number of values is pretty common: 5V, 9V, 12V, 15V, 20V. Some of the products I have seen on the market offer up to 4A, but most keep it with up to 3A and voltages up to 15V are most common (in 2021).
Power delivery ASICs
ASIC stands for application specific integrated circuit, and in this post I’m trying to shed some light on ASICs with Power Delivery sink role that can work stand-alone, that is without an external control device such as a microprocessor. I found three types of these devices:
- Standalone USB-PD sink, voltage and current setting via resistor cascade
- Standalone USB-PD sink, voltage and current map programmable via data bus (I2C/UART/SPI) into non-volatile memory of the ASIC
- Standalone USB-PD sink with integrated microprocessor that needs to be programmed in order to work properly
What all ASICs have in common: They require peripheral circuitry to work - at least some resistors, capacitors, and power transistors to switch power supply and negotiate with connected power sources.
USB-PD is complex: Versioning and power contract negotiations
Both the downwards compatibility and the scaleability of USB-PD take their tribute - the USB-PD specification is a >600 page monster and it’s not always clear which source or sink supports which protocol level.
As both the source, sink, and the cable have to negotiate a Power Delivery contract based on the sink’s requirements, the source’s power options, and the cable’s capabilities, you can imagine that this process is very complex. Even more so as all participants may have implemented a different USB-PD standard, revision and version. Fun fact: The USB Power Delivery specification package’s zip folder on the official page has a file size of >42MB. Although I think this topic is very interesting, I don’t have the time to deep-dive into the specifics 😅
So, let’s leave all this stuff behind and try finding an easy-to-implement solution.
Example ASICs
I have arbitrarily chosen three ICs from the web, supplied by different companies, one each per device type:
- Cypress/Infinion’s CYPD3177, a resistor-config USB-PD sink controller
- STMicroelectronics’ STUSB4500, a Memory-config USB-PD sink controller
- Microchip’s UPD301C, a fully programmable USB-PD dual role controller
I’ll select the STUSB4500 first.
Chip / IC Shortage
For integration into my design, I wanted to buy some samples. Unfortunately, Chip shortages hit hard so that neither of the distributors that I normally order electronics parts with, had any in stock for the next year. That’s why I decided to order a development board with the ASIC readily mounted. This is 10x more expensive than the chip itself but I didn’t have a choice here.
Integration of STUSB4500
STUSB4500 is using the USB-PD Standard 2.0 - so not the latest greatest one - but downwards compatibility of later standards make it a quick and easy starting point for a maker. The device comes pre-programmed with three Power Delivery Objects:
- PDO1 = 5V/1.5A
- PDO2 = 15V/1.5A
- PDO3 = 20V/1A
So for my AnywhereAmps Alpha 1.1 evolution 1.2 I can use this thing right out of the box without re-programming. If I wanted to change the Power Delivery Objects, I’d use an Arduino board with I2C and install STUSB4500 library which is readily available e.g. at Platformio. With this, I could even activate USB-PD 3.0’s Programmable Power Supply if I wanted. Let’s see, when I find the time, I’ll prepare a specific blog entry for programming STUSB4500.
Powering up the amplifier
OK, so I connected the eval board to a 15V capable 30V USB-C power supply. The purple light indicates 15V available on the output rail.
Now I attached my amplifier circuits at its output terminals for an initial test. STUSB evaluation board lights gone, amp off. Meh. At least I have an indicaton for what the cause might be: It’s capacitive inrush currents, again! To be able to properly power devices with large bulk capacitors, either I’ll have to set current in the PDO to abormally high levels or I make up my mind aboud constructing a proper, miniaturized inrush limiter circuit. I have setup a prototype already that I discuss here.
Should you use USB-PD for your projects?
The answer is a definete “it depends”. Although the capabilities of USB-PD are great, there are a few drawbacks:
- requires an extra ASIC with periphery to negotiate the power contracts. This takes PCB space and increases project costs significantly
- To be fully backwards compatible, it makes sense to buy an ASIC that both supports Standard 3.x, and ideally, you take one that is programmable
- If you take a programmable device, there’s an additional learning curve for software development, the ASIC-specific libraries you want to use, and possibly even the need for programmer hardware
- You have to make sure that power supply and cable are compatible to your USB-PD sink’s needs. Cables for high currents are expensive, too
- USB-C port is miniaturized. SMD soldering and entry-level soldering stations might not become friends ever, so you should bring some experience on that topic.
- Barrel-jacks are just round and thus much easier to mount in an enclosure than a PCB with attached USB-C socket that also has to withstand considerable physical strains.
On the other hand, using USB-PD makes much sense when you
- have a mobile gadget that you want to take along with you, or that is often connected to and disconnected from power sources
- want the flexibility of battery-powered devices: Just connect a compatible power bank and off you go
- need a data connection to your device anyways
- have special constraints on your power supply and want very specific voltage/currents to be delivered
- want easy overcurrent and overvoltage protection out of the box