One day I was digging through a box of wall warts, trying to find one with the voltage I needed at a high enough current, and with the right 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 (<2 in²) 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. Originally I thought it could be configured with a few jumpers, but after reading the relevant parts of the USB Power Delivery standard I realized that a more fine-grained way of setting current would be necessary. For safety, 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.
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.
Initial PCB prototypes (0.1) were developed in early February 2017, and built mid February. A few schematic changes were necessary, but were nothing a little point-to-point wiring couldn't fix on the prototype boards. A revised board (v0.2) has been developed and tested incorporating these fixes and some other improvements.
Firmware has been developed supporting most use cases of the PD Buddy Sink. It features 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. It is recommended to enable GiveBack if the Sink is being used to charge a battery. To the best of my knowledge, the firmware is compliant with the USB Power Delivery Specification, Revision 2.0, Version 1.3.
The firmware's configuration API has been documented. This API can be used to produce libraries and applications which allow configuration of the PD Buddy Sink.
I have written a small Python library for configuring the PD Buddy Sink, providing both direct and abstracted access to the serial configuration API. A basic configuration GUI has been implemented using this library and GTK+. It allows editing and saving configuration in a more user-friendly way than the console interface. It also displays a list of all connected PD Buddy devices, in case several are plugged in to the computer at once.
The firmware at this point is essentially API-stable. No formal release has been made yet though, so this is not a guarantee. Before making the first release of the firmware, I'd like to get a USB PID for the project from pid.codes. I've been waiting patiently for this for several weeks. Once a PID is assigned, I'll update the firmware and GUI to use it, and release firmware v1.0, representing a guaranteed API-stable firmware.
A smaller, four-layer circuit board (v0.3) is in development, intended for automated assembly....Read more »