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.

JST Is Not A Connector

When reading about cool projects and products, it’s common to see wiring plugs labelled “JST connector.” This looks fine until we start getting hands-on and begin hacking things together. Inevitably we find the JST connector from one part fails to fit in the JST connector of another. This is the moment we learn “JST” is not a connector specification. It is short for Japan Solderless Terminals Manufacturing Company, Ltd. A company whose history goes back to 1957 and their website (styled in 1999) lists hundreds of different types.

We can simplify to “JST connector” when chit-chatting about projects. But when it comes to actual hardware specification, that’s not good enough. Which JST connector?

Continue reading “JST Is Not A Connector”

Bluetooth Turns 5

Last week, the latest and greatest member of the Bluetooth family of wireless specifications was announced to the world: Bluetooth 5! What main changes are in store? Read the FAQ (PDF), or dig into the full spec (bigger PDF) at 2,800 pages.

Their big-print selling points include “up to 4x the range, 2x the speed, and 8x the broadcasting message capacity” to power the Internet of Things. Etcetera. [Akiba] pointed out via Twitter that they get the fourfold increase in range by adding an extra zero to the “Maximum Output Power” spec, going from 10 mW maximum power to 100 mW. That would do it.

In less snarky news, they’re also allowing for a lower-bitrate mode that will also increase range without simply boosting the power. The spec is actually being changed to let the user work out their optimal blend of power, range, and bitrate. We’re down with that. But you’re not getting 4x the range and 2x the speed without paying the bandwidth piper. That’s just physics.

If you use the beacon mode in Bluetooth Low Energy (BLE), you’ll be happy to hear that they’re lengthening the beacon packet from 31 bytes to 255, so you can send a bunch more data without consuming too much power. That’s the “8x”. Bluetooth 5.0 is also backwards compatible with Bluetooth 4.2, so you don’t have to redo anything if you don’t want to take advantage of the newer features. Your current BLE beacons will keep working.

Finally, there’s some contention-detection and other bandwidth optimizing going on, which is welcome in our crowded 2.4 GHz office spectrum. Our guess is that’s where the “2x speed” is largely coming from, but there are about 2,750 pages that we haven’t read yet, so if you’re digging into the spec, let us know what you find in the comments.

Thanks to [Akiba] for tipping us off to this via Twitter. Go check out his great talk on getting hacker stuff in Shenzhen that was presented at the SuperCon.

Specifications You Should Read: The NASA Workmanship Standards

"This is reflective of the typically idiosyncratic way engineer's of this era explored the human condition. The purple and shitty gradient show's the artists deep struggle with deadlines and his personal philosophy on the tyranny of the bourgeois. " - A segment from a confused student's art history paper
“Reflective of the typically idiosyncratic way engineers of this era explored the human condition. The shitty gradient show’s the deep struggle with deadlines and their personal philosophy on the tyranny of the bourgeois. ” – An excerpt from a confused student’s art history paper after the standard is installed in the Louvre.

The NASA workmanship standards are absolutely beautiful. I mean that in the fullest extent of the word. If I had any say in the art that goes up in the Louvre, I’d put them up right beside Mona. They’re a model of what a standard should be. A clear instruction for construction, design, and inspection all at once. They’re written in clear language and contain all the vernacular one needs to interpret them. They’re unassuming. The illustrations are perfectly communicative.  It’s a monument to the engineer’s art.

Around five years ago I had a problem to solve. Every time a device went into the field happily transmitting magic through its myriad connectors, it would inevitably come back red tagged, dusty, and sad. It needed to stop. I dutifully traced the problem to a connector, and I found the problem. A previous engineer had informed everyone that it was perfectly okay to solder a connector after crimping. This instruction was added because, previously, the crimps were performed with a regular pair of needle nose pliers and they came undone… a lot. Needless to say, the solder also interfered with their reliable operation, though less obviously. Stress failures and intermittent contact was common.

Continue reading “Specifications You Should Read: The NASA Workmanship Standards”

Learn JTAG By Writing A Bit-banging Programmer

j-tag-flow-chart

[Pesco] won one of Dangerous Prototypes’ PCB giveaways a few months ago. He opted for a CPLD breakout board. He just needed to put in a parts order and populate the components himself. But then what? He needed a JTAG programmer to work with the chip. Like any good autodidact he choose to make his own rather than buying one. He absorbed the JTAG specification and coded a bit banging programmer using an Arduino.

We’ve used JTAG many times to program ARM chips. But until now we never took the time to figure out how the specification works. If you’ve got an IEEE subscription you can download the whitepaper, but [Pesco] was also able to find one floating around on the interwebs. The flow chart on the left is the cheat sheet he put together based on his readings. From there he wrote the Arduino sketch which implements the programming standard, allowing him to interact with a chip through a minicom terminal window.

[via Dangerous Prototypes]