Topics

► Games

► Sound & Music

► Watches & Clocks

► Wireless

► GPS

► Power Supplies

► Computers

► Graphics

► Thermometers

► Educational

► Wearables

► Test Equipment

► Tutorials

► Libraries

► PCB-Based Projects

By processor

AVR ATtiny

► ATtiny10

► ATtiny2313

► ATtiny84

► ATtiny841

► ATtiny85

► ATtiny861

► ATtiny88

AVR ATmega

► ATmega328

► ATmega1284

AVR 0, 1, and 2-series

► ATmega1608

► ATmega4808

► ATmega4809

► ATtiny1604

► ATtiny1614

► ATtiny202

► ATtiny3216

► ATtiny3224

► ATtiny3227

► ATtiny402

► ATtiny404

► ATtiny414

► ATtiny814

AVR DA/DB/DD-series

► AVR128DA28

► AVR128DA32

► AVR128DA48

► AVR128DB28

► AVR128DB48

► AVR64DD14

► AVR32DD28

ARM

► ATSAMD21

► RP2040

► RA4M1

About me

  • About me
  • Twitter
  • Mastodon

Feeds

RSS feed

USB-C Power Delivery Dongle

18th November 2025

This is a small board that will deliver one of six fixed voltages from a USB-C power adapter that supports Power Delivery:

PDDongle.jpg

Front and back of the USB-C Power Delivery Dongle. It delivers
one of six voltages from a USB-C power adapter.

It's compact enough that you can put it in line with a USB-C cable, encapsulated in a small case or heatshrink tubing, and you can select the voltage by soldering a wire link or fitting a jumper in one of six positions. A green LED indicates when the output is active.

For example, you could solder a cable to the board terminated in a standard power jack [1], set the voltage to 9V, and use it to power an Arduino board from a suitable USB-C power adapter.

Introduction

USB-C wall adapters often support Power Delivery, which allows them to provide a selection of voltages, replacing the environmentally unfriendly multitude of individual power supplies we used to need. Typically they offer several of the voltages 5V, 9V, 12V, 15V, 18V, or 20V. Products request the voltage they need from the power adapter using a protocol called Power Delivery, using the USB-C signals CC1 and CC2.

This dongle lets you request a voltage from a USB-C wall adapter to power a microcontroller board, or other project, that needs a particular voltage. It's based on a Power Delivery controller chip from Hynetek, the HUSB238 [2], and was inspired by Adafruit's USB Type C Power Delivery Breakouts [3] [4]. These are both excellent solutions if you don't want to build your own. However, I wanted a no-frills solution without the option of I2C control, and small enough to be put in line with a cable.

The voltage selector consists of a hexagonal arrangement of pads. To select one of the six available voltages you need to link the pad at the centre of the hexagon to the pad marked with the voltage you want.

The simplest way to select a voltage is to solder a wire link in one of the six radial positions. Alternatively, if like me you wanted to be able to change the voltage without getting out a soldering iron you can fit header pins in the seven positions on the hexagon. You can then select a voltage by fitting a jumper in the appropriate radial position:

PDDongleLink.jpg

USB-C Power Delivery Dongle with header pins so you can select a voltage by
fitting a link in one of six radial positions.

If the voltage and current combination you have selected isn't available from the power adapter it will provide the closest available lower voltage. So, for example, Apple USB-C power adapters typically offer 5V, 9V, 15V, and 20V. If you request 12V from one of these adapters you will get 9V, and if you request 18V you will get 15V. The voltages and currents provided by an adapter are usually shown on a label on the side of the adapter.

IMPORTANT: This project is only intended for hobby use, and is not an end-user product. I haven't tested it to make sure that it meets any regulatory requirements, including interference and safety, and it's possible that a connection fault could potentially cause it to output a higher voltage than selected. Please do not use it to power expensive equipment!

Programming the voltage

The HUSB238 allows you to specify the voltage you require by connecting a resistor between the VSET pin and GND:

Voltage Resistor
5V
9V 6.04kΩ
12V 10.0kΩ
15V 14.0kΩ
18V 17.8kΩ
20V

The HUSB238 datasheet specifies the programming resistors using six values from the E96 range of 1% tolerance resistors.

Initially I felt annoyed because Hynetek could easily have designed the HUSB238 to use standard 5% resistors from the E12 range, but since the 1% resistors only cost a few pence it didn't seem worth dwelling on.

Programming the current

The HUSB238 also allows you to specify the current capability you require by connecting a resistor between the ISET pin and GND:

Current Resistor
1.25A
1.5A 4.53kΩ
1.75A 7.50kΩ
2A 10.5kΩ
2.25A 13.7kΩ
2.5A 16.5kΩ
2.75A 19.6kΩ
3A 22.6kΩ
3.25A

If the power adapter can't provide the current you've requested it will select a lower voltage that can provide that current.

On the Power Delivery Dongle board I've provided a space for a single current-setting resistor, and I've suggested a value of 13.7kΩ to give a current of up to 2.25A.

USB-C power adapters

Several manufacturers now supply USB-C power adapters that support Power Delivery. For example, here's a list of the different USB-C power adapters that Apple have produced, and the power profiles they provide:

Max. Power Model Voltages
18W * A1695 9V 2A, 5V 3A.
20W † A2244 9V 2.22A, 5V 3A.
29W * A1540 14.5V 2A, 5V 2.4A.
30W A2164 20V 1.5A, 15V 2A, 9V 3A, 5V 3A.
35W dual † A2579 20V 1.75A, 15V 2.33A, 9V 3A, 5V 3A.
35W dual A2676 20V 1.75A, 15V 2.33A, 9V 3A, 5V 3A.
61W * A1718 20.3V 3A, 9V 3A, 5V 2.4A.
61W A1947 20.3V 3A, 15V 3A, 9V 3A, 5V 3A.
67W A2518 20.3V 3.3A, 15V 5A, 9V 3A, 5.2V 3A.
70W ‡ A2743 20.6V 3.4A, 15V 3A, 9V 3A, 5V 3A.
87W * A1719 20.2V 4.3A, 9V 3A, 5.2V 4.2A.
96W A2166 20.5V 4.7A, 15V 3A, 9V 3A, 5.2V 3A.
140W ‡ A2452 28V 5A, 20.5V 5A, 15V 5A, 9V 3A, 5.2V 3A.

* Discontinued.
† Compact with folding prongs. All the others have removable prongs.
‡ These take advantage of GaN (gallium nitride) semiconductors for a more compact design. 

If you want a specific voltage you might need to hunt around to find a USB-C Power Delivery power adapter that supplies it. For example, none of the Apple adapters support the 18V option.

The circuit

Here's the circuit of the Power Delivery Dongle:

PDDongle.gif

The circuit of the Power Delivery dongle, based on an HUSB238.

The circuit is based on the application given in the HUSB238 datasheet.

Resistors and capacitors

All the resistors and capacitors are surface-mount 0805 size. The voltage and current selection are specified using resistors from the 1% E96 range.

The power MOSFET

Initially 5V appears on the VBUS pins while the selected voltage is being negotiated. The MOSFET ensures that the output is only active when the correct voltage has been delivered.

The power MOSFET is a P-MOSFET type that needs to have a VDS of at least 30V, a current handling of at least 5A, and an on-resistance of not more than 30mΩ (in other words, 0.030Ω). The on-resistance determines how much power it will dissipate when passing the highest current; at 3.25A with a resistance of 30mΩ this will be about 0.3W.

Here are three alternatives for the MOSFET which meet these requirements, and are in packages compatible with the PCB:

Part No. Spec. Link
AONR21307 P-Channel 30V 24A 11mΩ AONR21307
SI7619DN P-Channel 30V 24A 21mΩ SI7619DN
STL6P3LLH6 P-Channel 30V 6A 30mΩ STL6P3LLH6

Here's the full parts list (click to expand):

► Parts list

Construction

I designed a PCB in Eagle and sent it to JLCPCB for production. There are links at the end of the article if you want to make yourself a board.

Because of the small size of the board, and the fact that there are components on both sides of the board, soldering the components onto the board is quite challenging. I used a Youyue 858D+ hot air gun at 275°C and Chip Quik SMD291AX10 solder paste, taking care not to let the components on one side fall off while I was soldering the other side.

Make sure that the four lugs on the USB-C socket are well soldered to the matching holes on the PCB.

Header pins

If you decide to use header pins and a jumper to select the voltage, here's the procedure I used to fit the header pins, because there isn't room to include all the plastic retainers:

  • Solder a strip of three pins down the centre of the hexagon. Then pull off the black plastic retainer with a small pair of pliers.
  • Solder a strip of two pins to one side of the three pins you've already fitted, and then another strip of two pins on the other side.
  • Optionally pull off the plastic retainers on the two strips of pins you have just fitted; I thought it was neater without them.
  • Trim the pins flush on the underside of the board.
  • Fit the jumper in the required radial position.

Testing the board

Before plugging the Power Delivery Dongle into a USB power adapter I recommend applying 5V across the VBUS and GND connections while monitoring the current consumption. The current should be between 3mA and 5mA, there should be 5V on the output terminals, and the green LED should light up. A higher current consumption probably indicates a solder bridge, and no current consumption or voltage on the output probably indicates a bad connection.

I built three prototypes and the only problem was a bad connection between the PCB and the USB-C connector; the symptom was that the board worked with the USB-C plug one way round but not the other.

Resources

Get the Eagle or Gerber files for the PCB here: https://github.com/technoblogy/power-delivery-dongle.

Or order boards from OSH Park here: Power Delivery Dongle.


  1. ^ 2.1mm x 5.5mm DC Plug Prewired on Switch Electronics.
  2. ^ HUSB238 datasheet on Adafruit.
  3. ^ Adafruit USB Type C Power Delivery Dummy Breakout - I2C or Fixed on Adafruit.com.
  4. ^ Adafruit USB Type C Power Delivery Dummy - I2C or Switchable on Adafruit.com.

Previous: Bauble


blog comments powered by Disqus