Cursed USB-C: When Plug Orientation Matters

One of the selling points of the USB-C plug is that supposedly there is no way to incorrectly insert it. As [Pim de Groot] shows with a ‘Cursed USB-C 2.0 Device‘, reality is a bit more complicated when it comes to USB 2.0 compatibility in USB-C. He made a PCB that elegantly demonstrates the simplicity of the problem, featuring two LEDs. Only one orientation of the USB-C plug will cause one of the LEDs to light up green, with the other orientation leaving both LEDs blinking red.

Sigil on the back of the cursed USB-C 2.0 device, by Pim de Groot.

The reason for this behavior is simple: as [Pim] explains, although the USB-C plug has only a single pair of data lines (D+/-) for USB 2.0 connectivity, the receptor duplicates these on either side of its pins, leading out two pairs of D+/- lines. Normally you would connect the matching lines in these pairs together to ensure consistent behavior no matter the plug orientation, but you don’t have to.

By leading each USB 2.0 data pair to its own SAMD11C MCU, only one of the MCUs would be connected to USB, resulting in the connected MCU blinking the LEDs. With a bit more circuitry it’s possible to detect which way around the plug is inserted and use this information in a single MCU system, altering its behavior. While at first glance this seems little more than a fun party trick, but it also offers insight in a possible failure mode of USB-C 2.0 devices where only one plug orientation works, due to broken traces or pads.

Board view of [Pim]’s Cursed USB-C 2.0 Device.

(Heading image: Cursed USB-C 2.0 Device, by Pim de Groot)

Free RTOS

Getting Started With FreeRTOS And ChibiOS

If operating systems weren’t so useful, we would not be running them on every single of our desktop systems. In the same vein, embedded operating systems provide similar functionality as these desktop OSes, while targeting a more specialized market. Some of these are adapted versions of desktop OSes (e.g. Yocto Linux), whereas others are built up from the ground up for embedded applications, like VxWorks and QNX. Few of those OSes can run on a microcontroller (MCU), however. When you need to run an OS on something like an 8-bit AVR or 32-bit Cortex-M MCU, you need something smaller.

Something like ChibiOS (‘Chibi’ meaning ‘small’ in Japanese), or FreeRTOS (here no points for originality). Perhaps more accurately, FreeRTOS could be summarized as a multi-threading framework targeting low-powered systems, whereas ChibiOS is more of a full-featured OS, including a hardware abstraction layer (HAL) and other niceties.

In this article we’ll take a more in-depth look at these two OSes, to see what benefits they bring. Continue reading “Getting Started With FreeRTOS And ChibiOS”

Put More Scoot In Yer Scooter

We have a scooter hack that is odd for a couple of reasons. First, the vehicle in question is a Doc Green EWA 6000, a German clone of a Xiaomi M365, so Country stereotypes be darned. Second, it is about increasing the performance, and when we think of scooters, we get hung up on scoot. The link between these peculiarities is the speed limiter Germany requires on all scooters, which the Chinese model lacks. Despite the law, [Nikolaj] wanted a higher top speed and Bluetooth connectivity. Wireless unlocks advanced features, like cruise control, which are absent in the stock model.

The mainboard is responsible for speed control, but that is merely a component, and you can find third-party replacements. [Nikolaj] found a new part with a German forum member’s help, then recorded his work in English for our sake. The speed boost is nice, but the Bluetooth functionality is a massive improvement by itself. If you live in an area where the law doesn’t allow this sort of thing, think before you upgrade. Aftermarket parts aren’t always drop-in replacements, and in this case, the controller and display needed some finessing to fit, so measure twice and buy once.

If tearing into a brand new scooter isn’t for you, consider breathing new life into a retiree, and don’t forget that stopping is the other half of the battle.

The Rise And Fall Of The Fan Car

The advent of aerodynamic wings in motorsport was one of the most dramatic changes in the mid-20th century. Suddenly, it was possible to generate more grip at speed outside of altering suspension setups and fitting grippier tyres. However, it was just the beginning, and engineers began to look at more advanced ways of generating downforce without the drag penalty incurred by fitting wings to a racecar.

Perhaps the ultimate expression of this was the fan car. Mechanically complex and arguably dangerous, the technology offered huge downforce with minimal drag. However, the fan car’s time in the spotlight was vanishingly brief, despite the promise inherent in the idea. Let’s take a look at the basic theory behind the fan car, how they worked in practice, and why we don’t see them on racetracks today. Continue reading “The Rise And Fall Of The Fan Car”

An Homage To Daft Punk In Fan-Made Helmets Through The Years.

It’s with sadness that we note the end to an end. The French dance music duo Daft Punk have split up, announced in a video that’s has already clocked 22 million views.The band have inspired hardware geeks across the world not just with their music but the way they present themselves. A perennial project has been to replicate in some way their iconic robot helmets.

Ben Heck's 2009 take on the helmet
Harrison Krix’s 2009 take on Guy-Manuel de Homem-Christo’s helmet.

The artists themselves have been reticent about the exact technology that powers their headgear, but while this is a source of endless mystery and speculation to the music press it’s safe to assume from our perspective that their designers have the same parts at their disposal as we have. Microcontrollers, EL wire, and LEDs are universal, so the challenge lies in artistic expression with the helmet design rather than in making the effects themselves. We’ve reached into the archives for a bit of Daft Punk helmet nostalgia, so stick on Harder Better Faster and lets take a look at them, er, one more time.

Continue reading “An Homage To Daft Punk In Fan-Made Helmets Through The Years.”

This Week In Security: Mysterious Mac Malware, An Elegant VMware RCE, And A JSON Mess

There’s a new malware strain targeting MacOS, Silver Sparrow, and it’s unusual for a couple reasons. First, it’s one of the few pieces of malware that targets the new M1 ARM64 processors. Just a reminder, that is Apple’s new in-house silicon design. It’s unusual for a second reason — it’s not doing anything. More precisely, while researchers have been watching, the command and control infrastructure didn’t provide a payload. Silver Sparrow has been positively found on nearly 30,000 machines.

The malware also has an intentional kill switch, where the presence of a particular file triggers a complete removal of the malware package. Researchers at Red Canary point out that this package behaves very much like a legitimate program, difficult to pick out as malware. Ars Technica got an off-the-record statement from Apple, indicating that they are tracking the situation, and have revoked the developer’s certificate used to sign the malware. It’s not entirely clear whether this prevents the malware running on already compromised machines, or just stops new infections.

So who’s behind Silver Sparrow? The observed stealth mode and other complexities suggest that this is more than a simple adware or ransomware campaign. Since it was discovered before the payload was delivered, we may never know what the purpose is. It may have been a government created campaign, targeting something specific. Continue reading “This Week In Security: Mysterious Mac Malware, An Elegant VMware RCE, And A JSON Mess”

Should I Use Wheels Or Tracks?

When it comes to dominating offroad performance, many people’s first thought is of tracked vehicles. Bulldozers, tanks and excavators all use treads, and manage to get around in difficult terrain without breaking a sweat. Today, we’re exploring just what makes tracked vehicles so capable, as well as their weaknesses.

It’s All About Ground Pressure

The various parts of a tank’s propulsion system.

Let’s first look at how tank tracks work. There are a huge variety of designs, with differences depending on application. Different trends have been followed over time, and designs for military use in combat differ from those used for low-speed construction machines, for example. But by looking at a basic tank track design, we can understand the basic theory. On tanks, the track or tread itself is usually made up of individual steel links that are connected together with hinges, though other machines may use rubber tracks instead. The tracks are wrapped around one or more drive wheels, often cogged, which directly pull on the track. On the bottom of the vehicle are the road wheels, which ride on top of the track where it lies on the ground.  The weight of the vehicle is carried through the road wheels and passed on to the tread, spreading out the load across a broader area. Outside of this, the track system may also have one or more idler wheels used to keep the track taught, as well as return rollers to guide the track back around without touching the road wheels.

Continue reading “Should I Use Wheels Or Tracks?”