# USB-PD Hacks

## Overview

Danger: 

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

![USB-C port on a vintage camcorder](https://cdn-learn.adafruit.com/assets/assets/000/120/977/medium640/hacks_usb-pd-1.jpg?1683952485)

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.

![Blower fan adapted for USB power](https://cdn-learn.adafruit.com/assets/assets/000/120/978/medium640/hacks_blower.jpg?1683952505)

This self-contained [LED matrix cube](https://learn.adafruit.com/rgb-led-matrix-cube-for-pi)&nbsp;_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!

![hacks_led_matrices_sand-loop.gif](https://cdn-learn.adafruit.com/assets/assets/000/120/993/medium640thumb/hacks_led_matrices_sand-loop.jpg?1683995133)

![hacks_dualbatts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/120/994/medium640/hacks_dualbatts.jpg?1683995348)

 **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!

### USB to 2.1mm Male Barrel Jack Cable

[USB to 2.1mm Male Barrel Jack Cable](https://www.adafruit.com/product/2697)
There's two standard ways to power electronics - USB or 5.5mm/2.1mm DC barrel jack. This or that! With this **USB to 2.1mm Male Barrel Jack Cable** , you can now power 5V DC powered electronics that have a DC jack from a USB jack with a handy 1 meter long...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2697)
[Related Guides to the Product](https://learn.adafruit.com/products/2697/guides)
![Shot of a coiled USB to 2.1mm Male Barrel Jack Cable.](https://cdn-shop.adafruit.com/640x480/2697-01.jpg)

### USB to 2.1mm DC Booster Cable - 9V

[USB to 2.1mm DC Booster Cable - 9V](https://www.adafruit.com/product/2777)
This cable is kinda fascinating - it has an integrated boost converter, so you can plug it into any USB port (from a computer, battery pack, etc) and it will give you a higher DC voltage! It's a handy way to power 9V powered devices with a center-positive 2.1mm DC barrel jack from a USB...

In Stock
[Buy Now](https://www.adafruit.com/product/2777)
[Related Guides to the Product](https://learn.adafruit.com/products/2777/guides)
![USB to 2.1mm DC Cable with Booster module](https://cdn-shop.adafruit.com/640x480/2777-06.jpg)

### USB to 5.5mm / 2.1mm DC Booster Cable - 12V Output

[USB to 5.5mm / 2.1mm DC Booster Cable - 12V Output](https://www.adafruit.com/product/2778)
This cable is kinda fascinating - it has an integrated boost converter, so you can plug it into any USB port (from a computer, battery pack, etc) and it will give you a higher DC voltage! It's a handy way to power 12V powered devices with a center-positive DC barrel jack from a USB port....

In Stock
[Buy Now](https://www.adafruit.com/product/2778)
[Related Guides to the Product](https://learn.adafruit.com/products/2778/guides)
![USB to 5.5mm DC Cable with Booster module](https://cdn-shop.adafruit.com/640x480/2778-03.jpg)

### USB to 5.5mm/2.1mm DC Booster Cable - 9V or 12V Output

[USB to 5.5mm/2.1mm DC Booster Cable - 9V or 12V Output](https://www.adafruit.com/product/5457)
This cable is kinda fascinating - it has an integrated boost converter, so you can plug it into any USB port (from a computer, battery pack, etc), and it will give you a higher DC voltage! It's a handy way to power a 9V _or_ 12V device. <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5457)
[Related Guides to the Product](https://learn.adafruit.com/products/5457/guides)
![Video of a USB booster cable plugged into a laptop. A white hand flicks a switch on top of the booster, causing the display to report 9V to 12V.](https://cdn-shop.adafruit.com/product-videos/640x480/5457-06.jpg)

# USB-PD Hacks

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

![Battery tray retrofitted with USB-PD circuit](https://cdn-learn.adafruit.com/assets/assets/000/120/988/medium640/hacks_usb-pd-2.jpg?1683952533)

![USB-C port for external power](https://cdn-learn.adafruit.com/assets/assets/000/120/989/medium640/hacks_usb-pd-3.jpg?1683952602)

## 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](https://learn.adafruit.com/understanding-usb-type-c-cable-types-pitfalls-and-more) 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_&nbsp;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](https://www.adafruit.com/product/5807).
- 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](https://www.adafruit.com/product/5807), described in detail [here](https://learn.adafruit.com/adafruit-husb238-usb-type-c-power-delivery-breakout).

![hacks_5807-00.jpg](https://cdn-learn.adafruit.com/assets/assets/000/129/079/medium640/hacks_5807-00.jpg?1711911843)

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.

![Tiny USB-PD triggers](https://cdn-learn.adafruit.com/assets/assets/000/120/982/medium640/hacks_triggers.jpg?1683952614)

## A Simpler Trigger Alternative
Adafruit also carries PD triggers _pre-made_ into tidy [**USB-C to barrel jack cable** s](https://www.adafruit.com/product/5449) — 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**.

![hacks_5449-08.jpg](https://cdn-learn.adafruit.com/assets/assets/000/120/995/medium640/hacks_5449-08.jpg?1683995909)

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

![Small 15W USB-PD wall charger](https://cdn-learn.adafruit.com/assets/assets/000/120/979/medium640/hacks_power1.jpg?1683952632)

![100W USB-PD power bank](https://cdn-learn.adafruit.com/assets/assets/000/120/980/medium640/hacks_power2.jpg?1683952642)

![100W USB-PD power bank](https://cdn-learn.adafruit.com/assets/assets/000/120/981/medium640/hacks_power3.jpg?1683952649)

- _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…

![hacks_metering.jpg](https://cdn-learn.adafruit.com/assets/assets/000/120/997/medium640/hacks_metering.jpg?1683997227)

# USB-PD Hacks

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

## “With great power comes great responsibility” — Uncle Ben
- 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.

![25W and 100W buck converters, about 2 and 3 inches square, respectively](https://cdn-learn.adafruit.com/assets/assets/000/120/983/medium640/hacks_bucks.jpg?1683952697)

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

A selection of small RC _UBEC_s of varying ability. The smallest here is good for up to 15 Watts.

![UBECs, from thumb-sized down to fingertip size](https://cdn-learn.adafruit.com/assets/assets/000/120/984/medium640/hacks_ubecs.jpg?1683952723)

- 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** &nbsp;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_&nbsp;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.

![USB-C cable with tiny integrated display](https://cdn-learn.adafruit.com/assets/assets/000/120/985/medium640/hacks_cable.jpg?1683952739)

This **[multi-function USB tester](https://www.adafruit.com/product/4232)** 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).

![hacks_4232-10.jpg](https://cdn-learn.adafruit.com/assets/assets/000/120/996/medium640/hacks_4232-10.jpg?1683996225)

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.

![Load tester connected to a power source](https://cdn-learn.adafruit.com/assets/assets/000/120/986/medium640/hacks_load1.jpg?1683952764)

![Closeup of load tester display, showing Volts and Amps](https://cdn-learn.adafruit.com/assets/assets/000/120/987/medium640/hacks_load2.jpg?1683952776)

- 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**](https://learn.adafruit.com/sipping-power-with-neopixels) has tips for stretching those watts _even further._
- The [**Adafruit NeoPixel Überguide**](https://learn.adafruit.com/adafruit-neopixel-uberguide/the-magic-of-neopixels) 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**](https://learn.adafruit.com/1500-neopixel-led-curtain-with-raspberry-pi-fadecandy) has some information on distributing power through large installations.


## Featured Products

### USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 9V 5A Output

[USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 9V 5A Output](https://www.adafruit.com/product/5449)
This cable will let you get rid of all those wall adapters you have stashed in the plastic bin in the basement. Instead of multiple wall warts with different power and current capabilities, this cable will convert any USB Type C power adapter with Power Delivery (PD) support into a 9V DC power...

In Stock
[Buy Now](https://www.adafruit.com/product/5449)
[Related Guides to the Product](https://learn.adafruit.com/products/5449/guides)
### USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 12V 5A Output

[USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 12V 5A Output](https://www.adafruit.com/product/5450)
This cable will let you get rid of all those wall adapters you have stashed in the plastic bin in the basement. Instead of multiple wall warts with different power and current capabilities, this cable will convert any USB Type C power adapter with Power Delivery (PD) support into a 12V DC...

In Stock
[Buy Now](https://www.adafruit.com/product/5450)
[Related Guides to the Product](https://learn.adafruit.com/products/5450/guides)
### USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 15V 5A Output

[USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 15V 5A Output](https://www.adafruit.com/product/5451)
This cable will let you get rid of all those wall adapters you have stashed in the plastic bin in the basement. Instead of multiple wall warts with different power and current capabilities, this cable will convert any USB Type C power adapter with Power Delivery (PD) support into a 15V DC...

In Stock
[Buy Now](https://www.adafruit.com/product/5451)
[Related Guides to the Product](https://learn.adafruit.com/products/5451/guides)
### USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 20V 5A Output

[USB Type C 3.1 PD to 5.5mm Barrel Jack Cable - 20V 5A Output](https://www.adafruit.com/product/5452)
This cable will let you get rid of all those wall adapters you have stashed in the plastic bin in the basement. Instead of multiple wall warts with different power and current capabilities, this cable will convert any USB Type C power adapter with Power Delivery (PD) support into a 20V DC...

In Stock
[Buy Now](https://www.adafruit.com/product/5452)
[Related Guides to the Product](https://learn.adafruit.com/products/5452/guides)
### Re-programmable USB Type-C PD to 2.1/5.5mm Barrel Jack Cable

[Re-programmable USB Type-C PD to 2.1/5.5mm Barrel Jack Cable](https://www.adafruit.com/product/5501)
This unusual cable is sort of the 'ultimate' in USB type C Power Delivery (PD)&nbsp;hacking: good for experienced hardware hackers who are comfortable with a cable that can shape-shift from one setting to the other. Instead of having to juggle&nbsp;multiple wall warts with different...

In Stock
[Buy Now](https://www.adafruit.com/product/5501)
[Related Guides to the Product](https://learn.adafruit.com/products/5501/guides)

## Related Guides

- [Cyber Tank Girl Cosplay](https://learn.adafruit.com/cyber-tank-girl-cosplay.md)
- [Crayola Scented Candle](https://learn.adafruit.com/crayola-scented-candle.md)
- [Textile Potentiometer Hoodie](https://learn.adafruit.com/textile-potentiometer-hoodie.md)
- [USB MIDI Host2Host](https://learn.adafruit.com/usb-midi-host2host.md)
- [Make a Guggenhat: Bluetooth-connected wearable NeoPixel marquee hat](https://learn.adafruit.com/guggenhat-bluetooth-le-wearable-neopixel-marquee-scrolling-led-hat-display.md)
- [Fitbit Force Teardown](https://learn.adafruit.com/fitbit-force-teardown.md)
- [NFC Ring Password Helper](https://learn.adafruit.com/nfc-ring-password-helper.md)
- [Fruit Jam Mac Emulator](https://learn.adafruit.com/fruit-jam-mac-emulator.md)
- [Tiny TARDIS Pendant](https://learn.adafruit.com/tiny-tardis-pendant.md)
- [LED Sequin Bow Tie](https://learn.adafruit.com/led-sequin-bowtie.md)
- [Making PCB Jewelry & Art with Gingerbread and KiCad](https://learn.adafruit.com/making-pcb-art-with-gingerbread-and-kicad.md)
- [Computer Perfection Synthesizer](https://learn.adafruit.com/computer-perfection-synthesizer.md)
- [Adafruit Flora Bluefruit LE](https://learn.adafruit.com/adafruit-flora-bluefruit-le.md)
- [Furby 2012 Teardown](https://learn.adafruit.com/furby-2012-teardown.md)
- [Glowing Fascinator Hat with Gemma M0 and MakeCode](https://learn.adafruit.com/glowing-fascinator-hat-gemma-m0-makecode.md)
