Overview
USB Power Delivery (USB-PD) is a specification for high-power charging of phones, tablets and laptop computers. Conventional USB power adapters of yesteryear could slowly trickle charge at a few Watts, while USB-PD can potentially deliver up to 100 Watts (and up to 240W in the latest revision).
What makes this a “hacks” guide is that we’d like to use this for more than powering phones and computers. Inexpensive and ubiquitous USB-A chargers and power banks have proven useful for powering small DIY electronic projects, and USB-PD allows us to take these ideas to the next level.
Some unconventional uses for USB-PD have included:
- Retrofitting vintage computers and A/V gear — substituting bulky or hard-to-find wall-wart power supplies with USB-PD equivalents, and/or replacing lead-acid or NiCd batteries with long-running alternatives.
- Large-scale portable NeoPixel projects, such as Burning Man art bikes and increasingly elaborate costumes.
- Offbeat projects — cyberdecks, social robots and so forth.
- Portable fans for travel and camping.
There are other solutions for each of these, either ready-made or custom. One might delve into the incendiary world of RC batteries…which are usually designed for competitive racing and may lack even basic safety features. Working with an established standard and off-the-shelf products can make things safer, more economical, interchangeable, and still be a useful thing for charging phones and tablets.
In a project where period-authentic video was desired, rather than using software filters over modern HD video, this vintage VHS camcorder was retrofitted with USB-PD and powered off a pocket-sized battery pack.
This bilge blower fan, normally powered off a boat’s 12 Volt electrical system, was adapted to work with USB-PD for wall or battery operation when traveling. The wall adapter and USB cable are unmodified and still useful for routine device charging.
This self-contained LED matrix cube struggled to work off two old-school USB-A power banks working together. The new generation of USB-PD batteries will make such projects simpler and more reliable!
To the average consumer for the average use case, USB-PD is simple: plug in phone and it charges quickly. Easy!
Behind the scenes though, for the unconventional uses we’d like to try, USB-PD is full of special cases and “gotchas.” That’s what this guide is about.
Simpler Alternatives
Before we go off in the weeds, not every offbeat project requires USB-PD. For smaller tasks requiring less current, simple and inexpensive DC booster cables operate from ubiquitous USB-A ports, with a DC barrel jack at the business end. Plug, play, done!
Page last edited March 08, 2024
Things to Know
Let’s talk about the two ends of USB-PD as sources and sinks:
- A SOURCE provides the power. This could be a “wall wart” cube, or a USB powerbank battery.
- A SINK is the device being powered…a phone, a tablet, or whatever unconventional thing you’re looking to run this way.
More vintage A/V gear; the battery compartment has been stripped bare and fitted with components to accept external USB-PD power.
USB-PD is a conversation…
- All USB Power Delivery sources use a USB Type-C connection. However, not all USB-C ports (source or sink) support USB-PD. It’s a specific subset and is sometimes labeled near the port.
- Here’s a whole guide on the ins and outs of USB-C. It’s deep.
- USB power between source and sink is negotiated. Unlike USB-A where current limits were expressed through passive resistors, there’s a bit of “smarts” at both ends of USB-PD. Lacking this at one or both ends, the most you can expect is 5 Volts at 3 Amps (and sometimes less than this…5 Volts certainly, but lower current).
- “Charge only” USB-C cables will not work work for USB-PD; lacking data wires internally, power negotiation can’t occur and the 5V ≤3A limit takes effect. One must specifically use a charge and sync cable. Thus, all three components — source, cable and sink — need to be the right type to unlock USB-PD’s potential.
- When fully compatible end-to-end, a USB-PD sink can specifically request higher voltages and/or current from the source: the specification allows for 5V, 9V, 12V, 15V and 20V at up to 5 Amps (and the latest spec has up to 48V!).
- Not all sources can provide all of these voltages! Many offer just a subset (more on this below).
- 5 Amps is the upper limit defined by the specification, but many sources are rated lower than this.
A USB-PD trigger unlocks these hacks…
- A USB-PD trigger (sometimes called a USB-PD decoy) is a small circuit that handles the USB-PD negotiation and simply outputs a DC voltage; one’s DIY project doesn’t need to handle the low-level details.
- Adafruit's version is the Adafruit USB Type C Power Delivery Dummy Breakout - I2C or Fixed - HUSB238.
- Some USB-PD triggers are adjustable with a selector switch, or cycle among voltages with a button press. Others operate at a fixed voltage, or will have solder jumper pads or a spot to install a resistor to select a voltage. For most DIY projects, the fixed voltage type is preferable, as this prevents mistakes that could destroy a circuit.
- The output on these is typically just two bare solder pads, or sometimes screw terminals. So you may be adding your own DC barrel connector, or other times might retrofit right into a device such as an old boom box. There’s usually some soldering and possibly some drilling or rotary tool work involved.
This is the Adafruit USB Type C Power Delivery Dummy Breakout - I2C or Fixed - HUSB238, described in detail here.
Some especially tiny USB-PD triggers, with microscopic surface-mount resistors for selecting an output voltage. The default on these particular units, if the resistor pads are left unpopulated, is 20 Volts. Others may vary.
Adafruit also carries PD triggers pre-made into tidy USB-C to barrel jack cables — 2.1/5.5mm “tip positive” at the business end, which is super common nowadays. Saves a lot of work if you don’t need the trigger part embedded inside a device!
Currently available in 9V, 12V, 15V and 20V output, all rated for up to 5A.
12 Volts is not universally supported…
- Not all USB-PD sources support every voltage. 12V — an exceedingly useful voltage in retrofitting projects — is an optional part of the specification. Even among esteemed brands like Anker, 12V is not guaranteed.
- If a requested voltage is not supported by a source, it will instead provide the next voltage down…e.g. one might ask for 12V but only get 9V.
- The list of voltages supported by a source isn’t always clearly shown on a product page, and sometimes not even in the manual! Available settings are marked on the source…usually in frustrating, microscopic, low-contrast type. USB-PD is a consumer-focused technology; the average person won’t care about Volts or Amps and would rather find their phone or tablet in a list of supported devices. So these hacks may require a little detective work before making a purchase.
Voltage settings and current limits for various wall chargers and battery banks. Notice how the wall charger supports 12V but not 9V — that’s a bit uncommon. And the battery banks have different ratings for each USB port. Doesn’t much matter for your phone, but for these “hacks” you need to read through all this to confirm a source and sink are suited to one another.
- Some devices can operate at a lower voltage than “officially” rated for. A 12 Volt DC fan usually can run fine off 9 Volts, just a bit slower and quieter. Likewise with a 24V fan at 20V.
- You can verify the voltage output of a USB-PD source or trigger (to confirm whether a desired voltage is actually available) with a multimeter. Here’s one of the DC barrel cables being tested…red probe inserted in the jack “tip,” black probe held to the “sleeve.” This one’s a twee over 12V with no load. Excellent!
- Measuring USB-PD current should not be done with most multimeters, which have fuses rated for milliamps to a few amps at best. We’ll cover some simple options ahead…
Page last edited March 08, 2024
Scaling Up
In direct current (DC) circuits such as we’re discussing here, Watts (power) and Volt-Amps (Volts × Amperes, VA for short) are equivalent. For example, 12V DC at 2 Amps equals 24 VA or 24 Watts. That’s not the case with alternating current (AC) circuits and inductive loads…but in the USB-PD realm, it’s all DC and Volt-Amps, though easier just to say “Watts.”
- Whatever voltage(s) a USB-PD source supports, the maximum current that might be supported at that voltage is 5 Amperes (5A), period. This is a hard limit of the specification.
- THEREFORE, the only way to actually achieve that claimed “100 Watts!” feature of USB-PD is at 20 Volts.
- Without USB-PD negotiation, the maximum power is 5V 3A or 15 Watts, but even that isn’t guaranteed. Check what’s printed on the source.
- To access more current (Amperes) below 20 Volts, a second component (in addition to the USB-PD trigger) is a DC-to-DC or buck converter. This drops one DC voltage to a lower voltage, maintaining close to the same overall wattage. For example, 20V at 5A (100W) could be converted to 5V at 20A (100W/5V), or 12V at 8.33A (100W/12V).
- This conversion is not perfectly efficient; about 5% of power is lost as heat (the actual efficiency may be a couple percent lower; 95% is good enough for “napkin calculations”). So you can’t quite access a full 100 Watts when down-converting this way, but it’s close.
- 100W-rated buck converters are relatively bulky and expensive. If a project doesn’t require a full 100 Watts, it’s fine to use a lower-spec unit!
25W and 100W-rated buck converters. These ones accept 12–24V input and produce 5V output at inverse-proportional higher current.
Notice the metal bodies and fins…when running close to full capacity, they do get warm.
- In the radio control hobby, a small buck converters is also called a BEC or UBEC ([universal] battery eliminator circuit), allowing a single battery to power a vehicle’s motor and receiver. In the past, each required separate batteries at different voltages. RC hobby UBECs are usually selectable to 5V or 6V output.
- Some projects can achieve a slim profile by “fanning out” power from the PD trigger to multiple smaller buck converters. A 100W portable NeoPixel project, for example…the LEDs could be powered in four groups, each from a compact 25W-rated buck converter. This only works with certain projects and topologies like the aforementioned pixels…never combine the outputs of multiple buck converters for more power, as each will actually deliver a slightly different voltage and may back-feed into others.
- The 5 percent or so lost in conversion is not a lot of energy, but it’s concentrated in a small area and can be hot to the touch or could melt some materials. Buck converters should be situated away from plastics, skin and curious fingers, but also not tightly sealed…a ventilated enclosure is ideal.
- There are other small inefficiencies in such a system; a couple percent lost in cables and ports. Use high-quality USB-C cables that are rated for high current. If anything is warm to the touch, it’s inadequate for the task.
These power-measuring USB-PD cables are not precision instruments, but they’re in the right ballpark and usually good enough for this sort of work.
They’ll tell you how much power a device is presently using, which may be less than in the product specifications or the capacity of any included charger. Those numbers are usually upper limits, not average use.
This multi-function USB tester works similarly, with additional information distinguishing between voltage and current…and can also measure from USB-A ports (though without all the USB-PD goodness there).
It’s highly unlikely that you need this, but if you’re pushing the limits or just really curious about the end-to-end power and efficiency of a USB-PD system, a load tester can be gradually ramped up to see where a source really hits its limit and shuts off. This sort of safety feature is one of the benefits of USB-PD over “naked” lithium-polymer batteries.
Here a couple of large power banks are run through a 20V USB-PD trigger, through a 100W buck converter to 5V, and into the load tester. One source was able to deliver about 95W, the other closer to 90W. About what we’d expect given various ratings and efficiencies.
- In practice, you really should not push any part of the system to its limits for any length of time. Allow an ample margin of overhead on sources, cables and DC-DC converters. These things do get warm when “redlined,” and that shutdown feature might put an end to the fun when least needed.
*slaps roof* This baby could power so many NeoPixels!
If you actually are planning a large portable NeoPixel project this way, these guides might be informative:
- Sipping Power with NeoPixels has tips for stretching those watts even further.
- The Adafruit NeoPixel Überguide is our soup-to-nuts reference for all things NeoPixel. Especially relevant here are pages for “Powering NeoPixels” and “Best Practices.”
- 1,500 NeoPixel LED Curtain has some information on distributing power through large installations.
Page last edited March 08, 2024