Skip to content

USB PD introduction

Manuel Bleichenbacher edited this page Jan 6, 2023 · 2 revisions

This short introduction explains the a few UBS Power Delivery (PD) concepts relevant for this particular software and use case. The standard covers far more features.

Source and sink

USB PD source and sink

The ZY12PDN board acts as a USB PD sink, i.e. it consumes power. It is connected to a power supply via a USB-C cable. As the name implies, the power supply provides the power and acts as a USB PD source.

From the ZY12PDN board, the power continues to a power consumer. This part is outside the USB PD specification.

Communication between source and sink

In order to agree on the voltage and current to be delivered, the source and sink communicate with each other. For the communication, they don't use D+/D- data lines like regular USB data communication. Instead, they use the CC line only available in USB-C cables.

The USB-C socket has two contacts for the CC signal: CC1 and CC2. Only one of them is connected to the CC line in the cable. Which contact is connected depends on how the USB-C cable is inserted.

As you are certainly aware, the USB-C plug is reversible and can thus be inserted in two different ways. The CC asymmetry in the cable allows both ends to determine how the USB-C lines are connected, in particular how the high-speed data pairs are connected. This isn't relevant in this scenario. But the asymmetry affects the software.

USB PD source and sink

When the sink is connected to the source, they both will initially determine which of the contacts is connected.

Power negotiation

When the sink is connected to the source, the power negotiation consists of these steps:

  1. The source supplies 5V to the sink (over VBUS).

  2. The source and the sink determine which CC contacts are connected for communication.

  3. The source sends a Source Capabilities message over CC providing information about the voltages and currents it can provide.

  4. The sink sends a Request message to request one of the voltages.

  5. The source sends an Accept message accepting the voltage.

  6. The source changes the voltage on VBUS to the agreed voltage.

  7. The source sends a PS_RDY message indicating that the new voltage is now available.

USB PD source and sink

This sequence contains many time constraints. As an example: if the sink does not respond to the Source Capabilities message with a Request message within 30ms, the power negoiation starts over.

If a message has been successfully received, the receiver responds with a Good CRC message. This has been omitted in the above illustration for brevity.

Source capabilities

The Source Capabilities message contains a list of supported voltages, currents and additional information. For a modern power supply, it could look like so:

Position Type Min voltage [V] Max voltage [V] Max current [A]
1 Fixed 5.00 - 3.00
2 Fixed 9.00 - 3.00
3 Fixed 15.00 - 3.00
4 Fixed 20.00 - 2.25
5 PPS 3.30 16.00 3.00
6 PPS 3.30 21.00 2.25

The supply thus supports 4 fixed voltages (5, 9, 15, and 20 V) as well as to programmable (PPS) voltage ranges (3.3 – 16, and 3.3 – 21 V). The lower voltages support a current of up to 3A, the higher range only support up to 2.25 A (as it is a 45W supply).

In addition to fixed and programmable source capabilities, there exist further types. But they are not supported by this software.