USB-C-ing All The Things

Wall warts. Plug mounted power supplies that turn mains voltage into low voltage DC on a barrel jack to power a piece of equipment. We’ve all got a load of them for our various devices, most of us to the extent that it becomes annoying. [Mikeselectricstuff] has the solution, in the shape of a USB-C PD power supply designed to replace a barrel jack socket on a PCB.

The video below provides a comprehensive introduction to the topic before diving into the design. The chip in question is the CH224K, and he goes into detail on ordering the boards for yourself. As the design files are freely available, we wouldn’t be surprised if they start turning up from the usual suppliers before too long.

We like this project and we can see that it would be useful, after all it’s easy to end up in wall wart hell. We’ve remarked before that USB-C PD is a new technology done right, and this is the perfect demonstration of its potential.

49 thoughts on “USB-C-ing All The Things

  1. With a bit of structural anything to support this board and cover the shorting to nearby connector shields potential I could see this being worthwhile if you really really buy into the USB-C ecosystem I guess. I think I’d go for 3d printing a mould/former to fill with potting compound – I suspect easier to print a permanent shell to fill up than the separable and reusable multipart mould.

    But I’d still rather avoid USB-C as much as possible for as long as possible – the standard is a mess, so even before you get to all the not compliant stuff out there silent failures are just too common, and with all the not compliant stuff especially quite possibly destructive silent failures… So I’d far rather have the barrel jack and the engraved +/- centre pin and voltage marking so to screw up takes a human error, not a perfectly understandable expectation that plugging this in it will just work – I want the mistake to actually be mine not maker of the device/cable etc I just trusted erroneously.

    Plus if you do ever lose or damage the right supply with barrel jacks replacements and repairs are cheap and easy, its also dependable and mechanically much tougher (in general anyway) connector. Helps having huge footprint for only 2 contacts.

    1. Oh also the print to fill option also allows you to print the voltage this particular board is set up for as a pattern into the outer case each time you assemble one – so should you ever de solder the connector for reuse you don’t have to test it that one says 9V on the top. Which sounds like a far better idea than a fancier reuseable mould without that marking, as you’d need to be making a huge number of them in a particular voltage to be worth addign that complexity to the mould.

    2. I have to agree with everything you said. If I wanted to hamonise everything, I’d be quicker to move everything to a 12VDC barrel jack with maybe a buck regulator onboard for 9 and 5VDC output, then I would mess around with USB-C PD.
      I actually have some dirt cheap buck boards that cost a few cents each and can handle up to 1A output when you add a small heatsink.

    3. “barrel jack and the engraved +/- centre pin and voltage marking so to screw up takes a human error”

      It doesn’t take a human error, it takes a crap wall-wart. Which is the exact same problem with plugging in a USB-C supply if you don’t know how it works.

      One of the big issues with power supplies in general is that “9V, center pin positive” isn’t actually enough of a spec for a power supply. No load overshoot, load regulation, ripple, etc. all need to be considered as well.

      1. Right? A 12v wall wart with an old school transformer will happily put out 16V at no load. Not all wall warts are regulated, old ones just had a rectifier and capacitor. If you were lucky it would have a bridge rectifier or two diodes and a centre tapped secondary. Capacitor optional.

        Not to mention a 2.1mm socket will accept any plug, with dodgy connection to a 2.5mm plug. No polarity checked, no voltage checked. No over current protection, just a thermal fuse in the transformer if you’re lucky.

        1. …and almost every board expects that and has its own protection and regulation if it needs it.

          Whereas I’ll bet a lot of people assume USB will be a perfect 5v and skip the regulation.

      2. True there is some further complexity that however practically never applies in today’s world as the transformer will be regulated and the ‘9v centre positive’ device almost certainly actually has some further power smoothing and regulation built in. The only added complexity that is likely to matter is total power draw capacity.

        Which is the exact same problem with plugging in a USB-C supply if you don’t know how it works.

        No its not, as even perfectly spec compliant high quality USB-PD and cables will just silently fail either entirely or in part, and likely not have anywhere on the devices or cables involved even a hint of why. While a crap one will likely destroy something… The ‘Crap wall-wart’ has to be really really really crap on the other hand for a device that expects a fixed voltage in the ballpark the transformer claims.

    4. Hard disagree. You’ve put forward a whole bunch of FUD while also admitting you aren’t using it personally, so everything you claim is broken is simply hearsay or invented from whole cloth. I’ve not had a single “destructive silent failure” with USB-C, and I’ve been using it extensively for several years now.

      But I have had many devices with barrel jacks die – there’s always a device that is centre-negative for no reason than to force you to buy their expensive branded plugpack, and plenty of devices that have no voltage or polarity labelling, for the same reason.

      I spent the money on good-quality USB PD power supplies, which aren’t hard to find, and therefore have zero concerns about “non-compliant” anything – all the complexity is saved for the power supply, and the trigger board in the device is cheap, well-standardised, and very unlikely to be the failure point since it doesn’t need to have any tricky buck/boost circuitry in it.

      1. I do actually have USB-C stuff, and actively hate it for its frequent foibles even with quality branded parts and cables. And you clearly haven’t ended up with some of the “USB-C” powered devices, even a few that are otherwise quite premium quality in construction etc that ship with a fixed 20V output etc that have been seen in the wild. USB-C is supposed to be ‘safe turn off brain’ connector, so when it isn’t that is a really easy to make the mistake – where barrel jacks you check because you know you need to.

        NB my hate of USB-C is the spec as a WHOLE, with ports and cables suitable or not suitable for the whole myriad of features and not even a mandatory to be spec compliant colour code to identify why this cable of slot doesn’t do what you think it should. It is not the PD stuff specifically I am against – though I do think PD is far more complicated than it needs to be to meet the goal of allowing higher powered devices on USB-C ports and sockets (but it made lots of sense for the other USB connectors it started with, as for USB-C you went and added heaps of conductors to the cables anyway, so just make some of those fixed higher voltages for a simple, and entirely dumb solution that doesn’t require cables with chips in etc!).

        But I have had many devices with barrel jacks die – there’s always a device that is centre-negative for no reason than to force you to buy their expensive branded plugpack, and plenty of devices that have no voltage or polarity labelling, for the same reason.

        If its your mistake for using the wrong PSU but everything is labelled that is on you, and myself I’d be happy with that outcome – if I screw up and something doesn’t work or breaks fine, I’m annoyed, but at myself – and more importantly I KNOW what is going wrong. Which when USB-C fails you just don’t – and even with the highest quality parts will as the spec is so full of optional and has been mutating too fast so incompatibility is a certainty! Even with perfectly compliant high quality stuff – either your device demands an optional feature, it wants a slightly newer higher power version and can’t operate on less etc etc..

        If its not labelled and you didn’t notice to check and label it yourself while it worked then you have a point. There is nothing more annoying than companies playing silly games – but guess what they can, will and already have done that with USB-C ports…

        1. “USB-C” powered devices, even a few that are otherwise quite premium quality in construction etc that ship with a fixed 20V output

          Hang on, if it’s a “powered device”, it’s not got any sort of “output”, 20V or other.

          If you’re talking about a device that is coming with it’s own power supply, then so what? I do not use random power supplies. The entire point is that I use the ones I already own and already know do the right thing. I don’t need a hundred different supplies because the 5 or so I do have are sufficient to run everything.

          1. In which case that device you bought won’t work either as the company that sold it to you is one of the ones playing silly buggers exactly as you complained about with Barrel Jack, only this time its worse as it looks like USB-C the ‘safe’ ‘universal’ option, not the one where you know you actually need to check it.

        2. +42
          usb-c is a nice example of feature creap. the usb consortium actually made only one connector right: usb-b: sturdy and easy to plug in. all others are meh at the most, with micro-usb as the lowest one, with the crappy mechanical architecture and the horrible rectangular mixed A/B version.

          only the mechanical design of usb-c is right, the rest is designed by members of the LUS (league of Undercover Sadists) also working in modern car design.

  2. While this solution addresses the problems of barrel connector (variety of voltages, pin diameter, barrel diameter), it create a new one:
    Barrel connectors are rock-solid. They are to break. They are firmly anchored on the board. This is not the case with USB-C and those filmsy piece of solid wire. That will bend and break.
    The solution would be a case + pins that have a form-factor similar to a barrel connector, with a USB-C instead of a round hole, and a bit of PCB exposed with solder bridges to select the voltage.

  3. I am wondering if I am just lucky or something, but I have had 0 problems with using USB as a power source. I do tend to only buy power bricks that will do PD of at least 12V though, and I don’t go super cheap. As for cables, I look at the reviews and try to stick with a known brand name that is likely to want to preserve their reputation. Biggest gripe I have had is around manufactures making dumb choices involving the capability of the port (looking at you HP…)

    1. Or Dell cheating in a higher-power USB-C spec. I mean, if they made a little “USB-C PD to fake-o Dell 130W” adapter (which they could do!) it’d be fine, but seriously.

  4. i have a little pile of micro usb breakout boards that have already become my default for 5V projects. with another cheap board, i can charge a lipo cell off of it too. you only have problems if you use the new features…for 5V everything is easy :)

  5. Problem with USB-C PD is, it always has a 5V fallback. If you have a device that needs 12Volts, you can request it from the power supply, but the power supply is allowed to deliver just 5Volts.

    You can NOT retrofit any random device by replacing the barrel jack, most old devices will die if they get the wr9ng voltage.

    1. This is a very good point, could do with an additional mosfet that only passes power if the correct voltage is possible, maybe an LED to indicate if it is/isn’t able to comply.

      Another feature of the barrel jacks overlooked by this project is that they often have an extra pin to break the ground line to a battery when connected. I have a DAB radio that uses this, without it either the battery wouldn’t work, or it could be trying to charge an alkaline battery.

        1. Half of the video is about how to order on JLCPCB, and it’s interesting since there are so many caveats that you need to know when using that service.
          And frankly, it’s a bit off-putting when you hear the issues and then when you hear that the other big player in the field PCBWAY also has such issues you start to think that maybe you should just make your damn PCB’s at home.

        2. If it only worked because of wattage and not voltage, life would be much harder. A 5W led bulb i out on ceiling that works with 220V ac input wont consume more amps at 110V because the led consumes more current but the excess is because conversion is needed. So unless the device takes in 12V then for some reason uses a transformer to lower it again, it doesnt make sense. Especially given the 12V power cord is outside because they dont wanna deal woth transformers & live wires inside the device.

          On top of it, the usb 5V backup would be 500mA if by soec and even at max they go 2A. Will 5V 2A burn circuits? I’ve seen 0.5-1mm tracks used for devices that used 2A and even if dodgy, they still survive. Best example would be those cheap $5 multimeter you can get from stores or aliexpress. They have space for fuse, but to save cost rather use a pcb tace as 10amp blow out and they are quite thin.

      1. I saw some youtube video of a guy fixing a set-top box that was rated at 12V and damaged by a 5V power supply, because the internal step down converter did not work properly at low voltage, and outputting 5V instead of the lower output voltage (3.3v IIRC) required by the device.

        That’s still such an edge case, of a poorly implemented buck regulator.

        1. I won’t say that can’t happen, but I’m skeptical. These almost always die because the device has opposite polarity to the replaced power supply. If the internal step-down is passing through more than 3v3 when the voltage isn’t high enough, then it’s doing it every single time power is applied to or removed from the device. Nothing goes from 0 to 12V or back instantaneously – there’s a non-zero period where the device is seeing 5v (or any other voltage between the two extremes).

          1. Yeah that’s bs lol. It simply didn’t work. And then the polarity was reversed and that is what really killed it if something bad really did happen.. and they just didn’t want to admit it.

    2. Things will die if they get more voltage than their absolute maximum limit in the datasheet.

      If you supply less than the desired operating voltage, the device may not work, but it will never be damaged.

  6. I wanted to put one of these in my shaver. And set it to 15V…. and i got 12V. And here lies the problem: these boards will output a different voltage if the one that you set them to is not available from the charger. And oh boy, are chargers so different from one another.
    On top of this, you first get 5V before the negotiation happens and then the requested voltage.
    So be careful.

    1. It’s not USB PD’s fault you bought a crap power supply. That’s going to be the same no matter what standard the supply uses. Get good ones that support all the profiles and then you won’t have any issues.

      1. but it is exactly the fault of the PD specification that allows way too much flexibility for the manufacturers. Two adapters of the same rated power cannot be considered interchangeable because plenty of things are optional.

        It would greatly have benefited everyone if what needs to be implemented for a specific power was fixed, so any 2 adapters of the same power are interchangeable, but this is not the case.

  7. I have boxes of various wall warts and floor hogs. More than I know what to do with (search DDG/Google for “new yorker ac adapters comic”). USB power adapters on the other hand, I have fewer of. I’m sure one day I’ll be ready to go all-in on USB-C and nothing else, right now though feels more like the days when I was still clinging to Micro-USB over USB-C because I lacked the basics to support the switch. We’re talking about an investment in power adapters, cables, and adapter boards, plus modifying devices, when I already have a surplus of what I need.

    Perhaps one day, but not today. (I do admire the cleverness of the device though)

  8. Great!
    Now I can replace that drawer full of assorted walwarts with barrel jacks with a drawer full of different USB C adapters and 7 different incompatible USB C cables that look mostly the same but function differently with no external markings.

    Then I just have to worry about fallback voltages, non-standard cables/USB power supplies, and having to replace a drawer full of stuff I already own with a bunch of expensive cables/power supplies!

    Mike does great work.
    But this is kinda dumb outside of his specific use case on those 2 devices he already had the parts for.

    1. So you’re claiming that your lack of experience and list of misconceptions about USB C trumps Mike’s direct experience and his long-proven skills in electronic design?

      I have two good USB PD power supplies, a couple of good 65W power banks, and a few decent USB C cables from Amazon and Ikea, and they work with everything I have. Phones, laptops, handheld gaming devices, all the stuff I’ve retrofitted trigger boards to (including stuff that was originally mains-powered for no good reason), my soldering irons, the list goes on.

      It’s your choice to live with the old way, but don’t claim it’s a paradise over there.

  9. Another problem is 12v isn’t a standard profile, so nearly no USB PD bricks serve it. A brick is supposed to provide the next lower voltage, which is 9v. Anker stations do this, however the IKEA power stations just sit there pulsing 5v then shut down for a few seconds before trying again.

  10. Shame to see that the cheapo devices that drove me out of selling the PD Buddy Sink are so shoddy, and susceptible to many issues that I had solved in that board. A lot of these comments are about things that have nothing to do with USB PD, but everything to do with bad usage thereof.

  11. I am a big fan of the Chinese “DC DC Buck Boost Converter CC CV 36V 5A” modules. I’m using them e.g. to charge a LiFePo4 motorbike battery from a USB type-c power bank, and for many other things. Comes in really handy for all your spontaneous power conversion needs. A few adapters to common standard connectors (on both sides) accompany the power bank and DC/DC converter in the carrying case.

Leave a Reply to Greg ACancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.