Getting Started With USB-C And Common Pitfalls With Charging And Data Transfer

USB-C is one of those things that generally everyone seems to agree on that it is a ‘good thing’, but is it really? In this first part of a series on USB-C, [Andreas Spiess] takes us through the theory of USB-C and USB Power Delivery (PD), as well as data transfer with USB-C cables. Even ignoring the obvious conclusion that with USB-C USB should now actually be called the ‘Universal Parallel Bus’ on account of its two pairs of differential data lines, there’s quite a bit of theory and associated implementation details involved.

The Raspberry Pi 4B's wrong USB-C CC-pin configuration is a good teaching example.
The Raspberry Pi 4B’s wrong USB-C CC-pin configuration is a good teaching example.

Starting with the USB 2.0 ‘legacy mode’ and the very boring and predictable 5 V power delivery in this mode, [Andreas] shows why you may not get any power delivered to a device with USB-C connector. Most likely the Downstream Facing Peripheral (DFP, AKA not the host) lacks the required resistors on the CC (Configuration Channel) pins, which are both what the other USB-C end uses to determine the connector orientation, as well as what type of device is connected.

This is where early Raspberry Pi 4B users for example saw themselves caught by surprise when their boards didn’t power up except with some USB cables.

The saga continues through [Andreas]’s collection of USB-C cables, as he shows that many of them lack the TX/RX pairs, and that’s before trying to figure out which cables have the e-marker chip to allow for higher voltages and currents.

On the whole we’re still excited about what USB-C brings to the table, but the sheer complexity and number of variables make that there are a myriad of ways in which something cannot work as expected. Ergo Caveat Emptor.

Continue reading “Getting Started With USB-C And Common Pitfalls With Charging And Data Transfer”

USB-C PD: New Technology Done Right

There is a tendency as we get older, to retreat into an instinctive suspicion of anything new or associated with young people. All of us will know older people who have fallen down this rabbit hole, and certainly anything to do with technological advancement is often high on their list of ills which beset society. There’s a Douglas Adams passage which sums it up nicely:

“I’ve come up with a set of rules that describe our reactions to technologies:
1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works.
2. Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it.
3. Anything invented after you’re thirty-five is against the natural order of things.”

Here at Hackaday we’re just like anybody else, in that we all get older. Our lives are devoted to an insatiable appetite for new technology, but are we susceptible to the same trap, and could we see something as against the antural order of things simply because we don’t like it? It’s something that has been on my mind in some way since I wrote a piece back in 2020 railing at the ridiculous overuse of new technologies to limit the lifespan and repairability of new cars and then a manifesto for how the industry might fix it, am I railing against it simply because I can’t fix it with a screwdriver in the way I could my 1960 Triumph Herald? I don’t think so, and to demonstrate why I’d like to talk about another piece of complex new technology that has got everything right.

In 2017 I lamented the lack of a universal low voltage DC power socket that was useful, but reading the piece here in 2024 it’s very obvious that in the years since my quest has been solved. USB Power Delivery was a standard back then, but hadn’t made the jump to the ubiquity the USB-C-based power plug and socket enjoys today. Most laptops still had proprietary barrel jack connectors, and there were still plenty of phones with micro-USB sockets. In the years since it’s become the go-to power standard, and there are a huge number of modules and devices to supply and receive it at pretty high power.

At first sight though, it might seem as though USB-PD is simply putting a piece of unnecessary technology in the way of what should be a simple DC connector. Each and every USB-PD connection requires some kind of chip to manage it, to negotiate the connection, and to transform voltage. Isn’t that the same as the cars, using extra technology merely for the sake of complexity? On the face of it you might think so, but the beauty lies in it being a universally accepted standard. If car manufacturers needed the same functionalty you’d have modules doing similar things in a Toyota, a Ford, or a Renault, but they would all be proprietary and they’d be eye-wateringly expensive to replace. Meanwhile USB-PD modules have to work with each other, so they have become a universal component available for not a huge cost. I have several bags of assorted modules in a box of parts here, and no doubt you do too. The significant complexity of the USB-PD endpoint doesn’t matter any more, because should it break then replacing it is an easy and cheap process.

This is not to say that USB-PD is without its problems though, the plethora of different cable standards is its Achilies’ heel. But if you’re every accused of a knee-jerk reaction to a bad piece of new technology simply because it’s new, point them to it as perhaps the perfect example of the responsible use of new technology.

2023: As The Hardware World Turns

We’ve made it through another trip around the sun, and for the first time in what feels like far too long, it seems like things went pretty well for the hackers and makers of the world. Like so many, our community suffered through a rough couple of years: from the part shortages that made building even the simplest of devices more expensive and difficult than it should have been, to the COVID-mandated social distancing that robbed us of our favorite meetups. But when looking back on the last twelve months, most of the news was refreshingly positive.

Pepperoni costs ten bucks, but they can’t activate Windows on their registers…

Oh sure, a trip to to the grocery store can lead to a minor existential crisis at the register, but there’s not much we at Hackaday can do about that other than recommend you some good hydroponics projects to help get your own home farm up and running.

As has become our New Year tradition, we like to take this time to go over some of the biggest stories and trends that we picked up on from our unique vantage point. Some will be obvious, but there’s always a few that sneak up on us. These posts tend to make for interesting reading in the future, and if you’ve got the time, we’d recommend going back and reading the previous entries in this series and reminiscing a bit.

It’s also a good time to reflect on Hackaday itself — how we’ve grown, the things that have changed, and perhaps what we can do better going forward. Believe it or not we do read all of the feedback from the community, whether it’s in the comments of individual posts or sent into us directly. We couldn’t do this without readers like you, so please drop us a line and let us know what you’re thinking.

So before we get any farther into 2024, let’s wind back the clock and revisit some of the highlights from the previous year.

Continue reading “2023: As The Hardware World Turns”

The Small And Silly Synth Now Even Smaller (But Just As Silly)

What do you do when you’ve carved out a niche for yourself as a builder of small and useless synthesizers? Why, build an even smaller and less useful synthesizer, of course!

If you’ve been paying even a minimal amount of attention you’ll know right away that this comes to use from [mitxela], who while not playing with volumetric POV displays is often found building smaller and smaller synthesizers, including putting them in DIN plug shells. The current synth is based on his “Silly Synth,” which puts all the guts for the synth inside a USB connector. This time around, though, it’s USB-C, and rather than fitting everything inside the connector shell, the entire synth sits on a PCB that’s smaller than a tiny piezo speaker. The whole thing runs on a CH32V003 microcontroller, and aside from a few support components and the right-angle USB-C plug, not much else.

The PCB is what really shines in [mitxela]’s design, especially the routing. He’s got a 20-pin QFN chip on one side of the board and the USB plug right behind it on the other side to deal with, plus the big through-holes for the speaker and the physical connections on the plug. It’s quite a crowded design, but it gets the job done. What’s more, he panelized the design so that mass production is possible; the reason for this is revealed at the end of the video below.

Pretty much every time we see one of these “smallest synth” videos we’re convinced that we’re seeing the lower limit of what’s possible, but every time, [mitxela] goes ahead and proves us wrong. That’s fine, of course — we don’t mind being wrong about something like this.

Continue reading “The Small And Silly Synth Now Even Smaller (But Just As Silly)”

Freshening Up Google’s USB-C PD Sniffer

USB-C Power Delivery has definitely made the big mess of wires a bit smaller but not all cables are created equal — some of them can handle upwards of 100 W while the cheapest can handle only 10. To accommodate this, USB-C cables need to actively tell both ends what their capabilities are, which turns an otherwise passive device into a hidden chip in a passive looking cable.

[Greg Davill] has decided to unravel the mystery of why your laptop isn’t charging by creating a USB-PD sniffer. Based on Google’s Twinkie sniffer, the FreshTwinkie makes the design more accessible by reducing the number of layers in the PCB and replacing the BGA variant of the STM32 for a more DIY-friendly QFN version. Interestingly, this isn’t the first time we’ve seen somebody try and simplify the Twinkie; back in 2021, the Twonkie from from [dojoe] hit a number of similar notes.

USB-C Power Delivery is just one of many protocols spoken over the CC pins, and the FreshTwinkie might be able to detect when some of those are enabled and why or why not. With future development, it could potentially provide useful information as to why a Thunderbolt 4 or tunneled PCIe device isn’t working correctly.

Drop-In Upgrade PCB Brings USB-C To DualShock 4

Despite a somewhat shaky start, it seems like everyone is finally embracing USB-C. Most gadgets have made the switch these days, and even Apple has (with some external persuasion) gotten on board. That’s great for new hardware, but it can lead to a frustrating experience when you reach for an older device and find a infuriatingly non-oval connector on the bottom.

If one of those devices happens to be Sony’s DualShock 4 controller, [DoganM95] has the fix for you. Sony wisely put the controller’s original micro USB connector on a separate PCB so it could be cheaply replaced without having to toss the main PCB — that same modularity also means it was relatively easy to develop a USB-C upgrade board.

That said, there was a bit of a catch. The USB board on the DualShock 4 also carries a LED module that illuminates the “Light Bar” on the rear of the controller. In this design, [DoganM95] has replaced the original component with a pair of side-firing LEDs. Combined with the extra pins in the flexible printed circuit (FPC) connector necessary to control them, and the pair of 0603 resistors required for USB-C to actually provide power, putting this board together might take a bit more fine-pitch soldering than you’d expect.

Over the last couple of years, we’ve seen a wide array of devices receive DIY USB-C upgrades. In fact, this isn’t even the first time we’ve seen it done on the DualShock 4. But there’s something about hacking a modern port onto a legacy piece of hardware that we just can’t seem to get enough of.

USB-C Cable Tester Is Compact And Affordable

We’ve all been bitten before by USB cables which were flaky, built for only charging, or just plain broken. With the increased conductor count and complexity of USB Type C, there are many more ways your cable can disappoint you. Over in Austria, [Peter Traunmüller] aka [petl] has designed the C2C caberQU USB C cable tester. This small PCB tester checks every wire on the cable, including the shield, and both connector orientations. He also makes a version for testing USB A to C cables (see video below the break).

Automatic cable testers are often associated with factory production, where you want to test a large quantity of cables quickly and automatically, and are priced accordingly. But this project makes it affordable and easy for anyone to test single cables in a home lab or small office.

The tester only checks for basic continuity, but that should solve a majority of USB-C cable problems. All the documentation for this tester is available on the project’s GitHub repository, including Gerbers, schematics, and mechanical details. Or if you’d rather buy one pre-made, [petl] has put them up for sale on Tindie. Continue reading “USB-C Cable Tester Is Compact And Affordable”