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!

All About USB-C: Introduction For Hackers

We’ve now had at least five years of USB-C ports in our devices. It’s a standard that many manufacturers and hackers can get behind. Initially, there was plenty of confusion about what we’d actually encounter out there, and manufacturer-induced aberrations have put some people off. However, USB-C is here to stay, and I’d like to show you how USB-C actually gets used out there, what you can expect out of it as a power user, and what you can get out of it as a hobbyist.

Modern devices have a set of common needs – they need a power input, or a power output, sometimes both, typically a USB2 connection, and often some higher-speed connectivity like a display output/input or USB 3. USB-C is an interface that aims to be able to take care of all of those. Everything aforementioned is optional, which is a blessing and a curse, but you can quickly learn to distinguish what to expect out of a device based on how it looks; if ever in doubt, I’d like to show you how to check.

Continue reading “All About USB-C: Introduction For Hackers”

The USB Type-C Cable That Will Break Your Computer

USB has been on our desktops and laptops since about 1997 or so, and since then it has been the mainstay of computer peripherals. No other connector is as useful for connecting mice, keyboards, webcams, microcontroller development boards, and everything else; it’s even the standard power connector for phones. The latest advance to come out of the USB Implementers Forum is the USB Type-C connector, a device with gigabits of bandwidth and can handle enough current to power a laptop. It’s the future, even if Apple’s one-port wonder isn’t.

Ground is red, V is Black. Photo: Benson Leung
Ground is red, V is black. Photo: Benson Leung

The cable of the future is, by default, new. This means manufacturers are still figuring out the port, and how to wire it up. You would think remembering ‘red = power, black = ground’ is easy, but some manufacturers get it so terribly wrong.

[Benson Leung] is a Google engineer who works on the Chromebook Pixel products, a huge proponent of the USB Type-C connector, and a very prolific reviewer of USB Type-C connectors on Amazon. The latest cable he tested destroyed his test equipment, including a $1500 Chromebook Pixel 2 (link dead, try Internet Archive). How did a cable manage to do this? The manufacturer switched black and red.

The cable in question was a SurjTech 3M cable that has thankfully been taken down from Amazon. Swapping GND and Vbus weren’t the only problem – the SuperSpeed wires were missing, meaning this was effectively only a USB 2 cable with a Type-C connector. The resistor required by USB spec was the wrong value, and was configured as a pull-down instead of a pull-up.

This isn’t an issue of a cable not meeting a design spec. Ethernet cables, specifically Cat6 cables, have been shown to work but fail to meet the specs for Cat6 cables. That’s shady manufacturing, but it won’t break a computer. This is a new low in the world of computer cables, but at least the cable has disappeared from Amazon.