0

So I've deeply read into the USB-PD system. I've looked at many pinouts of the Type-C port. I've realized: when you can charge the device through this port - how can it power regular USB devices?

I am trying to create a mobile "embedded" device containing both, a power supply and battery. The computer inside has multiple USB 3.2 Gen2 (type-A) ports, so I've decided to route some of them to the outside, accesible to a user. One of them is going to be a USB Type-C port; That's when I thought: "Wait - I can use this port to also charge the device!"

The USB-C pinout is fairly straight forward: Pin 6 and 7 are the USB 2.0 data wires, pin 1 and 12 are ground but how do USB 2(/3.0) devices get their power?

USB-C pinout

I do realize that there is a handshake process, which is for handling out, which power to supply and accept but what happens in the port when your port supports bidirectional power?

If your device is the power sink and you unplug it, there won't be any power on the CC pins. However if your device is the power well, there should be a constant +5V 1A available, right? Now imagine you plug in a power supply. When and how does the Power direction change? If it doesn't change you might possibly be sending 20V+ with 5A down a (type-A in my case) Motherboard receptacle. Can't be good, right?

I have also read this article but it's too vague: https://www.usb.org/usb-charger-pd

1

2 Answers 2

0

As a result of trying to ask on the Electrical Engineering Stack Exchange instead, I've found an answer to my Question.

Sadly, my problem is now not fixed, but has become way more complicated as I now need to implement a part of the USB-PD specification using a micro-controller. Before, I had intended to just route the USB-PD cables to a spoof device and the rest to the Type A port, which would work, BUT: Connecting "the rest" to the USB Type A port would not achieve anything, as the devices to be connected would now lack power.

I am still looking for a solution to this case but I guess, I'll be better suited on the EE Stack Exchange.

EDIT:

I have found a solution after reading pretty deep into the USB-C and USB-PD standard: having a Host (DFP, Down-Facing-Port) device be able to accept USB-PD through the same port, this port needs to be DRP (Dual-Role-Power) compliant. Responsible for this is a chip, that announces the device capabilities and forms a DP-contract with the other end.

Usually such a chip is only available for OEMs BUT, of course, AliExpress comes in to save the day in such occasions: My solution will very likely be a 120W two-way PD fast charging module, based on a Chipsea CS32G020K8U6. It will sit between the Type C port, the BMS/Charging controller and the USB 3.2 Gen2 Type A header on my motherboard like this:

https://i.sstatic.net/J3OWy.png

A detailed setup might be found here.

0
0

If your device is the power sink and you unplug it, there won't be any power on the CC pins.

Right.

However if your device is the power well, there should be a constant +5V 1A available, right?

No, the power provider won't have any VBUS either.

Now imagine you plug in a power supply. When and how does the Power direction change? but what happens in the port when your port supports bidirectional power?

Any DRP port must have pull-down 5k1 resistors on CC wires (as a sink), AND 10-22-56k pull-ups (as provider), but not at the same time. The DRP then alternates the sink advertising (5k1 pull-downs) with pull-ups (source advertising) about 10 to 20 times per second.

If another DRP is connected, they both will toggle their advertising until a correct (pull-up - pull-down) combination occurs. Then CC controller(s) will stop toggling, and the end that happens to be in provider mode will provide +5VSAFE VBUS. The process will end in one or other direction, which will happen at random (since frequencies of toggling are independent).

[if your second "partner" is a power provider only, it will wait until the DRP enters the consuming phase (5k1 pull-downs), and this will conclude the initial power direction selection]

The max power after this initial CC-level negotiation will be no more than 5V @3A.

If you need higher power, a full-scale PD communication is necessary, which includes such functions as "PR_SWAP" offer, which the device currently acting as sink can accept or decline. And a lot more, including checking cable capabilities and alternative modes support.

Several companies offer PD controllers with embedded microprocessors, TI, Infineon, Renesas, etc., but I am afraid that their codes are proprietary and are not for the general public and DIY community.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .