Powering Up With USB: Untangling The USB Power Delivery Standards | Hackaday

Powering external devices directly from a PC’s I/O ports has been a thing long before USB was even a twinkle in an engineer’s eye. Some of us may remember the all too common PS/2 pass-through leads that’d tap into the 275 mA that is available via these ports. When USB was first released, it initially provided a maximum of 500 mA which USB 3.0 increased to 900 mA.

For the longest time, this provided power was meant only to provide a way for peripherals like keyboards, mice and similar trivial devices to be powered rather than require each of these to come with its own power adapter. As the number ofcomputer-connected gadgets increased USB would become the primary way to not only power small devices directly, but to also charge battery-powered devices and ultimately deliver power more generally.

Which brings us to the USB Power Delivery (USB-PD) protocol. Confusingly, USB-PD encompasses a number of different standards, ranging from fixed voltage charging to Programmable Power Supply and Adjustable Voltage Supply. What are the exact differences between these modes, and how does one go about using them?

Bootstrapping communications

To get an idea of how getting power from a USB port works on a hardware level, we will take a look at a chip which implements USB-PD revision 3.0 (R3.0) in the form of the Microchip UPD350. The 3.0 revision of the USB-PD specification supports fixed voltage charging up to 100 W — Standard Power Range (SPR) — with the current R3.1 standard adding Extended Power Range (EPR) which supports up to 240 W. This increase in additional power is accomplished primarily through the use of higher voltages: 48 VDC with R3.1, versus 20 VDC with R3.0.

Despite the prominence of USB-PD, it is possible to draw up to 3.0 A at 5 V without bothering with USB-PD at all, which is a mode that the UPD350 supports as well. This is detailed in Microchip Application Note 1953 (AN1953) as well:

These values pertain to the Rp resistor on the side of the downstream facing port (DFP), also known as the source. By setting this resistor value, the sink (upstream facing port, UFP) can tell the maximum current which the source can provide.

In the UPD350, the resistor values are set via the I2C or SPI interface when the device is operating in DFP mode. When in UFP mode, the internal CC comparator can detect up to eight different thresholds as set by the Rp resistor on the DFP side. One of these is a proprietary option:

• 0.20 V• 0.40 V• 0.66 V• 0.80 V• 1.23 V• 1.60 V• 2.60 V• 3.0 V Proprietary Mode

Vice-versa on the DFP side, the sink’s resistor on the CC line allows it to know whether it is connected to a UFP. This allows for an easy way to transfer up to 15 Watt between a source and sink. In order to get more power, simply increasing the current cannot be easily done, which is when USB-PD’s fixed voltage modes come into play.

Universal Ethernet Bus

One might be forgiven for making the comparison between USB-PD and Ethernet. Both use a similar MAC & physical interface configuration, in addition to packet-based communication. When it comes to understanding USB-PD this is in fact not a terrible model to use, just with USB-PD being a half-duplex protocol at its core since it can only use a single CC wire to communicate.

Let’s take a look at the UPD350 internal block diagram to get an idea of its general layout:

Clearly visible in this diagram is the Power Delivery 3.0 MAC which implements the actual USB-PD protocol while also providing an interface to the I2C or SPI controller. This can be thought of as equivalent to the MAC (medium access control) with Ethernet, or the USB (non-PD) MAC. The Baseband CC Interface is then the physical layer (PHY) that translates between the MAC and the analog front end that is connected to the CC line.

Powering Up With USB: Untangling The USB Power Delivery Standards | Hackaday

During all communication of USB-PD, the DFP is the bus master and thus initiates all communication. As mentioned, USB-PD is half-duplex, using only a single CC line for communication, which occurs at a baud rate of 300 kbps. CRC32 is used for error detection, with all messages encoded using 32-bit 4b/5b encoded biphase mark code (BMC), which is also known as differential Manchester encoding (DM).

The basic message format for USB-PD including a payload section is detailed in the USB-PD specification:

There are a number of different data object types:

Generally, the DFP would send a list of its capabilities (source capability PDOs), which the UFP will then use to select a suitable option based upon its needs and send a request for this using an RDO data object message. This is however not the whole story, as due to the higher voltages and currents involved, some of these power levels require active “electronically marked” EMCA cables.

With great power

All USB-C cables are expected to support 20 V at 3 A for a total of 60 W. In order to be detected as capable of higher voltages and currents by the USB-PD controller, USB-C cables are required to contain a so-called e-marker chip which contains a vendor defined message (VDM) containing details on the cable and its capabilities.

This results in a slightly more involved wiring scheme than with a non-marked cable:

In this case the same CC signal line is used to query the chip embedded in the attached cable. If the USB-PD controller is satisfied that the cable satisfies the requirements for the required voltage and current settings, it will proceed with power levels beyond those for non-marked cables.

This becomes especially important with the R3.1 USB-PD standard, which increases voltages to a maximum of 48 V as part of fixed voltage EPR mode, while keeping the same maximum current of 5 A. As current is the defining factor in whether cables melt or not when drawing high power levels, this makes a lot of sense, but the increased voltage levels come with the risk of arcing, especially when plugging in or unplugging a USB-C cable.

In theory, with the higher voltages being firmly locked behind EMCA cables with newly designed USB-C connectors that have lengthened CC and Vbus pins, a disconnect event with active EPR voltages should be detectable in time to rapidly reduce the current and prevent hardware damage.

Comparing the different modes

So far we have looked primarily at the fixed voltage modes of USB-PD. These support a number of fixed voltages as the name suggests. For SPR these voltages are:

All of these can be selected with 3 A or 5 A current levels.

EPR adds the following voltages, all at 5 A:

For some purposes, these voltages may not be ideal, in which case the Programmable Power Supply (PPS) or Adjustable Voltage Supply (AVS) modes may be more suitable. The PPS mode can be used with SPR, following the rough voltage levels of the latter, but allowing for the voltage to be adjusted between 3.3 V and the SPR voltage level plus 1 or 2 V, in steps of 20 mV.

AVS mode does basically the same thing as PPS, only starting from 15 V as the lowest voltage level, ranging up to any of the three EPR voltages in steps of 100 mV. Which of these voltages are available in PPS or AVS mode works the same as with regular fixed voltage usage, in that the USB-PD controller determines the limits based on the detected hardware.

Universal Power Bus

In hindsight it’s both logical and perhaps somewhat absurd how a computer’s I/O connector that was originally designed to carry data to and from USB devices ended up morphing in what we have today in the form of USB-C and the USB-PD specification. Whether the R3.1 USB-PD specification forms truly the pinnacle of USB-PD remains to be seen.

With USB-C R3.1 EPR-capable cables now able to supply up to 240 W, one might think that this ought to be enough for charging any laptop today and in the future. Already at this point, EPR mode has brought new meaning to the term ‘hot-plugging’ when arcing is considered a concern by the USB-C specification. This makes it likely that perhaps the future of USB-PD may lead to new refinements that make the PPS and AVS modes easier to use, or adding new modes entirely that make setting a desired voltage and current even easier.

Now if only you could tell what a USB-C port on a device is capable of by looking at it :)