This Macro Keyboard Has an ATtiny Beneath Every Key

Gili Yankovitch wanted a macropad to streamline WoW, so he built this odd example that has an ATtiny85 microcontroller under every key.

Macro keyboards are popular maker projects that can improve productivity—or gaming prowess. These keyboards provide dedicated buttons for macros, hotkey combos, or functions. If, for instance, you're tired of typing ALT + 0-1-5-1 every time you want an em dash, you could set a macro to do it for you. Gili Yankovitch wanted to build a macro keyboard to streamline his WoW gaming experience, so he built this unusual example that has an ATtiny85 microcontroller under every key.

Typical keyboards use a matrix circuit to detect key presses. The matrix will have several rows and columns, with each key sitting at a unique row/column intersection. When the user presses a key, it completes a specific row/column circuit. The connected microcontroller just has to note the row and column to identify the pressed key. The matrix setup is useful because it reduces the number of I/O pins used on the microcontroller (the potential minimum being the square root of the number of keys).

The problem, in this case at least, is that a keyboard matrix requires that the designer know the number of keys in the final product, as well as a general idea of their arrangement. Yankovitch wanted his macro keyboard to be completely modular, so that users can add or remove as many keys as they want. That modular design makes a conventional keyboard matrix useless, forcing Yankovitch to come up with another solution: equipping each key with its own microcontroller.

As people are sure to point out in the comments, there are other solutions to this problem that don't resort to the overkill of using a plethora of microcontrollers. But ATtiny85 chips are cheap (current shortage gouging notwithstanding) and we like Yankovitch's brute-force approach.

Every single key has its own individual ATtiny85 microcontroller to read key presses. That would, for instance, result in 17 microcontrollers for a 4x4 macro keyboard. That 17th microcontroller is a SparkFun Arduino Pro Micro, which acts as the central gateway in the network of ATtiny85 microcontrollers. That network is I2C and each ATtiny85 gets a unique identifier at startup, so the Pro Micro knows the pressed key and sends that along to the connected PC as a USB HID keyboard.

The rest of the hardware is pretty standard for a macro keyboard like this. There are hot-swappable key switch sockets with reverse-soldered SK6812 individually addressable RGB LEDs, topped by double-shot key switches that let the light shine through. Each key module has a small custom PCB and users can chain multiple PCBs together to form the configuration they want. The PCBs fit into a 3D-printable frame.

Yankovitch even coded a simple Python app that identifies the connected key modules and lets the user set up each key to register a specific character or combination.

Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles