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.

Look What Came Out Of My USB Charger !

Quick Charge, Qualcomm’s power delivery over USB technology, was introduced in 2013 and has evolved over several versions offering increasing levels of power transfer. The current version — QCv3.0 — offers 18 W power at voltage levels between 3.6 V to 20 V.  Moreover, connected devices can negotiate and request any voltage between these two limits in 200 mV steps. After some tinkering, [Vincent Deconinck] succeeded in turning a Quick Charge 3.0 charger into a variable voltage power supply.

His blog post is a great introduction and walk through of the Quick Charge ecosystem. [Vincent] was motivated after reading about [Septillion] and [Hugatry]’s work on coaxing a QCv2.0 charger into a variable voltage source which could output either 5 V, 9 V or 12 V. He built upon their work and added QCv3.0 features to create a new QC3Control library.

To come to grips with what happens under the hood, he first obtained several QC2 and QC3 chargers, hooked them up to an Arduino, and ran the QC2Control library to see how they respond. There were some unexpected results; every time a 5 V handshake request was exchanged during QC mode, the chargers reset, their outputs dropped to 0 V and then settled back to a fixed 5 V output. After that, a fresh handshake was needed to revert to QC mode. Digging deeper, he learned that the Quick Charge system relies on specific control voltages being detected on the D+ and D- terminals of the USB port to determine mode and output voltage. These control voltages are generated using resistor networks connected to the microcontroller GPIO pins. After building a fresh resistor network designed to more closely produce the recommended control voltages, and then optimizing it further to use just two micro-controller pins, he was able to get it to work as expected. Armed with all of this information, he then proceeded to design the QC3Control library, available for download on GitHub.

Thanks to his new library and a dual output QC3 charger, he was able to generate the Jolly Wrencher on his Rigol, by getting the Arduino to quickly make voltage change requests.

Continue reading “Look What Came Out Of My USB Charger !”

Hackaday Prize Entry: Playing With USB Power Delivery

USB Power Delivery is the technology that’s able to pump 100 Watts down a USB cable. It’s been around for half a decade now, but only in the last few years have devices and power supplies supporting USB PD shown up on the market. This is a really interesting technology, and we can’t wait to see the outcome of people messing around with five amps flowing through a cable they picked up at the dollar store, but where are the DIY solutions to futz around with USB PD?

For his Hackaday Prize entry, [Clayton] is doing just that. He’s built a tiny little power jack for USB PD that has a USB type-C plug on one end and a pair of screw terminals on the other. It’s the USB PD Buddy Sink, and once we find some cheap 100 Watt USB power adapters, this is going to be an invaluable tool.

Getting 100 Watts out of a USB charger is a bit more complex than just soldering a few wires together. The power delivery must be negotiated, and for that [Clayton] is using a simple, cheap STM32F0 ARM microcontroller. Plugging into a USB bus is a bit more complicated, but luckily On Semi has a neat little programmable USB Type-C controller PHY that does all the work. Throw in a few MOSFETS and other ancillary parts, and you have a simple, small 100 Watt power supply that plugs right into your new fancy laptop charger.

The design of the USB PD Buddy Sink is complete, and [Clayton] has a bunch of these on hand. He’s selling them on Tindie, but it’s also a great entry to the Hackaday Prize.

Unlocking 12V Quick Charge On A USB Power Bank

[Robert Nixdorf] frequently needs to use this high-end audio recorder, but it sucks dry a set of eight AA batteries in just a few hours. Obviously a longer lasting solution was required, and he started scouring the web looking for an answer. He bought a Quick Charge power bank and then hacked a Digispark to negotiate with the power bank to provide 12V output to Quick Charge his audio recorder.

Qualcomm’s Quick Charge system is designed to provide increased output voltages to reduce charging time in QC compatible devices such as mobile phones powered by their Snapdragon range of SoC’s. Depending on how the end-point negotiates with the charger, either 5V, 9V or 12V outputs are supported.

You can dig into the details in Qualcomm’s Quick Charge Patent [PDF] which shows how the system works. Quite simply, the voltage provided by the charger depends on the signals set on the D+ and D- data pins during the initial handshaking phase. [Robert] found it easy to get his QC charger to provide the required voltage by using a 3V3 voltage regulator and a resistive divider. But a more permanent solution would be needed if he wanted to use it on the field.

His parts bin revealed a Digispark board and he set about hacking it. He isolated the VUSB from the rest of his board since it would get pulled up to 12V when in use. And then replaced the existing 5V regulator with a 3V3 one. This required several bodges which he has documented on his blog. Some simple code flashed on the ATtiny85 handles all of the handshaking and sets up 12V output to run his audio recorder. A single charge on the power bank now lasts him almost 12 hours, so he’s pretty satisfied with the hack.

Quick Charge is currently at version 4 and supports USB-C and USB-PD hardware such as cables and connectors. But it seems using USB-C hardware outside of the current USB-C specifications is deprecated, with reports suggesting Google is asking OEM’s not to use Quick Charge but stick to USB-PD. Let’s hope this gets settled one way or another soon.

Thanks, [Frank] for the tip.