Charging USB-C Devices Off Of LiPo Battery Packs

When it was introduced in the late 90s, USB was the greatest achievement in all of computing. Gone were the PS/2 connectors for keyboards and mice, ADB ports, parallel ports, game ports, and serial ports. This was a Tower of Babel that would unite all ports under one standard universal bus.

Then more ports were introduced; micro, mini, that weird one that was a mini USB with more connectors off to the side. Then we started using phone chargers as power supplies. The Tower of Babel had crumbled. Now, though, there is a future. USB-C is everything stuffed into one port, and it can supply 100 Watts of power.

Delivering power over a USB-C connector is an interesting engineering challenge, and for his Hackaday Prize entry, [Chris Hamilton] is taking up the task. He’s building a USB-C battery charger, allowing him to charge standard R/C battery packs over USB.

There are two major components of the charger. The first, a Cypress CCG2 USB Power Delivery negotiator, handles all the logic of sending a command to the USB power supply and telling it to open up the pipes. It’s an off-the-shelf part and the implementation is well documented in app notes. The second major component is the battery management circuit built on a TI BQ40z60RHB. This includes the charger control logic and the ability to balance up to four cells. Battery connectors are XT-30, so all your drone battery packs can now be charged by a MacBook.

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 Links: October 1, 2017

Remember when you first saw a USB port in a standard wall outlet? It was a really great idea at the time, but how’s that 500mA charge holding up now? Fresh from a random press release, here’s a USB 3.0 wall outlet, with USB A and C ports. 5A @ 5V. Future proof for at least several years, I guess.

This is what you call ‘pucker factor’. An Air France A380 traveling from CDG to LAX suffered an uncontained engine failure somewhere over Greenland. Everyone on board is fine, except for the fact they had to spend the night in Goose Bay, Canada. Want the best Twitter/YouTube account of being a passenger? Here you go. Want to know why it landed in Goose Bay? This video is about ETOPS which really doesn’t apply in this instance but it’s a sufficient introduction to diverting airplanes after engine failures.

There are mysterious pylons going up alongside bridges and tunnels in NYC (auto-playing video). No one knows what they are, and the transportation board for New York is hiding behind a cloud of secrecy. We do know there are ‘fiber optics necessary for Homeland Security items’ inside, so place your bets. It’s facial recognition, or at the very least license plate readers. You know, exactly what New York and dozens of other cities have been doing for years.

Did somebody lose a balloon? A Raspberry Pi high-altitude balloon was found on the beach in south-west Denmark.

[Peter] is building an ultralight in his basement. We’ve covered the first part of the build, and we’ve been keeping tabs on him with semi-weekly updates. Now he’s fiberglassed the fuselage and started construction of the wings. Updates of note this week: he’s found a shop with an 8-foot CNC hot wire cutter for the wings. That really cuts down on the build time and it’s actually pretty cheap. One interesting part of this build is a ‘landing gear ejection system’, or a spring thing that allows the landing gear to fall away with the tug of a wire. Why would anyone want a landing gear ejection system? In case he needs to land in a soybean field. A flat bottom means a smoother and more survivable landing. If anyone is still concerned about [Peter]’s safety, this is a put up or shut up situation. Pitch in ten bucks for a parachute if you’re so concerned.

Hoverbike Kalashnikov! What? It’s a guy’s name. No big deal.

Open Hardware Summit is this week in Denver. What will be the highlights of the event? Well, last year, OSHWA announced the creation of an Open Hardware license. This is an all-encompassing license for Open Source Hardware that’s trying to solve some very, very hard problems. Copyright doesn’t work with hardware (except for boat hulls) like it does with software, and this Open Hardware license is the best we’ve got going for us. We’re going to get an update on how well this license is propagating. Also on deck for Summit attendees is a field trip to Sparkfun and Lulzbot. Want to see the world’s second largest 3D printer bot farm? It’ll be awesome.

Converting An Easy Bake Oven To USB

[Jason] converted an Easy Bake Oven to USB. If you have to ask why you’ll never know.

Easy Bake Ovens have changed a lot since you burnt down your house by installing a 100 Watt light bulb inside one. Now, Easy Bake Ovens are [bigclive] material. It’s a piece of nichrome wire connected through a switch across mains power. Part of the nichrome wire is a resistor divider used to power a light. This light assembly is just a LED, some resistors, and a diode wired anti-parallel to the LED.

This is a device designed for 120 V, but [Jason] wanted it to run on USB-C. While there are USB-C chargers that will supply enough power for an Easy Bake Oven, the voltage is limited to 20V. Rather than step up the USB-C voltage, [Jason] added some nichrome wires to divide it into six equal segments, then wired all the segments in parallel. This lowers the voltage by one sixth and increases the current by a factor of six. Good enough.

The power supply used for this hack is the official Apple 87W deal, with a USB-C breakout board (available on Tindie, buy some stuff on Tindie. Superliminial advertising) an Arduino Uno connected to the I2C pins. A few bits of code later, and [Jason] had a lot of power coming over a USB cable.

With the Easy Bake Oven fully converted, [Jason] whipped up a batch of cookie mix. After about 15 minutes the cookies crisped up and started to look almost appetizing.

While the result is weird — who on Earth would ever want a USB-powered Easy Bake Oven — this is honestly a fantastic test of [Jason]’s USB-C PHY breakout board. What better way to test a USB-C than a big resistive load, and what better resistive load is there than an Easy Bake Oven? It’s brilliant and hilarious at the same time.

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.

60 Watt USB Soldering Iron Does it with Type-C

Some time back we ran a post on those cheap USB soldering irons which appeared to be surprisingly capable considering they were really under powered, literally. But USB Type-C is slated to change that. Although it has been around for a while, we are only now beginning to see USB-C capable devices and chargers gain traction. USB-C chargers featuring the USB-PD option (for power delivery) can act as high power sources allowing fast charging of laptops, phones and other devices capable of negotiating the higher currents and voltages it is capable of sourcing. [Julien Goodwin] shows us how he built a USB-C powered soldering iron that doesn’t suck.

He is able to drive a regular Hakko iron at 20 V and 3 Amps, providing it with 60 W of input power from a USB-C charger. The Hakko is rated for 24 V operating voltage, so it is running about 16% lower power voltage. But even so, 60 W is plenty for most cases. The USB-C specification allows up to 5 A of current output in special cases, so there’s almost 100 W available when using this capability.

It all started while he was trying to consolidate his power brick collection for his various computers in order to reduce the many types and configurations of plugs. Looking around, he stumbled on the USB-PD protocol. After doing his homework, he decided to build a USB Type-C charger board with the PD feature based on the TI TPS65986 chip – a very capable USB Type-C and USB PD Controller and Power Switch. The TI chip is a BGA package, so he had to outsource board assembly, and with day job work constantly getting in the way, it took a fair bit of time before he could finally test it. Luckily, none of the magic smoke escaped from the board and it worked flawlessly the first time around. Here is his deck of slides about USB-C & USB-PD [PDF] that he presented at 2017 Open Hardware Miniconf early this year. It provides a nice insight to this standard, including a look at the schematic for his driver board.

Being such a versatile system, we are likely to see USB-C being used in more devices in the future. Which means we ought to see high power USB Soldering Irons appearing soon. But at the moment, there is a bit of a “power” struggle between USB-C and Qualcomm’s competing “Quick Charge” (QC) technology. It’s a bit like VHS and Betamax, and this time we are hoping the better technology wins.

Hackaday Links: December 4, 2016

The Chaos Communication Congress is growing! Actually, it’s not, but there may be an ‘overflow venue’ for everyone who didn’t get a ticket. There’s a slack up for people who didn’t get a ticket to 33C3 but would still like to rent a venue, set up some tables, stream some videos, and generally have a good time.

Need to test a lot of batteries? Have one of those magnetic parts tray/dish things sitting around? This is freakin’ brilliant. Put your batteries vertically in a metal dish, clip one lead of a meter to the dish and probe each battery with the other lead of your meter.

Pravda reports the USS Zumwalt and HMS Duncan – the most technologically advanced ships in the US and Royal Navies – have turned into, ‘useless tin cans due to China’, with ‘Microchips made in China putting the vessels out of action’. Again, Pravda reports this, so don’t worry. In other news, someone found a few USB drives in a parking lot in Norfolk, Virginia.

Here’s how discourse goes on the Internet. Someone does something. Everyone says it’s stupid. We wait a few days or weeks. Someone posts something on Medium telling everyone it’s actually okay. Public opinion is muddled until the actual issue being discussed is rendered technologically irrelevant. For the newest MacBook Pro, we’re currently at stage 3 and ‘it’s kind of great for hackers’. Now if only we knew how to make USB-C ports work with microcontrollers…

If you have a Prusa i3, here’s a free gift: a Spitfire. The files to print a remote control, 973mm Spitfire Mk XVI are now free for Prusa i3 and i3 Mk 2 owners. Why? Because it’s cool, duh, and [Stephan Dokupil] and [Patrik Svida], the guys behind the Spitfire and other 3D printed RC planes, are also in Czech. Now all we need are Czech roundel stickers.