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 !”
USB chargers are everywhere and it is the responsibility of every hacker to use this commonly available device to its peak potential. [Septillion] and [Hugatry] have come up with a hack to manipulate a USB charger into becoming a variable voltage source. Their project QC2Control works with chargers that employ Quick Charge 2.0 technology which includes wall warts as well as power banks.
Qualcomm’s Quick Charge is designed to deliver up to 24 watts over a micro USB connector so as to reduce the charging time of compatible devices. It requires both the charger as well as the end device to have compatible power management chips so that they may negotiate voltage limiting cycles.
In their project, [Septillion] and [Hugatry] use a 3.3 V Arduino Pro Mini to talk to the charger in question through a small circuit consisting of a few resistors and diodes. The QC2.0 device outputs voltages of 5 V, 9 V and 12 V when it sees predefined voltage levels transmitted over the D+ and D- lines, set by Arduino and voltage dividers. The code provides function calls to simplify the control of the power supply. The video below shows the hack in action.
Quick Charge has been around for a while and you can dig into the details of the inner workings as well as the design of a compatible power supply from reference designs for the TPS61088 (PDF). The patent (PDF) for the Quick Charge technology has a lot more detail for the curious.
Similar techniques have been used in the past and will prove useful for someone looking for a configurable power supply on the move. This is one for the MacGyver fans.
Continue reading “USB Charger Fooled into Variable Voltage Source”
[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.