Updating The Language Of SPI Pin Labels To Remove Casual References To Slavery

This morning the Open Source Hardware Association (OSHWA) announced a resolution for changing the way SPI (Serial Peripheral Interface) pins are labelled on hardware and in datasheets. The protocol originally included MOSI/MISO references that stand for “Master Out, Slave In” and “Master In, Slave Out”. Some companies and individuals have stopped using these terms over the years, but an effort is being taken up to affect widespread change, lead by Nathan Seidle of Sparkfun.

The new language for SPI pin labeling recommends the use of SDO/SDI (Serial Data Out/In) for single-role hardware, and COPI/CIPO for “Controller Out, Peripheral In” and “Controller In, Peripheral Out” for devices that can be either the controller or the peripheral. The change also updates the “SS” (Slave Select) pin to use “CS” (Chip Select).

SPI is widely used in embedded system design and appears in a huge range of devices, with the pin labels published numerous times in everything from datasheets and application notes to written and video tutorials posted online. Changing the labels removes unnecessary references to slavery without affecting the technology itself. This move makes embedded engineering more inclusive, an ideal that’s easy to get behind.

[2022 Editor’s Note: The OSHWA changed its recommended naming to PICO/POCI for “Peripheral In, Controller Out” and “Peripheral Out, Controller In”. Fine by us! I’ve updated this throughout the rest of the article because it doesn’t change Mike’s original argument at all.]

Continue reading “Updating The Language Of SPI Pin Labels To Remove Casual References To Slavery”

Hacker Turns Thermal Clacker Into USB Keyboard

Back before there were laptops and subsequently, netbooks, there were these adorable thermal typewriter/word processors that are lovingly referred to by their fans as baby wedges or wedgies. These fascinating little machines can put words on paper two different ways: you can either use a prohibitively expensive little ribbon cartridge and regular copy paper, or you can go the easy route and get yourself a 96′ roll of thermal fax paper and type until you feel like tearing off the page.

[David] was lucky enough to pick up a Canon S-70 in working condition for next to nothing, thinking it would make an awesome USB keyboard, and we agree. The PSoC 5 that now controls it may be overkill, but it’s pretty affordable, and it was right there on the desk just waiting for a purpose. And bonus — it has enough I/O for all of those loud and lovely keyswitches.

One thing that keeps these baby wedges within the typewriter camp is the Shift Lock function, which can only be disengaged by pressing Shift and had its own discrete logic circuitry on the board before he was forced to remove it.

That little screen is pure word processor and was used to show the typing buffer — all the characters you have a chance to correct before the print head commits them to paper. In a win for word processors everywhere, the screen was repurposed to show the current word count.

He was kind enough to post his firmware as well as real-time footage of the build. Watch him demo it in the wild after the break, and then stick around for part one of the build saga.

Portable word processors were still being made ten years ago, though they were mostly aimed at the primary school market as keyboarding trainers. Our own [Tom Nardi] recently did a teardown of a model called The Writer that relies on IR to send files.

Continue reading “Hacker Turns Thermal Clacker Into USB Keyboard”

Vintage Keyboard Gets The QMK Treatment

While nobody could deny that computing technology has some a long way in the last few decades, there are many out there who believe peak keyboard was sometime before the turn of the new millennium. They prefer the look, feel, and especially the sounds, of those classic keyboards to what passes for an input device these days. So much so that it’s not uncommon to see one of these old mammoths get freshened up and pushed into service with a modern computer.

Which is exactly what [Juan Pablo Kutianski] has done with his Compaq MX-11800. This keyboard, which is actually a branded version of the Cherry G80-11800, really stands out in a crowd. With an integrated trackball and a two-row arrangement for the function keys, it’s not hard to see why he’d want to show it off. But while the hardware itself was solid, the features and capabilities of this old school keyboard left something to be desired.

The solution was to replace the keyboard’s original electronics with a Teensy++2.0 running the popular QMK firmware. This not only made the keyboard USB, but allowed [Juan] to tweak things such as the trackball sensitivity and add in support for layers and macros. All of which can be managed through VIA, a graphical configuration tool for QMK.

As we’ve seen in so many projects, the combination of QMK running on the Teensy is a powerful tool for getting the most out of your keyboard. Whether breathing new life into a vintage piece of hardware or creating something truly custom like our very own [Kristina Panos] recently did, it’s definitely something to keep in mind if you’re considering any keyboard hacking.

ESP32 Becomes Music Player In Under 40 Lines Of Code

The demo code for [XTronical]’s ESP32-based SD card music player is not even 40 lines long, though it will also require a few economical parts before it all works. Nevertheless, making a microcontroller play MP3s (and other formats) from an SD card is considerably simpler today than it was years ago.

Part of what makes this all work is I2S (Inter-IC Sound), a format for communicating PCM audio data between devices. Besides the ESP32, at the heart of it all is an SD card reader breakout board and the MAX98357A, which can be thought of as a combination I2S decoder and Class D amplifier. The ESP32 reads audio files from the SD card and uses an I2S audio library to send the I2S data stream to the MAX98357A (or two of them for stereo.) From there it is decoded automatically and audio gets pumped though attached speakers.

A few economical components, and only a handful of connections between them.

It’s amazing how much easier audio is to work with when one can take advantage of shuffling audio data around digitally, and the decoder handles multiple formats with an amplifier built in. You can see [XTronical]’s ESP32 player in action in the video embedded below.

Continue reading “ESP32 Becomes Music Player In Under 40 Lines Of Code”

Building An ESP32 Smart Power Strip From Scratch

Surely the most straightforward way of creating a smart power strip would be to take an existing model and hack in some relays that you could fire with a WiFi-enabled microcontroller. But where’s the fun in that? Instead of repurposing a commercial power strip for his recent project, [Md Raz] decided to just build the whole thing himself.

The project started with a 3D printed enclosure that could hold the electronics and three panel mount sockets. The use of heat-set inserts makes it a bit more robust for future upgrade work, but otherwise it’s a fairly simple rectangular design. Nobody ever said a power strip had to be pretty, right? In addition to the panel mount sockets, there’s also a AC-DC converter to step mains voltage down to 5 VDC for the ESP32.

In addition to the microcontroller, the custom PCB in the power strip holds a trio of MOSFETs connected to AQH2223 solid state relay (SSR) chips. Once the ESP32 toggles the line attached to each MOSFET, the indicator LED above the outlet goes on and the appropriate SSR is thrown to turn on the power. With a simple web interface running on the microcontroller, all three outlets can be independently controlled from any device with a web browser.

If you’d like to limit your interaction with mains voltages, then we’ve seen some projects that commandeer the low-voltage side of a commercial smart power strip. But remember, putting a Raspberry Pi inside of a power strip might seem suspicious to some folks.

The Seedy World Of Message Serialization

Look, I’ve been there too. First the project just prints debug information for a human in nice descriptive strings that are easy to understand. Then some tool needs to log a sensor value so the simple debug messages gain structure. Now your debug messages {{look like : this}}. This is great until a second sensor is added that uses floats instead of ints. Now there are sprinklings of even more magic characters between the curly braces. A couple days later and things are starting to look Turing complete. At some point you look up and realize, “I need a messaging serialization strategy”. Well you’ve come to the right place! Continue reading “The Seedy World Of Message Serialization”

STM32 Blue Pill Turned GPG Security Token

Feeling the cost of commercial options like the YubiKey and Nitrokey were too high, [TheStaticTurtle] started researching DIY alternatives. He found an open source project allows the STM32F103 to act as a USB cryptographic token for GNU Privacy Guard, which was a start. All he had to do was build a suitable device to install it on.

Blue Pill proof of concept

The first step was to test the software out on the popular “Blue Pill” development board, which [TheStaticTurtle] documents in the write-up should anyone want to give it a try themselves. The ST-Link V2 was already a supported target, so it only took some relatively minor tweaks to get running and add support for a simple push button. The output of gpg --card-status showed the device was working as expected, so with the software sorted, it was time to take a closer look at the hardware.

To create his “TurtleAuth” dongle, [TheStaticTurtle] started with the basic layout of the Blue Pill and added in a TTP223E touch control IC. The original Micro USB port was also swapped for a male USB-A connector so the device could be plugged directly into a computer. An upper PCB, containing the status LEDs and touch pad, was then designed so it would fit over the main board as an enclosure of sorts. While the sides are still open, the device looks robust enough to handle life in a laptop bag at least.

While it’s not exactly a common project, this isn’t the first time we’ve seen somebody spin up their own hardware token. More evidence of what the dedicated individual can accomplish these days on a relatively limited budget.