Hackster is hosting Hackster Holidays, Ep. 6: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Monday!Stream Hackster Holidays, Ep. 6 on Monday!

MacroPad Is a Low-Cost Alternative to Programmable Keypads

Based on the Raspberry Pi Pico, MacroPad lets users program up to eight custom actions on a small keypad complete with a screen.

The idea

Whether it is people who game, edit videos, or create digital art, many in those fields love their macro keys. In essence, macros combine a series of inputs/keystrokes into a single function that can be called upon with the press of a button, thus eliminating long and repetitive inputs that would otherwise be done manually. Most programmable macro keypads on the market today involve fancy keys that each contain an OLED screen for showing its purpose, but these extra features also mean extra cost. Therefore, Instructables user QCJ3 created a device he calls MacroPad, which incorporates far cheaper electronics while maintaining similar functionality.

Components used

MacroPad's design is based around a single Raspberry Pi Pico which is responsible for reading key presses and controlling the OLED display. The pad itself is made from a 4-by-2 grid of switch PCB mounts taken from Adafruit's 5x6 NeoKey product. One added bonus is that it contains a single NeoPixel on each square, meaning that the color of every switch can be individually changed. The switches themselves are Cherry MX Whites that give a satisfying click when pressed. Finally, there is a microSD card reader that stores the list of macros within a series of text files.

Designing MacroPad's enclosure

The enclosure that QCJ3 created features two main portions: the lower half for the bulk of the electronics, and the top half for the screen. Just underneath the lower "lid" sits the grid of switches that get constantly polled by the Pico which checks each column within a given row for a change in voltage. Right next to this is the microSD card reader that communicates with the Pico over its SPI bus. The screen also uses this bus to receive pixel data.

Programming

One big issue with the Raspberry Pi Pico is that its native Micropython firmware build does not contain support for the USB-HID keyboard specification, meaning that sending keystrokes to a host PC would be impossible. However, the community has developed custom firmware that enables this functionality, and QCJ3 was able to flash this onto his board by simply dragging-and-dropping the UF2 file into the virtual storage drive. With the problem now solved, the MacroPad could send keystrokes to another device when a macro key is pressed.

Configuring some macro keys

MacroPad relies on text files stored on the microSD card in order to know which key corresponds to which action. A given macro will have a list of keys that get pressed as well as combinations of multiple keys at the same time with the + symbol between them. Additionally, the key can be given a unique color with preset color names. Users are even able to swap out entire files by clicking the button on the right and selecting which profile they wish to use.

To see more about how QCJ3 built MacroPad, you can visit his write-up here on Instructables.

Evan Rust
IoT, web, and embedded systems enthusiast. Contact me for product reviews or custom project requests.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles