USB Power Delivery For All The Things

The promise of USB Power Delivery (USB-PD) is that we’ll eventually be able to power all our gadgets, at least the ones that draw less than 100 watts anyway, with just one adapter. Considering most of us are the proud owners of a box filled with assorted AC/DC adapters in all shapes and sizes, it’s certainly a very appealing prospect. But [Mansour Behabadi] hasn’t exactly been thrilled with the rate at which his sundry electronic devices have been jumping on the USB-PD bandwagon, so he decided to do something about it.

[Mansour] wanted a simple way to charge his laptop (and anything else he could think of) with USB-PD over USB-C, but none of the existing options on the market was quite what he wanted. He looked around and eventually discovered the STUSB4500, a a USB power delivery controller chip that can be configured over I2C.

With a bit of nonvolatile memory onboard, it can retain its settings so he didn’t have to include a microcontroller in his design: just program it once and it can be used stand-alone to negotiate the appropriate voltage and current requirements when its plugged in.

The board that [Mansour] came up with is a handy way of powering your projects via USB-C without having to reinvent the wheel. Using the PC configuration tool and an Arduino to talk to the STUSB4500 over I2C, the board can be configured to deliver from 5 to 20 VDC to whatever device you connect to it. The chip is even capable of storing three seperate Power Delivery Output (PDO) configurations at once, so you can give it multiple voltage and current ranges to try and negotiate for.

In the past we’ve seen a somewhat similar project that used USB-PD to charge lithium polymer batteries. It certainly isn’t happening overnight, but it looks like we’re finally starting to see some real movement towards making USB-C the standard.

The Not Quite USB-C Of Nintendo Switch Accessories

Historically gaming consoles are sold at little-to-no profit in order to entice customers with a low up-front price. The real profits roll in afterwards from sales of games and accessories. Seeking a slice of the latter, aftermarket accessory makers jump in with reverse-engineered compatible products at varying levels of “compatible”.

When the Nintendo Switch was released with a standard USB-C port for accessories, we had hoped those days of hit-or-miss reverse engineering were over, but reality fell short. Redditor [VECTORDRIVER] summarized a few parts of this story where Nintendo deviated from spec, and accessory makers still got things wrong.

Officially, Nintendo declared the Switch USB-C compliant. But as we’ve recently covered, USB-C is a big and complicated beast. Determined to find the root of their issues, confused consumers banded together on the internet to gather anecdotal evidence and speculate. One theory is that Nintendo’s official dock deviated from official USB-C dimensions in pursuit of a specific tactile feel; namely reducing tolerance on proper USB-C pin alignment and compensating with an internal mechanism. With Nintendo playing fast and loose with the specs, it makes developing properly functioning aftermarket accessories all the more difficult.

But that’s not the only way a company can slip up with their aftermarket dock. A teardown revealed Nyko didn’t use a dedicated chip to manage USB power delivery, choosing instead to implement it in software running on ATmega8. We can speculate on why (parts cost? time to market?) but more importantly we can read the actual voltage on its output pins which are too high. Every use becomes a risky game of “will this Switch tolerate above-spec voltage today?” We expect that as USB-C becomes more common, it would soon be cheapest and easiest to use a dedicated chip, eliminating the work of an independent implementation and risk of doing it wrong.

These are fairly typical early teething problems for a new complex technology on their road to ubiquity. Early USB keyboard and mice didn’t always work, and certain combination of early PCI-Express cards and motherboards caused damage. Hopefully USB-C problems — and memories of them — will fade in time as well.

[via Ars Technica]

[Main image source: iFixit Nintendo Switch Teardown]

Extracting Power From USB Type C

For the last decade or so, we’ve been powering and charging our portable devices with USB. It’s a system that works; you charge batteries with DC, and you don’t want to have a wall wart for every device, so just grab a USB hub and charge your phone and you headphones or what have you. Now, though, we have USB Type C, with Power Delivery. Theoretically, we can pull 100 W over a USB cable. What if we could tap into that with screw terminals?

That’s the idea behind [Jakob]’s entry to the Hackaday Prize. It’s a USB 3.1 Type C to Type A adapter, but it also has the neat little bonus of adding screw terminals. Think of it as jumper cables for your laptop or phone, but don’t actually do that.

[Jakob]’s board consists of a USB Type C receptacle on one end, and a Type A plug on the other, while in between those two sockets is an STM32G0 microcontroller that handles the power negotiation and PD protocol. This gives the USB Type C port dual role port (DRP) capability, so the power connection can go both ways. Add in a screw terminal, and you can theoretically get 20 V at 5 A through a pair of wires. Have fun with that.

Right now, [Jakob] has all the files in a Gitlab with the schematic and layout available here. It’s an interesting project that has tons of applications of USB hackery, and more than enough power to do some really fun stuff.

Add USB-C To Your Laptop (Almost)

It’s a very brave person who takes a Dremel or similar to the case of their svelte new laptop in the quest for a new connector, it sounds as foolhardy as that hoax from a while back in which people tried to drill a 3.5mm jack into their new iPhones. But that’s what [BogdanTheGeek] has done, in adding a USB-C port to his Acer.

Of course, the port in question isn’t a fully functioning USB-C one, it’s a power supply jack, and it replaces the extremely unreliable barrel jack the machine was shipped with. He’s incorporated one of those little “ZYPDS” USB-C power delivery modules we’ve no-doubt all seen in the usual cheap electronic sources, and in a move of breathtaking audacity he’s cut away part of the Acer mainboard  to do so. He’s relying on the laptop’s ability to accept a range of voltages, and presumably trusting his steady hand with a rotary tool. Some Kapton tape and a bit of wire completes the work, and with a carefully reshaped hole in the outer case he’s good to go.

The result is beautifully done, and a casual observer would be hard pressed to know that it hadn’t always been a USB-C port. We’re sure there will come a moment at which someone will plug in a USB-C peripheral and expect it to work, it’s that good.

If you’d like to know a little bit more about USB-C, we’d like to direct you to our in-depth look at the subject.

Charge All Your Batteries With USB PD

USB-C has been around for a while, and now that it can charge phones and Macbooks and Thinkpads, the hackers are starting to take note of power adapters that can supply lots of current. [Alex] was turned on to USB-C after he charged a laptop, Nintendo Switch, and phone with one power adapter. This led him to create a USB-C battery charger for all your LiPos.

The high-level design of this project is simply a board with a USB C port on one end, an XT60 plug on the other, and some support for balance leads. Plug this board into a USB C adapter, plug a battery in, and the battery will charge automagically. The only UI is an RGB LED. It’s difficult to imagine a battery charger that’s easier to use.

For the electronics, [Alex] is using an STM32G0 for the smarts of the device, which includes handling the USB PD spec. This gives the charger 20 Volts to play with, and this is then regulated and sent into the battery. Right now, this board will charge 2-4c batteries. That’s a good enough proof of concept to charge some quadcopter batteries, or just as a really simple way to charge some LiPo cells.

Charging LiPos With USB Power Delivery

DC power bricks were never a particularly nice way to run home electronics. Heavy and unwieldy, they had a tendency to fall out and block adjacent outlets from use. In recent years, more and more gadgets are shipping with USB ports for power input. However, power over USB has always been fraught with different companies using all manner of different methods to communicate safe current limits between chargers and hardware.

These days, we’re lucky enough to have the official USB Power Delivery standard in place. Even laptop chargers are using USB now, and [FPVtv DRONES] decided to see if it was possible to use such a device as a high current power supply to charge batteries.

The test starts with a MI brand USB C laptop charger. A USB power meter is plugged inline to determine voltage and current output of the charger, while a small microcontroller device is used to speak with the laptop charger and set it to high voltage, high current delivery mode. A lithium battery charger is then plugged in, and the setup is tested by charging two large 4-cell LiPos at over 1.4 amps concurrently.

The setup demonstrates that, with the right off-the-shelf modules, it’s possible to use your laptop charger to run high-current devices, as long as you can spoof it into switching into the right mode. This is the natural evolution of USB power technology – a road which started long ago with projects like the MintyBoost, way back when. Video after the break.

Continue reading “Charging LiPos With USB Power Delivery”

The Wonderful World Of USB Type-C

Despite becoming common over the last few years USB-C remains a bit of a mystery. Try asking someone with a new blade-thin laptop what ports it has and the response will often include an awkward pause followed by “USB-C?”. That is unless you hear “USB 3” or maybe USB 3.1. Perhaps even “a charging port”. So what is that new oval hole in the side of your laptop called? And what can it really do? [jason] at Reclaimer Labs put together a must-read series of blog posts in 2016 and 2017 plumbing the depths of the USB 3.1 rabbit hole with a focus on Power Delivery. Oh, and he made a slick Easy Bake Oven with it too.

A single USB Type-C connector

When talking about USB-C, it’s important to start at the beginning. What do the words “USB-C” entail? Unsurprisingly, the answer is complicated. “USB Type-C” refers only to the physical connector and detail about how it is used, including some of the 24 pins it contains. Then there are the other terms. “USB 3.1” is the overall standard that encompasses the Type-C connector and new high-speed data busses (“USB SuperSpeed” and “SuperSpeedPlus”). In addition there is “USB Power Delivery” which describes power modes and even more pin assignments. We’re summarizing here, so go read the first post for more detail.

The second post devotes a formidable 1,200 words to providing an overview of the electrical specifications, configuration communication, and connector types for USB 3.1.

A GIF of a flipping USB Type C connector
Marketing at its finest

The third post is devoted to USB Power Delivery. Power Delivery encompasses not only the new higher power modes supported (up to 100W!), but the ways to use the extra 10 or 13 pins available on the Type-C connector. This is both the boon and bane of USB-C, allowing apparently identical ports to carry common signals like HDMI or DisplayPort, act as analog audio outputs, and provide more exotic interfaces like PCIe 3.0 (in the form of Thunderbolt 3, which is a yet another thing this connector can be used for).

It should be clear at this point that the topics touched by “USB Type-C” are exceptionally complex. Save yourself the trouble of a 90MB specification zipfile and take a pass through [jason]’s posts to understand what’s happening. For even more detail about Power Delivery, he walks through sample transactions in a separate post.