All About USB-C: Cable Types

USB-C cables and connectors: these are controversial topics, and rightfully so – I don’t want to pull any punches. I will also show you that things don’t have to be that bad for you, as long as you’re willing to apply a few tricks and adjust your expectations.

Wild West of Wiring

You might have a bunch of USB-C cables, and they all might look exactly the same, but you’ve likely experienced that they’re not the same internally, and often there’s not a label in sight. Yes, it’s pretty bad, and one could argue it’s getting worse.

I’d like to clarify that I’m only talking about USB C male – USB C male cables here. While cables like USB-A to USB-C are popular, they are quite simple; you get USB 2.0 or USB 3.0 data and 2 A of current at most, and the USB-C plug is usually hardwired as “host, will supply five volts”, which is defined by a pullup resistor. Also, while cables like “Type-C to DisplayPort” might look like cables at a glance, they are adapters with a meaningful amount of active circuitry in them.

Purely following the specification, there used to be six types of USB-C to USB-C cables out there. Then, it became eight. Now, I’m afraid, there’s twelve of them, purely following the spec, and there’s way more when counting all the out-of-spec cables. Good news is – for most of the time, majority of these cables will be suitable for simple tasks like charging and data transfer, and situations where you need a very specific cable are going to be rare enough. Still, let’s go through it, and you’ll see that they’re easier to tell apart than it might look. Continue reading “All About USB-C: Cable Types”

Roll Your Own WiFi Driver For The Pico W

The Raspberry Pi Pico is a handy little microcontroller that has become a widespread addition to many hackers’ workbench. The Pico W has a CYW4342W module (just like the Pi Zero W) to add WiFi capabilities and [Jeremy Bentham] ported his bare-metal WiFi driver to the Pico W.

The CYW43438 is an SDIO interface, so most of the code ported over from his Zerowi project, but there were a few notable tweaks along the way. Given that the Pi Pico SDK has the complete source code to drive the CYW43439 with an open source TCP/IP stack (lwIP) and the datasheets from Infineon are pretty detailed, why create your own driver?

The short answer is…because why not. But a second answer is to tweak it just how you like it. With his own implementation, [Jeremy] can focus on maximizing throughput and making WiFi a little easier to debug. He deeply delves into the hardware, scope traces, and code samples. It’s a tremendous five-part read over lunch. Some highlights include writing some code for the PIO (Programmable I/O) to interface with the SPI interface, bank switching in the WiFi RAM, handling the 140 different events, connecting to a network, and sending pings.

The PicoWi code is available on GitHub. Perhaps it can be integrated with this PCMIA interface to offer outstanding performance to an older laptop.

A Concealed Model Railway Rises To The Occasion

Occasional pieces of furniture serve little purpose other than to fill a space and maybe display a prized ornament or two. Who hasn’t got a relative with one two many small tables or display stands overfilling the available space!

If you visit [Peter Waldraff]’s house though, those pieces of furniture may not be what they seem. His display pedestal for example hides an N gauge railway layout that rises from the depths on a system of pulleys, with the action triggered by moving the vase displayed on its top. The vase conceals a magnet, which operates a reed switch that in turn controls the winch motor.

The layout is a loosely Batman themed train chase, with concentric spirals of track forming a continuous loop on which two trains run. There’s an ingenious arrangement with a reed switch and a piece of dead track to ensure that the chasing train is always held to ensure a gap between them. The landscaping is of a set of cliffs with a model of Wayne manor at the top, and there’s even a LED-lit Batmobile. One of the locomotives is recognisably based on a character from the Thomas the Tank Engine books.

All in all we like the ingenuity of this layout, but if you like it too then we’ve got a treat for you. Sharp-eyed readers will remember that this isn’t the first such project from Peter.

Continue reading “A Concealed Model Railway Rises To The Occasion”