All About USB-C: Manufacturer Sins

People experience a variety of problems with USB-C. I’ve asked people online about their negative experiences with USB-C, and got a wide variety of responses, both on Twitter and on Mastodon. In addition to that, communities like r/UsbCHardware keep a lore of things that make some people’s experience with USB-C subpar.

In engineering and hacking, there’s unspoken things we used to quietly consider as unviable. Having bidirectional power and high-speed data on a single port with thousands of peripherals, using nothing but a single data pin – if you’ve ever looked at a schematic for a proprietary docking connector attempting such a feat, you know that you’d find horrors beyond comprehension. For instance, MicroUSB’s ID pin quickly grew into a trove of incompatible resistor values for anything beyond “power or be powered”. Laptop makers had to routinely resort to resistor and one-wire schemes to make sure their chargers aren’t overloaded by a laptop assuming more juice than the charger can give, which introduced a ton of failure modes on its own.

When USB-C was being designed, the group looked through chargers, OTG adapters, display outputs, docking stations, docking stations with charging functions, and display outputs, and united them into a specification that can account for basically everything – over a single cable. What could go wrong?

Of course, device manufacturers found a number of ways to take everything that USB-C provides, and wipe the floor with it. Some of the USB-C sins are noticeable trends. Most of them, I’ve found, are manufacturers’ faults, whether by inattention or by malice; things like cable labelling are squarely in the USB-C standard domain, and there’s plenty of random wear and tear failures.

I don’t know if the USB-C standard could’ve been simpler. I can tell for sure that plenty of mistakes are due to device and cable manufacturers not paying attention. Let’s go through the notorious sins of USB-C, and see what we can learn. Continue reading “All About USB-C: Manufacturer Sins”

All About USB-C: Pinecil Soldering Iron

As many people have pointed out, what matters with USB-C isn’t just the standard, it’s the implementations. After all, it’s the implementations that we actually have to deal with, and it’s where most of the problems with USB-C arise. There is some fault to the standard, like lack of cable markings from the get-go, but at this point, I’m convinced that the USB-C standard is a lot better than some people think.

I’d like to walk you through a few USB-C implementations in real, open-source, adjacent, and just interesting products. They’re all imperfect in some way – it can’t be otherwise, as they have to deal with the messy real world, where perfection is a rarity.

Today, let’s check out the Pinecil. A soldering iron by Pine64, released a few years ago, keeping the price low and quality high. It sports both a barrel jack and a USB-C port for its power input – a welcome departure from the Miniware iron strategy, where neither the barrel-jack-only TS100 nor the low-power proprietary-tip TS80 irons quite did it. And, given its design around TS100 T12-style tips, it’s no wonder Pinecil took a well-deserved spot in hobbyist world.

Can’t Just Pull The Trigger

Now, you might be thinking that Pinecil ought to be a simple device. The usual way to get high power out of a USB-C port is a Power Delivery (PD) trigger IC, and you could merely use that. However, if you’ve read the USB-C power article, you might remember the 45 W vs 60 W charger scenario, where such an arrangement would fail immediately. Overall, the configurability of trigger ICs is quite low, and when encountering a PD compatibility problem with some PSU, you can’t do anything about it except replace the IC with a slightly-different-logic IC- if a replacement even exists, and it usually does not. This is costly and limiting for a real-world use product. Continue reading “All About USB-C: Pinecil Soldering Iron”

All About USB-C: Framework Laptop

Talking about high-quality USB-C implementations, there’s a product that has multiple selling points designed around USB-C, and is arguably a shining example of how to do USB-C right. It’s the Framework laptop, where the USB-C expansion cards take the center stage.

Full disclosure – this article is being typed on a Framework laptop, and I got it free from Framework. I didn’t get it for Hackaday coverage – I develop Framework-aimed hardware as hobby, specifically, boards that hack upon aspects of this laptop in fun ways. As part of their community developer support effort, they’ve provided me with a laptop that I wouldn’t otherwise be able to get for such a hobby. By now, I’m part of the Framework community, I have my own set of things I like about this laptop, and a set of things I dislike.

This is not an article about how I’m satisfied or dissatisfied with the Framework laptop – there’s plenty of those around, and it would not be fair for me to write one – I haven’t paid for it in anything except having lots of fun designing boards and hanging out with other people designing cool things, which is something I do willingly. I’m an all-things-laptops enthusiast, and the reason I’d like to talk about Framework is that there is no better example of USB-C, and everything you can do with it, in the wild. Continue reading “All About USB-C: Framework Laptop”

All About USB-C: High-Speed Interfaces

One amazing thing about USB-C is its high-speed capabilities. The pinout gives you four high-speed differential pairs and a few more lower-speed pairs, which let you pump giant amounts of data through a connector smaller than a cent coin. Not all devices take advantage of this capability, and they’re not required to – USB-C is designed to be accessible for every portable device under the sun. When you have a device with high-speed needs exposed through USB-C, however, it’s glorious just how much USB-C can give you, and how well it can work.

The ability to get a high-speed interface out of USB-C is called an Alternate Mode, “altmode” for short. The three altmodes you can encounter nowadays are USB3, DisplayPort and Thunderbolt, there’s a few that have faded into obscurity like HDMI and VirtualLink, and some are up and coming like USB4. Most altmodes require digital USB-C communication, using a certain kind of messages over the PD channel. That said, not all of them do – the USB3 is the simplest one. Let’s go through what makes an altmode tick. Continue reading “All About USB-C: High-Speed Interfaces”

All About USB-C: Power Delivery

USB-C eliminates proprietary barrel plug chargers that we’ve been using for laptops and myriads of other devices. It fights proprietary phone charger standards by explicitly making them non-compliant, bullying companies into making their devices work with widely available chargers. As a hobbyist, you no longer need to push 3 A through tiny MicroUSB connectors and underspecced cables to power a current-hungry Pi 4. Today, all you need is a USB-C socket with two resistors – or a somewhat special chip in case the resistors don’t quite get you where you want to be.

You get way more bang for your buck with USB-C. This applies to power too; after all, not all devices will subsist on 15 W – some will want more. If 15 W isn’t enough for your device, let’s see how we can get you beyond.

Reaching Higher

USB-C power supplies always support 5 V and some are limited to that, but support for higher voltages is where it’s at. The usual voltage steps of USB-C are 5 V, 9 V, 15 V and 20 V ; 12V support is optional and is more of a convention. These steps are referred to as SPR, and EPR adds 28 V, 36 V and 48 V steps into the mix – for up to 240 W; necessitating new cables, but being fully backwards and forwards compatible, and fully safe to use due to cable and device checks that USB-C lets you perform.

A charger has to support all steps below its highest step, which means that 20 V-capable chargers also have to support 5 V, 9 V, and 15 V as well – in practice, most of them indeed do, and only some might skip a step or two. You can also get voltages in-between, down to 3.3 V, even, using a PD standard called PPS (or the AVS standard for EPR-range chargers) – it’s not a requirement, but you’ll find that quite a few USB-C PSUs will oblige, and PPS support is usually written on the label. Continue reading “All About USB-C: Power Delivery”

All About USB-C: Resistors And Emarkers

If you’ve been following along our USB-C saga, you know that the CC wire in the USB-C cables is used for communications and polarity detection. However, what’s not as widely known is that there are two protocols used in USB-C for communications – an analog one and a digital one. Today, let’s look at the analog signalling used in USB-C – in part, learn more about the fabled 5.1 kΩ resistors and how they work. We’ll also learn about emarkers and the mysterious entity that is VCONN!

USB-C power supply expects to sense a certain value pulldown on the CC line before it provides 5 V on VBUS, and any higher voltages have to be negotiated digitally. The PSU, be it your laptop’s port or a charger, can detect the pulldown (known as Rd) because it keeps a pullup (known as Rp) on the CC line – it then checks if a voltage divider has formed on CC, and whether the resulting voltage is within acceptable range.

If you plug a device that doesn’t make a pulldown accessible through the CC wire in the cable, your device will never get power from a USB-C port, and would only work with a USB-A to USB-C cable. Even the smarter devices that can talk the digital part of USB-C are expected to have pulldowns, it’s just that those pulldowns are internal to the USB-C communication IC used. A USB-C port that wants to receive power needs to have a pulldown.

This part is well-known by now, but we’ve seen lack-of-resistor failures in cheap devices aplenty, and the colloquial advice is “add 5.1 kΩ resistors”. You might be afraid to think it’s so simple, but you’d be surprised. Continue reading “All About USB-C: Resistors And Emarkers”

Showing a USB-C tester running the DingoCharge script, charging a battery pack at 7V. To the right is a battery pack being charged, and a USB-C charger doing the charging.

Use USB-C Chargers To Top Up Li-Ion Packs With This Hack

In USB-C Power Delivery (PD) standard, the PPS (Programmable Power Supply) mode is an optional mode that lets you request a non-standard voltage from a charger, with the ability to set a current limit of your choice, too. Having learned this, [Jason] from [Rip It Apart] decided to investigate — could this feature be used for charging Li-Ion battery packs, which need the voltage and current to vary in a specific way throughout the charging process? Turns out, the answer is a resounding “yes”, and thanks to a USB-C tester that’s programmable using Lua scripts, [Jason] shows us how we can use a PPS-capable USB-C charger for topping up our Li-Ion battery packs, in a project named DingoCharge.

The wonderful write-up answers every question you have, starting with a safety disclaimer, and going through everything you might want to know. The GitHub repo hosts not only code but also full installation and usage instructions.

DingoCharge handles more than just Li-Ion batteries — this ought to work with LiFePO4 and lithium titanate batteries, too.  [Jason] has been working on Ni-MH and lead-acid support. You can even connect an analog output thermal sensor and have the tester limit the charge process depending on the temperature, showing just how fully-featured a solution the DingoCharge project is.

The amount of effort put into polishing this project is impressive, and now it’s out there for us to take advantage of; all you need is a PPS-capable PSU and a supported USB-C tester. If your charger’s PPS is limited by 11V, as many are, you’ll only be able to fully charge 2S packs with it – that said, this is a marked improvement over many Li-Ion solutions we’ve seen. Don’t have a Li-Ion pack? Build one out of smartphone cells! Make sure your pack has a balancing circuit, of course, since this charger can’t provide any, and all will be good. Still looking to get into Li-Ion batteries? We have a three-part guide, from basics to mechanics and electronics!