Bit-Banging The USB-PD Protocol

For one-off projects, adding a few integrated circuits to a PCB is not too big of a deal. The price of transistors is extremely low thanks to Moore and his laws, so we’re fairly free to throw chips around like peanuts. But for extremely space-constrained projects, huge production runs, or for engineering challenges, every bit of PCB real estate counts. [g3gg0] falls into the latter group, and this project aims to remove the dedicated USB-PD module from a lighting project and instead bit-bang the protocol with the ESP32 already on the board.

The modern USB power delivery (PD) protocol isn’t quite as simple as older USB ports that simply present a 5V source to whatever plugs itself into the port. But with the added complexity we get a lot more capability including different voltages and greater power handling capabilities. The first step with the PD protocol is to communicate with a power source, which requires a 1.2V 600kHz signal. Just generating the signal is challenging enough, but the data encoding for USB requires level changes to encode bits rather than voltage levels directly. With that handled, the program can then move on to encoding packets and sending them out over the bus.

After everything is said and done, [g3gg0] has a piece of software that lets the ESP32 request voltages from a power supply, sniff and log PD communication, and inject commands with vendor defined messages (VDM), all without needing to use something like a CH224K chip which would normally offload the USB-PD tasks. For anyone looking to save PCB space for whatever reason, this could be a valuable starting point. To see some more capabilities of the protocol, check out this USB-PD power supply that can deliver 2 kW.

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Circuit Sculpture Keyboard

The left half of GEMK-47, a mechanical keyboard with a round screen.
Image by [New-Concentrate6308] via reddit
Don’t worry, [New-Concentrate6308] is working on the GitHub for this final build of 2024, dubbed the GEMK_47. That stands for Grid Ergo Magnetic Keyboard, but I swear there are 48 keys.

What we’ve got here is a split ergo with an ortholinear layout. There’s a round screen and encoder on the left side, and a 35 mm trackpad on the right. There’s also space for some other round thing on this side, should you want another rotary encoder or whatever fits in place of the spacer.

Internally, there’s a Waveshare RP2040 Tiny and a mixture of Gateron Oil Kings and Gateron Yellow V3 switches. That lovely case is printed in silk silver PLA, but [New-Concentrate6308] wants to try metal-filled PLA for the next version. Although the original idea was to go wireless, ZMK didn’t play nicely with that round display, which of course is non-negotiable.

Continue reading “Keebin’ With Kristina: The One With The Circuit Sculpture Keyboard”

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Copycat Keyboard

This is Crater75, an almost completely from-scratch row-staggered wireless split board that [United_Parfait_6383] has been working on for a few months. Everything but the keycaps and switches is DIY.

The Crater75 split keyboard, which features OLEDs on the Function row.
Image by [United_Parfait_6383] via reddit
As cool as a keyboard full of screens might seem, can you imagine what it would be like to type at speed on a sea of slick surfaces? Not very nice, I’m thinking. But having them solely on the Function row seems like the perfect compromise. Here, the Function row keys interact with foreground applications, and change with whatever has focus. For the curious, those are 0.42″ OLEDs from Ali with a resolution of 72×40.

I’m not sure what’s going on internally, but the two sides connect with magnets, and either side’s USB-C can be used to charge the board. Both sides have a 2100 mAh Li-Po battery, and the average current of the OLED displays is low enough that the board can run for months on a single charge.

The switches are Gateron low-profiles and are wearing keycaps recycled from a Keychron, which add to the professional finish. Speaking of, the enclosures were manufactured by JLC3DP using the Nylon Multi-Jet Fusion process, but [United_Parfait_6383] says the left side feels too light, so the next revision will likely be CNC’d aluminium. Be sure to check out this short video of Crater75 in action.

Continue reading “Keebin’ With Kristina: The One With The Copycat Keyboard”

Stream Deck Plus Reverse Engineered

[Den Delimarsky] had a Stream Deck and wanted to be free of the proprietary software, so he reverse-engineered it. Now, he has a Stream Deck Plus, and with the same desire, he reverse-engineered it as well.

The device has eight buttons, a narrow screen, and four encoder dials. The device looks like a generic HID device to the host machine, and once it has been configured, doesn’t need any special software to function. By configuring the device using the official software in a virtual machine under the watchful eye of Wireshark, it was possible to figure out how that initial setup worked and recreate it using a different software stack.

If you’ve never done this kind of thing before, there is a lot of information about how to find USB data and draw inferences from it. The buttons send messages when pressed, of course. But they also accept a message that tells them what to display on their tiny screen. The device screen itself isn’t very big at 800×100.

[Den] packages everything up in the DeckSurf SDK, an open source project that lets you control Stream Decks. So if you just want to control the Deck, you don’t need to know all these details. But, for us, that’s where the fun is.

Way back in 2015, we covered some guy who had sniffed out a USB signal generator. That was easy since it was a serial port. However, you can go pretty far down the rabbit hole.

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Keyboard-Mouse

One of the most annoying things about keyboard and mouse input has got to be the need to constantly switch between the two. Ever wish there was a single solution that combined them with elegance? Then you should definitely check out [lemosbor]’s Lapa keyboard, where the right half includes a mouse sensor.

A 36-key split board where the right half also operates as a mouse.
Image by [lemosbor] via reddit
Lapa, which is Russian for ‘paw’, certainly has that type of look. This hand-wired keyboard uses a pair of Pro Micros and an ADNS9800 optical sensor for mousing around. Under those ‘caps are MX blues, the OG clackers.

Let me just say that I love the look of this keyboard, and I don’t normally like black and brown together. But that oak — that oak is classy, and it looks good with the resin-and-varnish case. If you can handle a 36-key board — I myself cannot — then this would probably be a game changer. There are even slots for your palms to breathe.

Unfortunately it’s not open source, but a girl can dream, right? In the reddit post, [lemosbor] says that they would be interested in selling the next version, provided it’s the final one.

Continue reading “Keebin’ With Kristina: The One With The Keyboard-Mouse”

Why Did Early CD-ROM Drives Rely On Awkward Plastic Caddies?

These days, very few of us use optical media on the regular. If we do, it’s generally with a slot-loading console or car stereo, or an old-school tray-loader in a desktop or laptop. This has been the dominant way of using consumer optical media for some time.

Step back to the early CD-ROM era, though, and things were a little kookier. Back in the late 1980s and early 1990s, drives hit the market that required the use of a bulky plastic caddy to load discs. The question is—why did we apparently need caddies then, and why don’t we use them any longer?

Caddyshack

Early CD players, like this top-loading Sony D-50, didn’t use caddies. Credit: Binarysequence, CC BY-SA 4.0

The Compact Disc, as developed by Phillips and Sony, was first released in 1982. It quickly became a popular format for music, offering far higher fidelity than existing analog formats like vinyl and cassettes. The CD-ROM followed in 1985, offering hundreds of megabytes of storage in an era when most hard drives barely broke 30 MB. The discs used lasers to read patterns of pits and lands from a reflective aluminum surface, encased in tough polycarbonate plastic. Crucially, the discs featured robust error correction techniques so that small scratches, dust, or blemishes wouldn’t stop a disc from working.

Notably, the first audio CD player—the Sony CDP-101—was a simple tray-loading machine. Phillips’ first effort, the CD100, was a top-loader. Neither used a caddy. Nor did the first CD-ROM drives—the Phillips CM100 was not dissimilar from the CD100, and tray loaders were readily available too, like the Amdek Laserdrive-1. Continue reading “Why Did Early CD-ROM Drives Rely On Awkward Plastic Caddies?”

Illustrated Kristina with an IBM Model M keyboard floating between her hands.

Keebin’ With Kristina: The One With The Curvy Centerfold

What do you get when you combine a Raspberry Pi 4B, a Kaypro keyboard, and a 9″ Apple ], you get the coolest AVR development workstation I’ve seen in a while.

A Raspberry Pi-based AVR workstation that uses a Kaypro keyboard and 9" monochrome Apple ][c display.
Image by [John Anderson] via Hackaday.IO
As you may have guessed, I really dig the looks of this thing. The paint job on the display is great, but the stripes on the keyboard and badging on are on another level. Be sure to check out the entire gallery on this one.

About that keyboard — [John] started this project with two incomplete keyboards that each had a couple of broken switches. Since the two keyboards were compliments of each other parts-wise, they made a great pair, and [John] only had to swap out three switches to get it up and clacking.

In order to make it work with the Pi, [John] wrote a user-mode serial driver that uses the uinput kernel module to inject key events to the kernel. But he didn’t stop there.

Although the Pi supports composite video out, the OS doesn’t provide any way to turn off the chroma color signal that’s modulated on top of the basic monochrome NTSC signal, which makes the picture look terrible. To fix that, he wrote a command-line app that sets up the video controller to properly display a monochrome NTSC signal. Happy AVRing on your amazing setup, [John]! Continue reading “Keebin’ With Kristina: The One With The Curvy Centerfold”