This project is a brief introduction to USB C PD (Power Delivery) supplies with a practical application. Note that I use the terms charger and power supply interchangeably.
USB C PD power supplies have become the standard for phone, laptop and other electronics. This standard has been adopted to provide universal chargers that don't become e-waste when a device is upgraded. These supplies provide the standard USB voltage of 5 volts unless and until a connected device negotiates a higher voltage to deliver greater power. The table below shows the standard voltages supported, and up to 5 amps can be delivered at that voltage (with a 5 amp-rated USB C - C cable), resulting in a whopping 240 watts being possible!
The maximum voltage supplied by a USB C PD supply depends on the maximum power delivered. For example, a power supply rated at 27 watts will only deliver 5 volts and 9 volts.
When looking at PD supplies, some care is needed to know what you're getting. A supply rated at 60 watts looks like it should supply 20 volts maximum, but that may not true. If the supply has multiple ports, the total power delivered by the supply may be 60 watts, but the maximum delivered to any port may be less.
USB C PD open up a lot of possibilities to power other devices. GaN technology makes power supplies more efficient, smaller and lighter than conventional SMPS (Switch Mode Power Supplies). But how can our dumb device negotiate for the voltage it needs?
This picture shows a PD trigger that does the negotiation for us. The dip switch allows us to ask the PD supply for the voltage we need. Note that a trigger like this (which costs a buck) isn't a buck/boost converter. It merely asks the PD charger to provide the requested voltage.
If the PD charger can't power the requested voltage, it will provide the next lower available voltage (or sometimes just 5 volts but this isn't common). If I request 20 volts, but the supply doesn't support that because of its power rating, it will provide 15 volts or even as little as 9 volts.
This table shows the dip switch settings for the above PD trigger. Notice that 12 volts is one of the options, but the table above does not list 12 volts in the PD standard. 12 volt operation has been deprecated. Some PD supplies do support 12 volt operation, but don't rely on it being available in every PD supply.
If you're like me, you may reach for a USB charger to power your 5 volt microcontroller projects. They are a handy, safe source for 5 volts. You may have seen these USB C pigtails, which saves soldering a USB connector and is easy to mount in an enclosure.
These will work great if connected to a USB charger using a C to A cable. However, if you plug it into a PD charger with a C to C cable, you may get nothing! PD chargers require resistors on the control lines to provide 5 volts, which most of these pigtails don't have.
My partner and I love to cruise. I use a CPAP and we usually have computers, phones and other technology requiring a number of power supplies. Reducing the number of power supplies, their bulk and weight is desirable. My CPAP has a bulky, heavy and single-purpose 12 volt power supply. Eliminating this power supply is desirable.
The first problem is that the CPAP requires 12 volts at 4 amps+ at times. I initially tried the scheme I'm about to describe with my 60 watt laptop power supply. It worked but it was marginal – under some transient conditions, ratings of the power supply could be exceeded, resulting in the CPAP beeping and shutting down.
We recently got an Apple 140 watt PD power supply It has a single USB port which can supply up to 28 volts at 5 amps maximum. It was time to try my scheme again.
In accordance with the current PD standard, the Apple supply does not support 12 volt operation. That would be too easy. The option to provide 12 volts to the CPAP was to use a buck DC-DC converter to convert 20 volts to 12 volts. This 10 amp buck converter from Amazon does the job nicely and runs cool. A converter rated at 5 amps quickly became too hot to touch.
The actual circuit is very simple. The output of the PD trigger (the PD trigger I used is from Tayda Electronics but any type will work) is connected to the input of the buck converter, and cable that matches the CPAP is connected to the output of the buck converter. Set the PD trigger to 20 volts and adjust the DC-DC converter output to 12 volts. Verify voltage and polarity before connecting to the CPAP.
Since the entire point of this project is to minimize volume for travel, the smallest enclosure is desirable. I can't find an optimal off-the-shelf enclosure, I created one using Lego Technic Frames. I recently saw some new Technic frame types on AliExpress that are ideal for this application (which may not be standard Lego shapes). They are on order and I'll finalize this design when I have them in hand. I used to think the Lego 5×7 frames were too small to be useful, but now I want to build an even smaller version. The link above shows how I use the frames to create enclosures. The frames support laser-cut panels to form a box.
I have laid out the Lego frames in EasyEDA, which makes it really simple to lay out the needed laser-cut pieces. The Lego frames are based on an 8mm grid. I position the frames where I want them to be, then lay out the panels considering the necessary overlaps. Laying out the frames in one layer of the circuit board and the panels in another allows exporting the layers to show the assembly drawing or an SVG file of the panels only for laser cutting.
I'll update this when I build the enclosure.
Lego Frames – Some May Not Be Official Lego Parts
Enclosure Panels Overlaying Frames
Enclosure Panels Ready To Be Laser-Cut
This small USB C PD adapter allows one high-current PD power supply to do double duty as the charger for my laptop and the power supply for my CPAP. The efficient GaN technology of the PD charger means that the total volume of chargers is reduced by more than half, and the total weight is reduced by about two-thirds. Mission accomplished.