Notes on USB PD Triggers (And ZY12PDN Instructions)

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).

DeviceZYPDS
ZYPDS PD trigger image
ZY12PDN
ZY12PDN PD trigger image
PD Buddy Sink
PD Buddy Sink overview image
Blocks ImplementedPort, PHYPort, PHY, SupervisorPort, PHY, Supervisor, swtich

ZYPDS

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.

ZY12PDN

ZY12PDN board image

(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

Programming/Fixed Mode

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 20V@3A 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 🙁

54 Comments

  1. Ted Hancock
    July 26, 2020

    My first project with a ZY12PDN went pretty well overall. I’m charging a huge 42 cell 7S battery to 29.4v. The boost module has a current limiting trim pot which allows me to pull the full 20v 5A (100 watts) from my USB-C wall charger without exceeding its capacity. Unfortunately, none of my chargers will start at 20v 5A. Through trial and error, I determined that under 2A is some sort of standard. Therefore I had to replace the trim pot with a switch between two fixed resistors. I start at 1.5A which is also a nice car charger setting. I then flip the switch for 5A. You have to flip it fast though or YouTube PDN sees the event as a start up. My second project is stalled by an unexpected reaction, by the PDN, to a direct battery correction.

  2. Ted Hancock
    July 26, 2020

    Wow, these comments are posted without a Captcha or moderation? I haven’t seen that spirit since 1998! Anyway the ZY12PDN doesn’t like to be permanently connected to a 3S 12.6v battery (power bank for my wife). It just sits there blinking red and won’t respond to a source. For now, it’s on a switch, which is a terrible user experience. These are modem batteries so it’s impossible for them to draw more than 18w or so. A direct connection would have been so elegant. I’ve got some PDS on the way and I hope they don’t have this limitation. Also they need to switch from 15v to 20v on the fly. The same resistor swapping switch should be able to bridge and unbridge as well. That may be asking too much.

  3. July 26, 2020

    CAPTCHA: Don’t have much of a problem to be honest. Jetpack seems to keep the spam at bay.
    Trigger back-powering: I think the issue here is there’s no load disconnect MOSFET on any of these triggers. If you’ve got Trigger>Boost>Batteries with no means of disconnection, you’re PROBABLY back-feeding the cell voltage through the boost converter (which I bet has no power-off load isolation) to the trigger, and powering it up with VBUS=cell voltage minus a little. Plug that straight into a power bank which automatically sources 5V before negotiation, and you’re effectively shorting a 5V source to a (12.6 or 29.4V) load. It’s amazing the PD sources you’ve tried are robust enough that they haven’t let out the magic smoke 🙂

  4. Ted Hancock
    July 26, 2020

    The boost module is not technically isolated but the PDN can’t see the load until the booster hits minimum voltage which is about 8v. Likely the shift to 20v is not instantaneous so, for a moment, it’s trying to get to 100 watts on less than 20v. Likely a request for amps > 5 is unsupported and causes the power supply to shut down.

    As far as project 2, direct battery connection likely has too many failure scenarios. I’ll probably set the PDS to 15v with a buck charger to the 12v pack. Just running out of room in the power bank case.

    Thanks for your rapid and insightful reply.

    Ted

  5. Brian Lough
    September 9, 2020

    The behavior described for the ZYPDS is not right, it will accept the highest voltage the PSU supports that is equal or less than what is configured on the SEL pin.

    If I plug that module which is configured for 20V into a charger that only supports up to 12V, it will take 12V. I have tested this myself, but it is mentioned in the datasheet (LCSC have an english version)

    I had to source the IC off a PCBA company (Makerfabs)

  6. September 9, 2020

    @Brian Ahh, good catch! I just confirmed the same. I think what might have happened is that, previously, I may have been testing with a power bank that, it turns out, doesn’t properly identify its source capabilities. My ZYPDS wouldn’t negotiate higher than 5V with it, but all my other supplies were capable of the requested 20. I now have a 9V and 12V cell charger, and can confirm that the 20V configured ZYPDS will pick the highest option for whichever charger I plug it into.

  7. George
    October 1, 2020

    I connected the ZY12PDN to charge a 12V Li-ion battery pack. The LED is blinking in RED and i think it is not charging. Can anyone advice?

  8. October 1, 2020

    @george I’m not sure exactly what you mean by using the ZY12PDN to charge a 12V pack, but if you’re just connecting the output directly to the pack – definitely don’t do that. There needs to be a charge controller in the middle. Additionally, the ZY12PDN doesn’t have a way to disconnect the “Load” from the “source” so if you’re just connecting the pack straight to the “output,” you’ll actually just be connecting 12V to what will start out as 5V from whatever USB-C supply they ZY12PDN is plugged into. Sounds like a good way to destroy a laptop, or at least USB-C brick.

  9. George
    October 4, 2020

    @alex. I just want to make it clear. I want to charge a 12V Lithium Ion battery pack with a USB C PD charger. The Li-ion battery pack is integrated with a charge controller. Can I use a 1N4007 diode to limit the voltage from the load to the source?

  10. October 4, 2020

    @george Ok – definitely better. Assuming we’re talking about a 3S lipo pack, the NOMINAL voltage will be 11.1, but the FULL voltage will be 4.2*3=12.6. Using the 12V mode on the trigger, you’ll only be able to expect like 80% charge, so that’s one concern. You could use PPS mode (Programmable Power Supply, included in PD 3.0) to set 12.6 or 12.8V and then your charge controller would have headroom for full charge, BUT the ZY12PDN doesn’t support that out of the box (and not all supplies/power banks do either).

    As far as the ZY12PDN specifically, there’s still the question of how power is routed in your system. If what you’re hooking the ZY12PDN to is “input only” and doesn’t supply battery voltage, you should be fine. But if the ZY12PDN lights up at all when not plugged into USB-C, that’s not the case, and probably won’t work the way you expect.

  11. Alexander
    October 6, 2020

    Hi, could you please help me? I want to power a display which needs 12v with a powerbank (brand: charmast, says it can output 12v to the usb-c and normal USB A port). When I first plugged the ZY12PDN in, I couldn’t cycle through the modes, there was just a red light and after about 3 seconds the blue led started blinking. The same happens if I put in on fixed mode and the output is always about 5.13v. Do you know what the blue blinking light means or how I could fix it?

  12. October 7, 2020

    I don’t know, I’m sorry. The fact that it can put out 12V to the USB-A port means it must support something like QuickCharge 3.0, and it’s POSSIBLE but unlikely that it doesn’t support PD at all, and ONLY QC3.0 over both USB-C and USB-A? If so, then the ZY12PDN wouldn’t work. I can’t say what the blue LED blinking means, but I’ve never tried it on a non-PD USB-C port, so that seems totally plausible. But I just tested on my own ZY12PDN set to 20V. When I plug that into a non-PD port, it briefly flashes blue then continually flashes red. So not quite the same as yours.

  13. Pierre
    October 20, 2020

    I’m a newbie trying to figure out how to power a DIY project using USB-C PD.

    I’m building a project using about 120 RGB LEDS (consuming 60mA at 5V) and a Raspberry Pi 4 (max 3A at 5V). So I would expect a max load of 7.2A for the LEDs + 3A = 10.2A.

    I’d like to power both using the same USB-C port.

    I have a 60W USB-C PD charger which would provide me with 3A at 20V and I had the intention to use this as an input for a step-down DC-DC converter (XW-12-5-50W) that would output 10A at 5V.

    I do have a ZY12PDN USB-C PD module, would it deliver 20V 3A?

    Thanks for your help.

  14. October 20, 2020

    @pierre First, yes, your understanding is right, that should work out! Two things to consider: you’re at least getting pretty close to the load rating of the converter, and the converter itself is pretty close to the load rating of the supply rail. That said, I’d be surprised if the converter was much less than 80% efficient, so 50W out = 50/0.8 = 62.5W in. That’s dangerously close, but close enough I bet it’ll work fine. Ditto the load side: your calculation is 51W load vs 50W, but I’m betting the Pi 4 isn’t actually as bad as you’re allowing. At full load with no accessories or anything, the Pi 4 should be inside of 8 watts according to this: https://www.tomshardware.com/reviews/raspberry-pi-4#:~:text=Power%20and%20Heat%20on%20Raspberry,more%20than%20the%203%20B%2B.

    Long story short, your conservative estimate is flirting with the limits, but I think you’ll land inside them. I’d encourage you to wire it up and try it out, but measure the USB-C side with a USB-C power meter to make sure you’re not over-taxing the adapter, and measure the current output of the switching converter to make sure you’re not too close to THAT limit. Note: 10.1A is a lot of current at 5V. My preference would be to measure this with a current clamp for zero voltage drop (burden voltage), but you could also use a .010-ohm resistor, measure the voltage across that, and calculate. My bench meter has a half-ohm shunt resistor on the amps range, and my handheld has 60mOhm. Both will cause the pi to shut down while trying to measure 10 amps. The bench meter won’t even do it.

  15. Clement
    October 22, 2020

    Hi Alex,

    thanks for your article, I have a question : I’d like to use the ZY12PDN as a adapter for multiple products that usually use a DC power supply. The simplest way would be to use a ZY12PDN with a USB-A connector, and then use a USB-A to DC cable with various connectors corresponding to the different DC sizes. But I’m worried about the ability for the USB-A connector (and cable) to carry up to 60W. Do you have an idea if it should work ?
    Other point: do you think I could sink the board in epoxy to make it safer to handle/transport it ?

    Thanks !

  16. October 22, 2020

    Hey Clement – as far as epoxy, the only issue is that you won’t be able to use the button anymore to switch voltages. Just seems a little overkill. My preference would be for heat shrink tubing or something along those lines.

    As far as using a USB-A connector, I wouldn’t. You’d be better off with a DC barrel jack. 60W means 20V 3A, but nothing about the ZY12PDN actually limits you to 3A. It’ll negotiate the highest power contract for the selected voltage. At 20V, that could be 5A, if you supply supports it. The issue there is that USB-A ports are definitely NOT rated to 5A. Will it work? Yes. But it may well wear out, heat up, spark if you accidentally unplug it, and so on. I would be fine running 5A through a USB port under lab conditions, but not in real world use.

    But the better reason not to do that is to avoid the scenario when you (absentmindedly), or someone else who doesn’t know how your system works, plugs a cell phone into it and destroys it or starts a fire. The best argument against misusing connectors like that is that if you create the opportunity to mess up a simple connection, someone WILL eventually do it no matter how careful you are, for reasons you didn’t anticipate.

    The same argument applies to barrel jacks and plugs, but at least since those have never had any sort of electrical standard, everyone knows not to trust them unless it’s the adapter that came with the device. Repurposing an idiot-proof connector in such a way is just inviting failure.

  17. Clement
    October 25, 2020

    Hi Alex, good point for the usb-a, thanks for the detailed answer!
    Best Regards

  18. Pierre Thomain
    October 26, 2020

    Hi Alex, thanks for your reply.

    I’m actually looking into using more than 120 LEDs and capping in software the number of LEDs being powered at any one point to 120 or lower (they’re all individually addressable and I’m looking to animate them rather than have all of them lit up at once).

    I’m thinking of using a current limiter to prevent overloading the DC converter in case that capping fails for any reason. I was thinking of using either a polyfuse with an 8A trip current or a variable current limiter IC.

    Do you have any advice as to which would be best in that setup?

    Thanks,
    Pierre

  19. October 26, 2020

    The polyfuse method is easy and cheap but I’m not sure how precise they are, and they’re definitely less repeatable. If you’re not in a huge rush, maybe try the polyfuse first to see how it works in practice, then bother with the closed loop current limiting if the polyfuse behaves badly for you.

  20. Zakis
    October 31, 2020

    Hi,
    On edit mode (from googling) when you select the white mode , ZY12PDN returns to button cyclic voltage selection . (Default mode)
    To confirm the mode and exit edit you have to hold the button 🙂

    Now for my naive question :
    I have a device that wants 12 volt 2A to work . Can I use ZY12PDN from a usb-c port of my laptop ,or I have to use a brick wall charger ?
    Initially I was looking for a usb step up dc , but I don’t think the wattage will be enough ,so I found ZY12PDN and then this place here 🙂

  21. November 3, 2020

    @zakis There’s no guarantee the USB-C port on your laptop supports USB-PD, less USB-PD source, less USB-PD source at 12V specifically, less USB-PD Source at 12V 2A (24W). Indeed, there’s no guarantee even a given wall wart supports USB-PD, it’d just be unusual to put a USB-C port on a charger that didn’t.

    Anyway, on your laptop, here’s the list of supported features in decreasing order of likilihood
    USB 5gbps (almost guaranteed)
    USB PD Sink
    USB 10gbps (less likely, but likely)
    USB PD source 5V (5V 3A)
    USB PD source 9V2A/12V1.5A (18W profile)
    USB PD source >18W
    USB PD source >30w (extremely unlikely).

    Spot-checking my own laptop just now, it looks like my macbook pro only supports 5V 3A. I would not expect to be able to run such a power-hungry device from a laptop USB-C port,

  22. November 9, 2020

    Hi alex.
    I’m making a DIY project with a combined power draw of 5V 4.8 amps. To supply power, I have used the newly launched Realme Dart power bank with specs ranging (5v/2A & 5V6A) through USB type A single interface output. But when I connect it to my PCB (which also has a PD trigger module set to 5V) , it just starts blinking a blue light after 3 seconds, & the circuit cuts off on the command input. Can you guide me on why this problem occurs, & also see if you give a solution where I can extract 5V6A from the said power bank?

  23. November 9, 2020

    To start, I don’t think you’ve got a prayer of getting 5V/6A out in any useful way. 6A will produce a TON of voltage drop on even a very good, high-current cable, and with only 5V, that voltage drop doesn’t have a lot of wiggle room before your device shuts off. I’m willing to bet that’s the problem you’re running into – as soon as your project starts drawing anywhere near the 4.5A you speak of, it browns out due to voltage sag. This is the reason that USB-C devices generally don’t support anything above 3A at 5V – even at 3A, the voltage sag is still quite high under the most ideal of conditions.
    Second, I’d be willing to bet the 6A rating is totally fake. I’ve certainly never seen a USB-C connector rated for 6A, and I’d be willing to bet if you try to run 6A through one, it’ll get quite worryingly hot.

    Reading through this review further leads me to assume the specs are fake: https://www.techradar.com/reviews/realme-30w-dart-charge-power-bank

    That says “30w, but only from one port. If you use both, the overall limit is 25W” which right there means you can’t possibly get 6A out. If you could get 5V 6A out of one port, there’s no reason you couldn’t get 5V 3A out of both at once.

  24. Tyson
    November 20, 2020

    Hi friend.

    Great write up!

    Do you know what the red blinking light means?
    I was hoping to use this with 3 X 2s lipo packs in series and output various pd standards up to 20v 5A.

    I realise now this device may be completely wrong, but K can find other uses for it if only I knew what the blinking red light means!

    More info: it briefly flashes the colour I chose before blinking red.

    Thanks a tonne.

    Tyson (Australia)

  25. November 20, 2020

    @tyson This definitely won’t work for that, this is a PD SINK only, and can’t source. I’m pretty sure blinking red means “you’ve chosen a voltage I can’t get a contract for.” For instance, if you set (and saved) 12v, and plugged this into a 12V capable PD supply, the LED would flash red (5V) then go solid green once the 12V contract was active. If you then unplug it and power it by a different supply that doesn’t support 12V output, I THINK then it’d flash red.

  26. Tyson
    November 20, 2020

    After a little more trial I think you may be right on the flashing.

    Also, I think I simply need a pd buck for my other project?

    Have a good day.

  27. Riveronland
    November 26, 2020

    Hi ,Alex:
    I’m using FUSB302 to make a PD2.0 voltage source recently. But I cannot read or write the FIFOs in reg adress 0x43 , I can only get 0x00. Can you can help me?

  28. Stuart
    December 22, 2020

    Hi Alex,

    Do you know if the output of these modules has any form of short circuit protection? I’m considering using a PD2.0 power bank and this module to provide a convenient power source for a 15Vdc project. I will obviously fuse the output, but would be interested to understand the inherent functionality of the module.

    -Stuart

  29. December 23, 2020

    @stuart They don’t. It’s typically the case that you’d add short circuit protection on the power supply side, though I don’t know how common that is for PD supplies and I’ve never tested it.

  30. Eric
    January 8, 2021

    Hi Alex,
    I am interested in the PPS capability of the USB PD charger. Earlier in a comment you said:
    “You could use PPS mode (Programmable Power Supply, included in PD 3.0) to set 12.6 or 12.8V and then your charge controller would have headroom for full charge, BUT the ZY12PDN doesn’t support that out of the box (and not all supplies/power banks do either).”

    Are there any products available that have this ability to set the output voltage of a USB PD supply more precisely? I would really want to have constant current settings as well. From what I’ve read it seems like the PD 3.0 protocol has the capability for CV and CC modes, but maybe there is not a “trigger” device available yet that allows a hobbyist to access those functions.

    Thanks for any help,
    Eric

  31. January 8, 2021

    @eric Your timing is impeccable: The FUSB302 on the ZY12PDN doesn’t officially support PPS/PD3.0, but in fact, it can be made to. Ryan Ma has designed the PD Micro, which is basically an Arduino Leonardo with FUSB302 and screw terminals. He’s just put together firmware support for PPS and has a writeup here: https://www.crowdsupply.com/ryan-ma/pd-micro/updates/usb-pd-3-0-programmable-power-supply-pps-support-now-available. On the supply side, more and more devices (especially power banks) I’ve tested lately support PD3.0/PPS. Generally speaking, search for PPS in the reviews of a given charger/bank and you should be able to figure it out. I always mention it in my own reviews.

    As far as constant current, I’m aware that PD3.0 allows for negotiating current limits in 50mA increments, but I know nothing about the practical implementation, whether support is mandatory or optional for spec compliance, or what the exact intended use case is. For instance: if you’re a laptop plugged into a power bank, it’d be very useful to be able to say “Only limit me to 1.75A” knowing you’ll only pull 35W max, so that a power bank with two USB-C ports can avoid allocating a lower power limit on the OTHER port than it could. On the other hand, it’d be very weird for any downstream device to use the current limit in a soft-limit capacity where drawing the limit current caused voltage sag.

    The point of PPS as-implemented is to allow a device charging a battery in CC mode to reduce voltage overhead to the very minimum possible, to prevent burning waste power inside the device.

    Eg. I have a cell phone fast-charging its cell at 3.8V, 2.63A. Scenario 1, onboard buck regulator maintaining CC from 5V source: imagine delivering 10W at 80% efficiency, that’s 2.5W of heat generation inside the phone – pretty substantial, and 10W isn’t even “fast charging” by modern phone standards” OTOH, Scenario 2: PPS, using a linear regulation stage to maintain constant current: 4.0V in, 3.8V out at 10W/2.63A, meaning the pass element has to burn 0.2V*2.63A = 0.526W. WAY more efficient – keeps any waste heat in the charger, and likely in a more efficient (bulkier) converter.

    Now, what you WOULDN’T probably do in a consumer device scenario is allow the current regulation to be done in the charger. Every time the screen turned on or the processor woke up to check email, you’d have to renegotiate current for the new overhead (and predictably get it right). Maybe, but I bet not.

  32. Derek
    March 9, 2021

    Hi Alex,

    Thanks for the fantastic write-up it gave me a lot of insight to how the trigger boards work. I’m running into the exact scenario you mentioned in the important gotcha part.
    I basically have a 25W led that I want to run at 21.5V so I had a boost converter to boost it from 2V @1.25A to 21.5V @0.86A but it kept shutting off the trigger board because it’s trying to do 5V @5A to 21.5V @0.86A.
    Do you think a simple delayed start circuit will fix that issue?

    Cheers,
    Derek

  33. March 9, 2021

    Here’s a slightly deeper dive on how this board works: https://www.alexwhittemore.com/zy12pdn-reverse-engineering-part-1/. Typically in a scenario like this, you’ll have a downstream PMIC responsible for not sinking a ton of current at 5V. Some other PD negotiation devices have a built-in gate driver for an NMOS switch that only gets enabled when the input voltage is at the target level. In your scenario, I think the first thing I’d look into is whether your boost converter has an ENABLE input, ideally a positive one. If so, you can just wire up a voltage divider to get 5V or 3.3V out from 20 in, and hook that to ENABLE. When there’s only 5V on the input, it’ll see 1.25V and stay off. When there’s 20V, it’ll see 5V and turn on. This isn’t quite as intelligent as a fully-integrated solution that detects a sufficient power contract and keeps the output disabled even if it gets 20V but not enough current, but at least it fixes the swamping 5V scenario. Failing a simple divider like that, you could do the same thing but with a transistor/maybe zener if it’s a low-enable.

    If you need to get more complicated, you can take inspiration from a circuit like this one for POE class signaling: https://www.eetimes.com/simple-circuit-design-tutorial-for-poe-applications/. Basically, it turns on a transistor to draw a particular signaling current, but only when the voltage input is in a narrow window between 14 and 20V (or something like that) – otherwise it turns off. They even include a (low-side) pass switch to disable the downstream circuit until the input voltage is higher than the upper threshold.

  34. Derek Cheng
    March 12, 2021

    You are a genius Alex, I went with the voltage divider route that and it worked.
    I can’t believe I’ve overlooked the ENABLE input completely.

  35. March 13, 2021

    Awesome! I love it when the simple easy solution works perfectly the first time 🙂

  36. Daniel
    May 28, 2021

    My decide only blinks blue after I program it .. what can I do, it is new!?

  37. ade
    October 19, 2021

    Hai alex.

    can i use this to charge my old laptop ? Acer E1 471 ? the reason i’m gonna use PD is because i’m not sure about “original charge” on ecommerce in my country, looks like fake to me ( most of them ).
    On my current charger, it has 19V 3.42, is it safe for me to sett ZY12PDN at 20V default ?
    sorry for my english.

  38. October 20, 2021

    @ade I can’t really say – The trigger will handle it just fine, but I can’t really know whether feeding your laptop 20v instead of 19v is a problem. Lots of devices will handle that sort of thing just fine, but lots won’t.

  39. donald
    November 10, 2021

    ( most of them ).
    On my current charger, it has 19V 3.42, is it safe for me to sett ZY12PDN at 20V default ?
    sorry f

  40. November 10, 2021

    @Donald I get this question a lot, since 19V seems to be a common laptop charger. Unfortunately, I can’t say. I’d bet it’s fine, but there’s a chance it’s not and you’d do a lot of damage to find out. Best look up the specific laptop to see if you can find anyone else’s primary research as to whether it’s OK.

    Another issue is that [email protected] is 65W. The ZY12PDN doesn’t negotiate a power profile, only a voltage. So if you were to plug it in to a 60W (or lower) capable charger, instead of disabling the output due to insufficient power (which it should do), the laptop will just overwhelm the charger, possibly damaging one or both. In other words, it’d be on you to make sure you never used a too-weak charger, which seems dangerous.

  41. Vincent
    November 30, 2021

    Maybe A stupid question but I can not find a maximum current negotiation for the ip2721 @ 20v ?
    Does anyone know the specs ?
    I Saw that there is a 2723 on the go but without much info out there.
    Would that be a better option for a simple trigger ?

  42. November 30, 2021

    @Vincent Why does it matter? I haven’t verified, but I think the IP2721 just negotiates the highest power profile of the target voltage. If you want to be sure your device is negotiating for as much power as it’ll actually draw so you don’t overwhelm a supply, I think you need something more sophistocated anyway – even if it WILL negotiate 20V 100W, say, it won’t guarantee that you’re plugged into a 100W supply. It’d just as readily negotiate 20V 60W, overwhelming that supply.

  43. Vincent
    December 1, 2021

    Do you have any recommendation to a chip that does not need programming like this one?
    I have taken a look at the cypress chip and that would be an option but the price point it is at the ip2721 wins.

  44. December 1, 2021

    I don’t know of any, no – and I imagine it’d be tough to have a dedicated chip like this that could negotiate a particular power profile without programming, given how arbitrary those can be. If it’s just “get the highest voltage,” well, there are only 5 to choose from. Easy to set with resistors.

  45. rob
    March 17, 2022

    Hey Alex, I thought these boards also can power electronic boards with 20V from the laptop. But after some testing I only get the higher voltage (>5V) from usb-C chargers and not from usb-C ports on laptops. Do you know if this is even possible? maybe with host/slave setting in the usb connector or so? Couldn’t really find if usb-C ports on laptops can only sink higher voltage by design and not source them.. would be neat though to power stuff from the laptop.

  46. March 17, 2022

    That’s to be expected – USB-C doesn’t imply that a port supports USB Power Delivery at all. The power circuitry to support multi-voltage delivery is not trivial, and would be sort of a waste of space on such a space-conscious device like a laptop, for the benefit of what, being able to quick-charge some phones (and drain its own battery much faster)?

    I haven’t come across a laptop that supports PD source, although the MacBook Pro series is notable in that it’ll sink just about any voltage and current, which is cool in a pinch when you forgot everything but a phone charger.

  47. Anonymous
    May 26, 2022

    I bought a ZY12PDN and connected it to an 87W Apple charger, which doesn’t offer 12V.
    Apparently the “green” LED setting will be 20V rather than the expected 12V.
    I plugged it in into a RAVPOWER USB-C charger which does offer 12V, and the “green” LED setting is 12V as expected.
    This sounds like a dangerous situation to be in.
    How would you cope with receiving a higher voltage than expected?

  48. October 3, 2022

    Thanks for the write up. Either I’m missing something or the boards I bought on Amazon are faulty. I want to program the boards for a fixed 20V. This is what I did:

    1. Press and hold the button and plug in the device. Colorful flashing lights ensue.
    2. Press the button repeatedly until the LED turns blue. Voltmeter shows 5V at all times (as expected).
    3. Unplug the device.
    4. Plug the device in again without holding the button.

    At this point the device seems to be back in default (selectable) mode with the LED red. Pressing the button cycles through the colors and the output voltage tracks accordingly. Are steps 3 and 4 correct?

    Second question: I am trying to create a compact 200W power supply for a laptop. I need 19.5 volts. My thought was to use two of these with 2 100W USB-C power supplies. I would place a Schottky diode (with Vf of 500mV) in series with each output and tie the two diode cathodes together. This serves two purposes. The diodes Vf reduce the 20V to my desired 19.5V and also protect the trigger outputs in case one side doesn’t come up or comes up at the wrong voltage. Your thoughts?

    Thanks,
    Michael

Leave a Reply

Your email address will not be published. Required fields are marked *