USB-PD is a pretty cool part of USB-C – tons of voltages and powers to choose from mean compatibility with a huge range of devices, and for supplies that support Programmable Power Supply (PPS) in PD3.0, there are big benefits for battery charging of devices like cell phones (charge your battery faster and with less heat, prolonging life!)
For the hobbyist, taking advantage of PD can be a bit of a challenge, since it requires both software and hardware technical knowhow in the form of PD negotiation with a dedicated PHY chip to handle supply switching. Luckily, a handful of dedicated, single-purpose “PD trigger” devices exist to take that piece out of the equation for some projects.
There are two “PD Trigger” devices that seem to be all over Amazon and ebay for easy purchase: the ZY12PDN, and the ZYPDS, both apparently from YZX Studio. Before I get into them, let’s look quickly at how a PD sink is even built.
A PD sink is made of 3 blocks at minimum: the upstream-facing USB-C port (the port plugs into a cable attached to some kind of host device), a USB PD PHY to talk to the other side and negotiate power, and a load.
Theoretically, to comply with the PD specification, the device is also supposed to have a high-side power MOSFET to disconnect the load until a suitable power contract has been negotiated. This is because VBUS will be at 5V when the device is first plugged in to power the PD PHY, and the load might be inclined to start up and draw too much power at this stage. Similarly, it’s conceivable that a faulty PD source is providing up to 20V already when the device is first plugged in, and the load may have to be protected from that. In practice, if the load BOTH 1) doesn’t draw too much power at 5V and 2) isn’t harmed by up to 20V, the device will pass the “smoke test” without the power switch.
Finally, it’s likely, though not strictly required, that there will need to be some kind of intelligent oversight to make decisions about power contracts, and only enable the downstream load if a suitable negotiation occurs and enough power is available at the desired voltage.
I mention all this as background to describe the design and operation of these two cheap triggers, as well as a third, more “professional” option called the PD Buddy Sink from Clara Hobbs, which better approximates the kind of solution you’d put into a production device (and also provides a good development platform to test such a PD sink design).
|Device||ZYPDS||ZY12PDN||PD Buddy Sink|
|Blocks Implemented||Port, PHY||Port, PHY, Supervisor||Port, PHY, Supervisor, swtich|
The ZYPDS is basically the simplest possible option – it’s a total single-chip solution, built around a Chinese PD PHY called the IP2721 from Injoinic Technology. The datasheet’ s only in Chinese, but it’s easy enough to figure out what’s going on. This PHY will negotiate a contract for the highest power available at the voltage set by the SEL pin,
or nothing at all or else the highest voltage contract the source does support (thanks to Brian down below in the comments for this correction!). It supports an external NMOS VBUS switch (presumably with gate driver charge pump built-in), but the ZYPDS doesn’t implement one. One variant of the chip lets you pick 20, 15, or 5V if SEL=High, High-Z, or GND respectively, and another variant offers selections of 12/9/5.
This might be a good chip to integrate into a cheap product with very simple requirements, but only if you can actually find it: you probably have to know someone in Shenzen, since I couldn’t find it on LCSC, Taobao, Alibaba, ebay, or any of the usual suspects.
(I bought mine from this listing on ebay)
This trigger uses a STM32F0, a PD PHY (Looks like a FUSB302 but I can’t figure out if the package markings actually line up – might just be a similar knockoff), a button, and a 2020 RGB LED to give you a complete range of PD functionality. It also includes a linear regulator for the LED and microcontroller. Note, it still doesn’t include a load switch. Your load will see 5V until a contract is negotiated, or perhaps more if there’s a fault upstream. If it’s true that the PHY IS, in fact, a FUSB302, this might well be a good development platform for testing your own PD sink design. It looks like SWIM pads are broken out on the bottom of the board for programming with an ST-Link, and framework options abound these days for the STM32, including Arduino, which also has FUSB302 libraries available.
The ZY12PDN offers a lot more functionality than the ZYPDS, but the instructions are tricky at best in their native “google translate.” A proper english version follows later on in this post.
PD Buddy Sink
The PD Buddy Sink is the most complete implementation of any mentioned here, and is probably the best jumping off point to start your own design exploration. It’s quite similar to the ZY12PDN in topology, but includes a load switch, all the reference design bells and whistles, and excellent documentation top to bottom.
In theory, the FUSB302 offers dual-role support, so you could use this board to make a PD Source as well if that’s what you’re after. In practice, I think this isn’t possible without rework, because switching the direction of current would be reverse-biasing the load switch and you might run into problems. At a minimum, it wouldn’t work correctly.
ZY12PDN Instructions (English)
Selectable Mode (Default)
By default, the unit ships in a mode where pressing the button cycles PD voltages. A red LED indicates selectable mode, and 5V present. Pressing the button advances to the next available PD voltage. The colors indicate:
- Red; Selectable mode, 5V present
- Yellow: 9V
- Green: 12V
- Ice/Teal: 15V
- Blue: 20V
To enter programming mode: With the device unplugged, press and hold the button while plugging in. When you do this, the LED will rapidly flash colors to indicate that you’re in programming mode. Once you let go, the LED will go Red, and 5V will be present on the output. Click the button to pick your preferred fixed mode. While you select, output will remain at 5V. Click repeatedly to select mode:
- Red: Selectable mode, 5V present
- Yellow: 9V
- Green: 12V
- Ice/Teal: 15V
- Blue: 20V
- Purple: Highest available. In this mode, the trigger will pick the highest power profile the charger advertises
- White: Auto-cycle. In this mode, the trigger will cycle through available profiles. It’s just as if you plugged the trigger in in selectable mode, and clicked the button once a second indefinitely. Useful for testing supplies, I guess, but probably mostly just dangerous.
NOTE: There IS NO 5V fixed mode. I suppose this makes sense – if you wanted 5V only, you should just use a dumb USB-C port and put a 5.1k resistor to ground on each of the two CC pins (5.1k Rd on the CC pin of a “Upstream Facing Port (UFP)” indicates “I’m a legacy sink”. This doesn’t guarantee you any particular current, but it WILL grant you 5V from any USB port.) Funny story, the Raspberry Pi 4 doesn’t do this correctly with two separate resistors, so if you use a PD charger and an e-marked (high-current) cable, you’ll get bupkis.
IMPORTANT GOTCHA NOTE!
This trigger always outputs 5V first, THEN whatever voltage it’s set to negotiate, in two steps.
USB-C is interesting in that, since you can attach a powered device in either direction, a downstream-facing-port that supplies power leaves VBUS at 0V to avoid a conflict fi you plug in something that’s already powered. When you DO plug in a device, though, it gets 5V even if it’s a PD device that needs to negotiate more power. It’s up to the device, in this case the trigger, to do with that what it may.
For many applications, this won’t be much of an issue. For my application, it may or may not be. I intend to use this device to power a TS100 soldering iron. In the default case, 5V then 20V, the iron should be fine. It’ll run on 5V after all, just very poorly. when Vin suddenly becomes 20, it shouldn’t care.
On the other hand, the iron behaves as a simple resistive device, meaning you get much more tip power with a higher input voltage. It’s rated at 65W at 24V and 2.7A. That implies ~8.8 ohm tip heater resistance. Therefore, supplied with 20V, it’ll be a 45W iron. 20W is a lot to miss out on, but I’d still like USB-C power, so why don’t I put a boost converter in line to boost [email protected] to [email protected]? (In fact, 3.25A is a bit too high for the super common 60W USB-C supplies, so I’ll tone it down a notch and boost [email protected] to [email protected], minus a little off the 23V to leave headroom for converter efficiency.)
With this boost converter in-line, imagine the scenario that the iron draws its 60W, but the input voltage is 5V, so the converter is trying to boost 5V to 23V at 60W. Bad things could happen there. This is probably rare in practice: at initial plug-in, the iron will only be drawing a few mA, so the converter should boost 5V to 23V no problem at that low power. Or it’s out of range and simply won’t turn on – also no problem. But in the edge case, the 5V-then-20V sequence could be an issue.
Don’t Buy This Crap Charger
Interestingly, in the process of trying out this trigger with a PD supply and a multimeter, I found out that my “Monoprice Obsidian Speed Plus USB Wall Charger” is totally hosed after a year and minimal use. I was wondering what was going on on the multimeter so I broke out the PD tester. Sure enough, the charger outputs mode:actual value of 5v:4v, 9v:7v, 12v:9v, 15v:11v, regardless of loading. So that thing’s unreliable, possibly dangerous, and definitely infuriating. Being >1y since purchase, it’s out of warranty and in my E-waste bin. Sad face 🙁