PD Buddy Sink

Smart power jack for USB Power Delivery

Similar projects worth following
USB Power Delivery is a cool standard for getting lots of power—up to 100 W—from a USB Type-C port. Being an open standard for supplying enough power to charge phones, laptops, and just about anything else under the sun, USB PD is poised to greatly reduce the amount of e-waste produced worldwide from obsolete proprietary chargers. Unfortunately, like all USB standards, it's quite complex, putting it out of reach of the average electronics hobbyist.

PD Buddy Sink solves this problem, letting any hacker or maker use USB PD in their projects. Think of it as a smart power jack. To use it, first configure a voltage and current via the USB configuration interface. Then whenever the Sink is plugged in to a USB PD power supply, it negotiates the power your project needs and provides it on the output connector.

The Idea

One day I was digging through a box of wall warts, trying to find one that would work for my latest project. I needed one with 12-16 V output at no less than 0.5 A, and with a reasonable output connector. Untangling cords and checking labels was taking a while, and I started thinking. "If I could use USB Power Delivery, I wouldn't ever have to do this again." Since USB PD power supplies can provide a multitude of voltages at sizable currents, all you'd need is a little circuit board that takes the place of a power jack and tells the power supply what your project needs.

I searched the web, and to my surprise, no such device was available! I realized that I would have to create it myself, so I started figuring out the device's requirements. It would be a small circuit board with a USB Type-C connector on one side and a screw terminal block for power output on the other. When plugged in, an on-board microcontroller would negotiate the power for your project. For simplicity and flexibility, the configuration should be done by USB. To avoid drawing excessive power, the output would have to be controlled by a MOSFET so as to only turn on once negotiation is complete.

A couple days later, I had a hardware design. A couple weeks later, I built a prototype, and the first PD Buddy Sink was born.

PD Buddy Sink

PD Buddy Sink is a smart power jack for USB Power Delivery. Configure it with the voltage and current your project needs, then plug it into any USB PD power supply with a high enough power capability. It negotiates with the power supply and turns on its output, giving your project up to 3 A at 5, 9, or 15 V, and up to 5 A at 20 V.  With the latest firmware release, the Sink can also make requests from USB PD programmable power supplies, providing any voltage from up to 4-21 V at 20 mV increments.

PD Buddy Sink is simple to configure. Just plug it into a computer while holding the setup button, and connect to the USB CDC console interface. Alternatively, use the (still experimental) configuration GUI.  The configuration interface works with Linux, Mac OS X, and Windows 10.

Project Status


I developed the first PCB prototypes (v0.1) in early February 2017, and built them mid February. This design had a few errors, which were fixed in v0.2.  The next revision (v0.3) was a complete redesign for automated assembly.  This got a few more optimizations for the first stable release, v1.0, released in mid-July 2017.

The PD Buddy Sink's firmware is stable, with a few more features planned. It provides a USB serial console interface for editing and saving configuration, and is able to negotiate with power supplies to request fixed voltages and currents. An option for GiveBack is available, which allows the power supply to reduce power temporarily if another device needs more. The firmware allows users to control PD negotiations and show the power supply's capabilities while in Setup mode. In support of these features, I designed a splitter board which allows users to connect the Sink to their computer and an external USB power supply simultaneously.  The firmware also allows requests from USB PD programmable power supplies, which offer a wide range of voltages (20 mV increments at up to 3-21 V, though the Sink can't run at less than about 4 V).  To the best of my knowledge, the PD Buddy Sink is compliant with the USB Power Delivery Specification, Revision 2.0, Version 1.3, and with Revision 3.0, Version 1.1.

Documentation for the configuration API is available, allowing developers to produce libraries and applications for configuring the PD Buddy Sink. I have written a small Python library for this purpose, providing both direct and abstracted access to the serial configuration API. A basic configuration GUI has been implemented using this library and GTK+, allowing users to edit and save...

Read more »

PD Buddy Sink PCB gerbers and drills, version 1.0

Zip Archive - 61.75 kB - 10/08/2017 at 23:02



PD Buddy Sink schematic, version 1.0

Adobe Portable Document Format - 152.70 kB - 10/08/2017 at 22:59


  • 1 × PD Buddy Sink v1.0 PCB 1.6 mm thick, 1 oz copper all layers
  • 1 × 1 μF 0603 25V C1
  • 1 × 2.2 μF 0603 C2
  • 8 × 0.1 μF 0402 C3, C4, C5, C6, C7, C8, C10, C11
  • 2 × 1 μF 0402 C9, C12

View all 22 components

  • Getting Serious

    Clayton G. Hobbs02/24/2018 at 03:08 1 comment

    Things have come a long way since a year ago.  Back then, this project was just a twinkle in my eye, a bodged prototype circuit board, and a first pass at a firmware that never saw the light of day.  It would be nearly another month before I'd write anything about it online, partially because I still had no idea whether I'd get anywhere near a finished device or not.

    Today, I've now sold over $2000 worth of PD Buddy devices on Tindie, and they're continuing to sell faster and faster.  The last batch contained 30 boards, and about two thirds of those have sold in the first week.  I realized that I need to reorder immediately, and that it's time to seriously step things up.

    So, this project just reached a new milestone: I ordered a batch of 100 boards today.

    I've never seen a hundred of a circuit board I designed before.  The thought is really a bit daunting.

    By my best projections, I will have started grad school by the time they've all sold.  Finding time to fulfill orders as a Ph.D. student might be challenging, especially if sales keep growing like they are.

    To that end, I plan to spend some time between now and August working on an easier programming and testing setup so that MacroFab can fulfill orders for me.  Then I'll be less involved in future batches, allowing me to spend my free time on support and development instead of making shipping labels.

    I'll have to think for a time about what this new testing setup will require.  I know that I'll have to make a new board revision of the PD Buddy Sink, at least so the tester can control the Setup signal without physically pressing the button.

    A new board revision.  That will give me an excuse to finally add a logo.  That alone will be another milestone.

  • New firmware release: version 1.2.0

    Clayton G. Hobbs01/14/2018 at 01:04 4 comments

    After one hundred and sixty five days of development, and more than half the commits to the Git repository, it's finally here!  The latest stable release, firmware version 1.2.0 brings support for Power Delivery 3.0 communication, programmable power supplies, requests from voltage ranges, new methods of specifying the required power level, and jumping to the STM32 DFU bootloader.  There are five, count 'em, five new commands in the configuration interface.  Upgrading to future versions won't require anyone to touch a soldering iron, so I might not be so hesitant to make smaller releases now.

    For this release, the firmware was reorganized as a library for USB Power Delivery and an application using that library. The library is released under the Apache License, Version 2.0, and the application is still released under the GNU General Public License, Version 3.0. Both parts of the firmware are still kept in the same repository, but this may change at some point.  This is an important change: since I'm planning on making a development board based on the PD Buddy Sink, this will make it easy for folks to write firmware for it without having to hack the PD Buddy Sink's firmware to pieces.

    So, what are you waiting for?  Head over to the releases page, download the compiled binary for 1.2.0, flash it to your PD Buddy Sink, and request some weird voltages from a programmable power supply!

  • New firmware release: version 1.2.0-dev

    Clayton G. Hobbs01/01/2018 at 21:13 5 comments

    As requested, I just made a development release, 1.2.0-dev.  There are quite a few planned features not yet implemented, and as such I don't consider this release "stable" (that is, boards I sell won't ship with this firmware unless you explicitly ask for it).  What this release does provide is support for USB Power Delivery 3.0, bringing with it support for Programmable Power Supply APDOs (both making requests from them and pretty-printing them with get_source_cap).  Also in this release is basic support for voltage ranges, allowing a fallback to common fixed supply PDOs when the preferred voltage is unavailable.  The HV_Preferred flag does what it's supposed to, but the current is always constant when making requests from a range (no power or resistance modes yet).

    So, if you're feeling adventurous, head over to the releases page, download the compiled binary for 1.2.0-dev, and flash it to your PD Buddy Sink!  As always, feedback is encouraged. 🙂

    EDIT: added a direct link to the firmware binary

  • Firmware Progress

    Clayton G. Hobbs12/22/2017 at 02:59 6 comments

    In this post: big firmware news, and a question to the project's followers.

    Big News

    As of today, the firmware in git master supports PD 3.0, programmable power supplies, and making requests from a voltage range!

    The support for PD 3.0 is fairly minimal, not supporting any extended messages longer than one chunk.  That's because the only extended messages that can ever be longer than one chunk are for Type-C authentication (no need), USB PD firmware updates (SWD and DFU cover this quite nicely), and country-specific information (can't imagine what use that would be).  The standard allows this, so I'm not being a bad citizen in the eyes of USB-IF.

    Support for programmable power supplies is interesting, because in implementing this I realized very clearly that it's mostly just meant for battery charging.  That's not to say that it can't be used just to get arbitrary constant voltages, but just that for this use case it seems odd that the standard requires the request to be repeated every ten seconds.  This is probably meant to prevent improperly charging Li-ion batteries in case of communication failure, but for a use case like the PD Buddy Sink it's just busy work.

    I also just implemented the set_vrange command in the configuration interface, and gave the firmware the ability to request fixed supply PDOs from the configured range.  It only requests a constant current at any voltage for now, but I'll add constant power and resistive load modes soon.  Also, when making requests from the range, it doesn't request voltages advertised as part of a programmable power supply APDO.  This leads me to:

    The Question

    Should I make the firmware able to request voltages from a programmable power supply APDO when the desired voltage is unavailable and it falls back to requesting something from a range?

    It would make the procedure of making a request quite a bit more complicated than it is now, and the main benefit of the range I see is to support non-programmable power supplies when the desired voltage isn't available as a fixed supply PDO.  It does seem philosophically more proper though, but I'm not convinced that it's really worth doing.  I'd like to hear feedback on this, so please leave a comment if you have an opinion.

  • The Windows Configuration Situation

    Clayton G. Hobbs12/09/2017 at 17:57 1 comment

    I think, maybe, but I don't know, but I'm starting to feel like Microsoft's got a brain problem situation on their hands. (or they had one before Windows 10 came out, anyway)

    After some discussion about configuring the Sink on Windows, I finally took a close look at the situation.  What I found is not good.  While Windows has included a driver for USB CDC-ACM since Vista, for some inane reason, versions older than 10 don't load it without an INF file listing each specific USB VID/PID pair that needs the driver.  Also, Windows 8 requires this file to be signed.  As of now, there's no way I'm going to pay for a code signing certificate just to tell an operating system to load a driver for a standard protocol that it provides itself.  This project just isn't profitable enough for that to be worth it.  If I was shipping a hundred units a month I'd probably do it, but somehow I doubt that will happen any time soon.

    So, if you run Windows and want to configure a PD Buddy Sink, either make a live USB Linux system to configure the Sink with, or get Windows 10.

  • New Configuration for Firmware 1.2.0

    Clayton G. Hobbs10/06/2017 at 16:57 0 comments

    With support for programmable power supplies planned in firmware version 1.2.0, I realize that new configuration will be required.  First of all, this is because USB PD programmable power supplies allow voltages to be requested at 20 mV increments, while fixed PDOs can only be at 50 mV increments.  To support both of these, I'll have to change the configuration to hold voltages at some common denominator: probably either 10 mV or 1 mV.  This means upgrading to firmware 1.2.0 will break your configuration, and there's not a lot I can do about that short of an extra backwards-compatibility code path that in the long term won't see much use.  I'm not crazy about that idea, and the documentation never said the configuration would persist through firmware updates, so I'll probably just warn users about the change when I make the release.

    Next, something will have to be done to allow the Sink to get power at less-desired voltages.  For instance, maybe you'd really like to run your project at 13.8 V, but anything from 11-16 V would work as well.  It would suck if setting the Sink for 13.8 V meant it absolutely can't work with older supplies that only offer the standard fixed voltages.  My idea then is to let users set a preferred voltage, and an optional range of acceptable voltages.  If the preferred voltage is not available, the Sink will try to make a request for some arbitrary acceptable voltage instead.

    EDIT: The arbitrary selection would almost certainly either favor lower or higher voltages, and I can imagine situations where either of these would be preferred.  Accordingly, I should probably let the user choose between the two.

    This raises the question of how much current to request.  It's easy to just set a single current when only a single voltage can be requested, but with a whole range available I can think of several modes that would make sense.  One would just be to request a constant current at all voltages in the range.  Another would be to request a constant power, so that higher voltages come with lower current.  A third would be resistive load mode, where the user sets a resistance and the Sink requests the current required at whatever voltage, so that higher voltages come with higher current.

    That about sums up my plans for the new configuration for programmable supplies.  I'd like to hear feedback on this, so if you have any comments please let me know.  In particular, I want to make sure there aren't any use cases I've missed, e.g. modes other than constant current/power/resistance, or maybe something to do with voltages.  Once I feel confident the ideas are all in place, I'll design the new configuration API.

  • Sinks for Sale

    Clayton G. Hobbs09/23/2017 at 15:53 0 comments

    Yes, the latest batch of PD Buddy Sinks just arrived from @MacroFab!  There are twenty in this batch, and they've all been listed on Tindie.  Will this be a repeat of last time?  The STM32F072C8U6 still has shaky availability (what the heck, ST?), so part of me hopes it won't be.  The rest of me hopes it will be, because that might mean I have a hit product on my hands.
    I sell on Tindie

  • USB PD Programmable Power Supply: How to obtain?

    Clayton G. Hobbs09/07/2017 at 15:22 0 comments

    In my quest to make the PD Buddy Sink the best possible device for getting power from USB PD chargers, the next step is to add support for more types of PDO.  I still don't know any chargers that advertise variable or battery PDOs, but I just found evidence of one that supports the very exciting Programmable Power Supply PDO from USB PD 3.0:

    Now the question is, "how the heck do I get one?"  I haven't found any evidence that these exist beyond the linked PDF and some Chinese articles that don't seem helpful.  If anyone out there can tell me how I could get my hands on one of these evaluation boards, I'd really appreciate it!

  • Easily view a charger's capabilities with PD Buddy Sink+Wye

    Clayton G. Hobbs09/04/2017 at 20:48 0 comments

    Since firmware version 1.1, it's been possible to view the capabilities of a USB Power Delivery source using the PD Buddy Sink.  And since the PD Buddy Wye was released, it's been possible to view a standalone charger's capabilities by running the Sink in setup mode while connected to the charger.  But the way the GUI showed the capabilities was lacking: they were presented exactly the same as the console gives them!  Obviously this couldn't be the best way to show capabilities in a GUI, so I got to work on a new design.

    Read more »

  • PD Buddy Wye available on Tindie!

    Clayton G. Hobbs08/29/2017 at 17:45 0 comments

    The PD Buddy Wye power/data splitter is now available on Tindie!  If you have a PD Buddy Sink and want to make full use of the new features in firmware version 1.1, I encourage you to check it out!

    I sell on Tindie

View all 28 project logs

  • 1
    Get a PD Buddy Sink

    This can be done by buying one on my Tindie store, or building one from parts.  Building a PD Buddy Sink involves standard surface mount assembly techniques (pick-and-place, reflow soldering).  Because of the USB connector, it's impossible to hand-solder the whole board, so buying one is the better option for most people.

  • 2
    Configure the Sink

    First, put the PD Buddy Sink into configuration mode by holding the "Setup" button while plugging it into your computer.  In this mode, the Sink runs a command shell on a virtual serial port, allowing configuration of the device and real-time interaction with a power supply.  Documentation for the command shell can be found here.

  • 3
    Use the Sink

    Once the Sink is configured, using it is as simple as plugging it into a charger!  The "Status" LED blinks quickly to show that Power Delivery communications are going on.  If the charger can provide the configured power, the Sink makes it available on its output connector and blinks the LED slowly three times to indicate success.  If the charger doesn't offer the power you wanted, the Sink provides no power to your device to prevent damage, and turns the LED on solid to indicate failure.

View all 3 instructions

Enjoy this project?



NaanProphet wrote 01/30/2018 at 02:07 point

Hi Clayton! This project is absolutely amazing. Learning so much from it. Thank you for the diligent documentation and superb delivery. Inspiring indeed!

I'm trying to use the PD Buddy Sink to replace a 5V 3A wall wart for a portable audio interface. I'm getting a solid 5.22V unloaded, but with it plugged into the device, the voltage drops to around 4.8V. That's too low for the audio interface, causing it to power cycle as the voltage thrashes between 4.8V and 5.2V a few times a second.

Is there someway to tell the sink to maintain 5V output, even when it's loaded? I've programmed the PD Buddy Sink with set_v 5000 and set_i 3000. Would upgrading to the new firmware 1.2 and using set_v 5000 and set_p 15000 be any different instead?

  Are you sure? yes | no

Clayton G. Hobbs wrote 02/24/2018 at 04:18 point

Sorry for not seeing this sooner, often doesn't notify me of comments on my projects.  In the future, please use the site's Messages feature if you need more timely correspondence.

5.2 V and 4.8 V are both within spec for a USB charger's 5 V output.  The PD Buddy Sink doesn't have a voltage regulator of its own for the output, so what the charger gives is what your device gets.  It would be possible for a future version of the Sink to have closed-loop voltage control when the charger has a programmable output, but that would require some hardware changes to get an accurate enough voltage measurement.

  Are you sure? yes | no

patrick wrote 11/29/2017 at 20:35 point

Hi clayton, I can't seem to get it to work. Have the pa-y10, set the pdbuddy through minicom to 19v and 3a (also tried 16v and 2a) but neither give me a voltage out on the two tabs when connected to the pa-y10. I get a .17v readout.... 

Any clues?

  Are you sure? yes | no

Clayton G. Hobbs wrote 11/29/2017 at 22:10 point

The firmware doesn't support Programmable Power Supply PDOs yet, so requests can only be made for the fixed voltages a supply advertises.  The PA-Y10 advertises 5, 9, 12, 15, and 20 V as fixed voltages, so those all work with the latest stable firmware (1.1.0).  16 V at 2 A from that charger will work with firmware version 1.2.0 when it's released (it's coming, I swear!  I haven't had much time to work on this project because I've been busy applying to grad school.  I'll definitely be done with that by Dec. 15 though, so I'll pick up firmware work then).  As for 19 V at 3 A, that will never work with that charger because it just can't put out that much power. 😉

  Are you sure? yes | no

patrick wrote 11/30/2017 at 07:51 point

Thanks Clayton for the reply. yes I indeed noticed that 19v doesnt work... will keep an eye open for the next firmware! will try again at 20v and see what happens

  Are you sure? yes | no

patrick wrote 12/02/2017 at 09:47 point

Hi Clayton. Got a friend to help and got it working through Linux. On Windows it is not recognized correctly. Need the driver for it. Any help on that?

  Are you sure? yes | no

Clayton G. Hobbs wrote 12/02/2017 at 15:02 point

I've never tried configuring it on Windows, and now that I examine the situation closely it looks like I need to provide an .inf file, and maybe some other files (for some reason?  I'm only using standard USB protocols so I don't see why any driver files should be necessary).  I may find time to mess with that before the 15th, but if not, it'll be my top priority then!  Sorry about the inconvenience, I really had no idea it wouldn't be plug-and-play with Windows like it is with Linux.

  Are you sure? yes | no

patrick wrote 12/02/2017 at 19:49 point

Ok. It worked on windows (without an inf file.....) used putty and com3.. settings work as a charm. Set it with the PA-Y10 to 12v and 1.5a. however, no voltage to be measured on the two pins....also tried 20v, also no power....

What can I try?

Well, or you try connecting it with usb c iso usb A connector to the power connector... thanks Clayton for clearing that one for me. Fully functional now!

  Are you sure? yes | no

patrick wrote 12/10/2017 at 07:44 point

Found this one which does 5-20 3a pd. Would be a cool test case:

  Are you sure? yes | no

patrick wrote 11/04/2017 at 14:32 point

Hi Clayton,

just ordered one!

Been looking for a project like this for some while now in order to reduce the number of chargers/cables and accessories while traveling.

question, do you plan on enabling to switch/set the voltage on the fly without using the pc? Also is it possible to use the files to set the voltage on windows?



  Are you sure? yes | no

Clayton G. Hobbs wrote 11/07/2017 at 22:48 point

I don't plan on allowing the voltage to be changed without using a PC on the PD Buddy Sink, but once I make a development board based on the Sink (I'll probably start working on that mid-December) it would be easy to make it work that way.

I haven't tested the configuration GUI outside of Linux, but the serial configuration shell should certainly be usable from any OS.

Also, out of curiosity, where did you order one?  My Tindie store is in vacation mode right now, so it couldn't have been from me.  Are you going to build it yourself?

  Are you sure? yes | no

patrick wrote 11/08/2017 at 06:40 point

Thanks for the reply Clayton. Looking forwards to the next iteration! 

Ordered one a couple of weeks ago together with the Wye on your Tindie store....

  Are you sure? yes | no

Martin wrote 10/18/2017 at 09:11 point

Regarding the 20mV resolution vs. 50mV resolution: I would say for a PSU both is to fine. 100mV would be enough. Or stay with the 50mV and round it off to the next 20mV step. Thats a max. error of 10mV! I heavily doubt that the USB PSUs have such a precise reference anyway.

  Are you sure? yes | no

FloatingSpots wrote 09/15/2017 at 16:52 point

In one update that I read, I saw mention of the USB PD PPS and how to acquire one.

I ran across and Aukey product on Amazon that claims to conform to this standard.

 As usually happens, I cannot find the actual product on Aukey's site yet.

On Amazon, it is listed as AUKEY PA-Y10.

Says it supports PPS from 3-16 Vdc at 3 Amps.

Edit: Found a second AUKEY part that supports PPS. Listed as PA-Y8, but only supports 3-11 Vdc.

  Are you sure? yes | no

Clayton G. Hobbs wrote 09/17/2017 at 03:56 point

Holy moley, thanks for the tip!  I just ordered the PA-Y10 (more power is better, right? 😉), and it should arrive on Wednesday.  Then I get to work on adding support for Power Delivery 3.0, which may or may not be a huge amount of work.

EDIT: It will not be the huge amount of work I was afraid it could be.  While full support for PD 3.0 requires supporting chunked extended messages, the standard says, "If a PD Device or Cable Marker has no requirement to handle any message requiring more than one Chunk of any Extended Message, it May omit the Chunking Layer."  The only messages that require more than one chunk are for PD-based firmware updates, country-specific information, and authentication, none of which this device requires.  No chunking layer it is!

  Are you sure? yes | no

patrick wrote 11/24/2017 at 20:02 point

Also have the PA y10. just had a friend program the buddy, but not getting any voltage out of the PDbuddy. 

by the way it does not work on widows, you have to use linux. 

  Are you sure? yes | no

Clayton G. Hobbs wrote 11/29/2017 at 23:49 point

Sorry about not seeing your message earlier Patrick, sometimes doesn't notify me about comments on my projects for some reason.  See my reply above (

  Are you sure? yes | no

Glytch wrote 08/23/2017 at 21:22 point

Absolutely outstanding job. I've been looking for something *just* like this, as I have not the patience to dig into the USB PD standard at present. I see that they're out of stock and you're waiting for microcontrollers, but just to let you know, I have money set aside to order at least one, maybe two when you get more, and definitely more in the future. Very interested in switching to USB C for a lot of what I do, as its very applicable to my workflow and projects. From what I've seen, there's no other product or project even similar to this, so you certainly have my interest.

Keep up the great work!

  Are you sure? yes | no

Clayton G. Hobbs wrote 08/23/2017 at 23:23 point

Thank you very much for the kind words!  I may start working on a development board based on the Sink soon, and prototypes of it could actually be available before the Sink itself is.

  Are you sure? yes | no

Glytch wrote 08/23/2017 at 23:31 point

Awesome stuff! Would be neat to be able to connect an OLED or LCD and some buttons or encoders and setup a mode select or variable voltage system. That particularly fits my interests.

  Are you sure? yes | no

oshpark wrote 04/18/2017 at 01:45 point

Very interesting project!

  Are you sure? yes | no

Andrew Bolin wrote 03/21/2017 at 04:25 point

Hey, I had almost the same idea recently, but you've actually built it!
If you stick it in a box with one of those cheap DPS3005 type regulator modules you could probably take some money from me ;)

  Are you sure? yes | no

Clayton G. Hobbs wrote 03/21/2017 at 14:28 point

That would be a pretty cool idea. It would be better to use one of the buck-boost versions, like a DPH3205, so it's not limited by the 20 V maximum voltage of USB PD.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates