Console Macropad Uses SD Cards For Stylin’ And Profilin’

Macropads are great to have around for hotkey input, but things can get out of hand pretty quickly when you realize just how many shortcuts are in your life. To avoid ending up with another keyboard-sized keyboard, some hackers will use a handful of switches and a lot of layers to turn a few keys into many. And instead of worrying about legends, they use blank keys and leave the labels to be displayed on some kind of screen.

Among them is [QCJ3], who built this nifty little console-style macropad. Uninterested in managing microcontroller memory, [QCJ3] went the tangible route and loaded various profiles onto a micro SD card. Each text file on a given card holds a label, a color for the keyswitch LED, and of course, the keystrokes that make up the macro itself.

There are myriad ways to build a macro pad, from designing with bare chips (if you can get them) to programming a pre-built key matrix.  Grab the files if you like the console look and call it a day, or build a completely new enclosure that fits your hand exactly. Whatever you build, consider entering it in our brand spankin’ new Odd Inputs and Peculiar Peripherals Contest, which runs now through July 4th. If you need more inspiration, just peep the projects under macropad tag, or peruse the much heftier keyboard tag.

Via KBD

Number Like It’s 1234 AD With This Cistercian Keypad

Don’t feel bad if you don’t know what Cistercian numbers are. Unless you’re a monk of the Order of Cistercia, there’s really no reason for you to learn the cipher that stretches back to the 13th-century. But then again, there’s no reason not to use the number system to make this medieval-cool computer number pad.

If you haven’t been introduced to the Cistercian number system, it’s actually pretty clever. There are several forms of it, but the vertical form used here by [Tauno Erik] is based on a vertical stave with nine glyphs that can be attached to or adjacent to it. Each glyph stands for one of the nine numerals — one through nine only; there’s no need for a zero glyph. There are four quadrants around the stave — upper right, upper left, lower right, and lower left — and where the glyph lies determines the multiplier for the glyph. So, if you wanted to write the number “1234”, you’d overlay the following glyphs into a single symbol as shown.

[Tauno]’s Cistercian keypad, admittedly more of an art and history piece than a useful peripheral, somehow manages to look like it might have been on the desk of [Theodoric of York, Medieval Accountant]. Its case is laser-cut birch plywood, containing a custom PCB for the 20 keyboard switches and the Xiao RP2040 MCU that runs the show. Keycaps are custom made from what looks like oak combined with a 3D-printed part, similar to his previous wooden keycap macro pad. Each of the nine Cistercian glyphs is hand-carved into the keycaps, plus an imaginary glyph for zero, which wasn’t part of the system, as well as operators and symbols that might have baffled the medieval monks.

The native Cistercian system is limited to numbers between 1 and 9,999, so we’ll guess that the keypad just outputs the Arabic numeral corresponding to the Cistercian key pressed and doesn’t actually compose full Cistercian numbers. But the code to do that would be pretty easy, and the results pretty cool, if a bit confusing for users. Even if it’s just for looks, it’s still a cool project, and we doff the hood of our monkish robe to [Tauno] for this one.

The TinyPICO board and the rocker switch soldered together showing a complete device, shown being held in the air by a crocodile clip

Simple Hardware Switch For OS Dualbooting, Thanks To RP2040

Dualbooting your computer can be a chore, the more switching between OSes you have to do – which is why virtualization or having separate computers are the go-to for many. Failing that, we have no choice but to smooth over our dualbooting experience with various workarounds and helpers. [William Somsky] shares one such helper tool with us – an elegant device made with a RP2040-sporting TinyPICO board and a three-way rocker switch, directing GRUB to boot into either Windows or Linux automatically, or leave us with the usual boot menu. This way, you can just flip the switch, hit “reboot” and walk away, coming back to your PC booted into OS of your choice, instead of timing your presence just so that you can catch the boot menu on time.

All you need to do is to solder a rocker switch to your RP2040 board of choice, then flash the RP2040 with code that detects the state of the switch, and creates a mass storage device hosting a file setting a Grub variable to either one of the 0, 1 or 2. [William] describes his journey, fighting mysterious caching problems, but tells us he got it working in the end. Sadly, [William] hasn’t shared the RP2040-side code with us, but he has at least put the Grub’s custom.cfg file in the ‘Files’ section of the Hackaday.io project.

Readily accessible microcontrollers with mass storage functions sure help make such hacks simple – earlier, we’ve seen dualboot switching like this done by modifying assembly code of the MBR. Dualbooting is a hacker’s rite of passage, and certain OSes of late can make it harder than other ones. Even if you don’t want to dualboot your PC, however, you sure can dualboot an Arduino!

Processing Audio With The RP2040

The Raspberry Pi, although first intended as an inexpensive single-board computer for use in education, is now ubiquitous in electronics communities. Its low price as well as Linux platform and accessible GPIO make it useful in many places outside the classroom. But, if you want to abandon the ease-of-use in favor of an even lower price, the Raspberry Pi foundation makes that possible as well with the RP2040 chip, commonly found on the Pico. [Jason] shows us one way to make use of this powerful chip by putting one in an audio digital signal processing board.

While development boards are available for this chip, [Jason] has opted instead for a custom PCB which he designed himself and includes an integrated headphone amplifier and 3.5 mm audio jacks. To do the actual DSP work, the RP2040 chip uses three 12-bit ADC channels and 16 controllable PWM channels. The platform is also equipped with the TLV320AIC3254 codec from Texas Instruments. With all of this put together, he has a functioning open-source platform he calls the DS-Pi.

[Jason] has built this as a platform for guitar effects and as a customizable guitar amp modeler, but with a platform that is Arduino-compatible and fairly easy to program it could be put to use for anything involving other types of music or audio processing, like this specialized MIDI-compatible guitar effects platform which is built around the same processor.

A Pi Pico connected to a MYIR Z-turn board with a set of jumper wires

Need A JTAG Adapter? Use Your Pico!

JTAG is a powerful interface for low-level debugging and introspection of all kinds of devices — CPUs, FPGAs, MCUs and a whole lot of complex purpose-built chips like RF front-ends. JTAG adapters can be quite obscure, or cost a pretty penny, which is why we’re glad to see that [Adam Taylor] from [ADIUVO] made a tutorial on using your Pi Pico board as a JTAG adapter. This relies on a project called XVC-Pico by [Dhiru Kholia], and doesn’t require anything other than a Pi Pico board itself — the XVC-Pico provides both a RP2040 firmware implementing the XVC (Xilinx Virtual Cable) specification and a daemon that connects to the Pico board and interfaces to tools like Vivado.

First part of the write-up is dedicated to compiling the Pico firmware using a Linux VM. There’s a pre-built .uf2 binary available in the GitHub repo, however, so you don’t have to do that. Then, he compiles and runs a daemon on the PC where the Pico is connected, connects to that daemon through Vivado, and shows successful single-stepping through code on a MYIR Z-turn board with a Xilinx XC7Z020. It’s worth remembering that, if your FPGA’s (or any other target’s) JTAG logic levels are 1.8V or 2.5V-based, you will need a level shifter between it and the Pi Pico, which is a board firmly in the 3.3V realm.

You just cannot beat the $3 price and the ease of setup. Pi Pico is shaping up to be more and more of a hardware multi-tool. Just a month ago, we covered how the Pico can work as a logic analyzer. A lot of that, we have the PIO peripherals to thank for — an assembly of state machines that even let you “bitbang” high-speed interfaces like DVI. If you’re interested in how PIO functions, there are some good write-ups around here. Lacking a Pi Pico, you can use this board’s bigger sister to interface with JTAG, too.

the RP2040 stamp

Putting The RP2040 On A Stamp

In the electronics world, a little one-inch square board with castellated edges allows a lot of circuitry to be easily added in a small surface area. You can grab a prepopulated module, throw it onto your PCB of choice, and save yourself a lot of time routing and soldering. This tiny Raspberry Pi 2040 module from [SolderParty] ticks all those boxes.

With all 30 GPIO broken out, 8MB of onboard flash, and a NeoPixel onboard, you have plenty to play with on top of the already impressive specs of the RPi2040. Gone are the days of in-circuit programmers, and it uses a UF2 bootloader to make it easy B to transfer new images over USB. Rust, MicroPython, Arduino, and the PicoSDK are all development options for code. All the KiCad files, BOM, schematics, and firmware are up on GitHub under a CERN license for your perusal pleasure. They’ve helpfully included footprints as well as a reference carrier board design.

It is a handy little project that might be good to keep in mind or just use as a reference design for your efforts. We have a good overview of the RPi2040 from an STM perspective. If you’re curious about what you could even use this little stamp for, why not driving an HDMI signal?

Hackaday Links Column Banner

Hackaday Links: January 23, 2022

When Tonga’s Hunga-Tonga Hunga-Ha’apai volcano erupted on January 15, one hacker in the UK knew just what to do. Sandy Macdonald from York quickly cobbled together a Raspberry Pi and a pressure/humidity sensor board and added a little code to create a recording barometer. The idea was to see if the shock wave from the eruption would be detectable over 16,000 km away — and surprise, surprise, it was! It took more than 14 hours to reach Sandy’s impromptu recording station, but the data clearly show a rapid pulse of increasing pressure as the shockwave approached, and a decreased pressure as it passed. What’s more, the shock wave that traveled the “other way” around the planet was detectable too, about seven hours after the first event. In fact, data gathered through the 19th clearly show three full passes of the shockwaves. We just find this fascinating, and applaud Sandy for the presence of mind to throw this together when news of the eruption came out.

Good news for professional astronomers and others with eyes turned skyward — it seems like the ever-expanding Starlink satellite constellation isn’t going to kill ground-based observation. At least that’s the conclusion of a team using the Zwicky Transient Facility (ZTF) at the Palomar Observatory outside San Diego. ZTF is designed to catalog anything that blinks, flashes, or explodes in the night sky, making it perfect to detect the streaks from the 1,800-odd Starlink satellites currently in orbit. They analyzed the number of satellite transients captured in ZTF images, and found that fully 20 percent of images show streaks now, as opposed to 0.5 percent back in 2019 when the constellation was much smaller. They conclude that at the 10,000 satellite full build-out, essentially every ZTF image will have a streak in it, but since the artifacts are tiny and well-characterized, they really won’t hinder the science to any appreciable degree.

Speaking of space, we finally have a bit of insight into the causes of space anemia. The 10% to 12% decrease in red blood cells in astronauts during their first ten days in space has been well known since the dawn of the Space Age, but the causes had never really been clear. It was assumed that the anemia was a result of the shifting of fluids in microgravity, but nobody really knew for sure until doing a six-month study on fourteen ISS astronauts. They used exhaled carbon monoxide as a proxy for the destruction of red blood cells (RBCs) — one molecule of CO is liberated for each hemoglobin molecule that’s destroyed — and found that the destruction of RBCs is a primary effect of being in space. Luckily, there appears to be a limit to how many RBCs are lost in space, so the astronauts didn’t suffer from complications of severe anemia while in space. Once they came back to gravity, the anemia reversed, albeit slowly and with up to a year of measurable changes to their blood.

From the “Better Late Than Never” department, we see that this week that Wired finally featured Hackaday Superfriend Sam Zeloof and his homemade integrated circuits. We’re glad to see Sam get coverage — the story was also picked up by Ars Technica — but it’s clear that nobody at either outfit reads Hackaday, since we’ve been featuring Sam since we first heard about his garage fab in 2017. That was back when Sam was still “just” making transistors; since then, we’ve featured some of his lab upgrades, watched him delve into electron beam lithography, and broke the story on his first legit integrated circuit. Along the way, we managed to coax him out to Supercon in 2019 where he gave both a talk and an interview.

And finally, if you’re in the mood for a contest, why not check out WIZNet’s Ethernet HAT contest? The idea is to explore what a Raspberry Pi Pico with Ethernet attached is good for. WIZNet has two flavors of board: one is an Ethernet HAT for the Pico, while the other is as RP2040 with built-in Ethernet. The good news is, if you submit an idea, they’ll send you a board for free. We love it when someone from the Hackaday community wins a contest, so if you enter, be sure to let us know. And hurry — submissions close January 31.