Common controllers for keyboard building 2021
Cheap controllers are one main factor in making keyboard building accessible and affordable for people. From this aspect, a Chinese Pro Micro from Aliexpress is hard to beat with its price tag of about 3$ $5. However, on larger keyboards you may run out of the available pins and you have to consider other controllers.
Here is a list of the most common controllers used by keyboard builders (scroll for explanation and details):
Name | Pins | Price | Ali | MCU | Mem | Avail. | RAM | ROM | Desc. |
---|---|---|---|---|---|---|---|---|---|
Pro Micro | 18(+2) | 20$ | 3$ | Atmega32U4 | 32K | 28K | 2.5K | 1K | |
Puchi-C | 23? | €17 | - | Atmega32U4 | 32K | 28K | 2.5K | 1K | |
Teensy 2 | 25 | 9$ | 7.5$ | Atmega32U4 | 32K | 28K | 2.5K | 1K | 30x18 |
Teensy 2.0++ | 46 | 24$ | 7$ | Atmel90USB1286 | 128K | 120K | 8K | 4K | 51x18 |
Raspberry Pi Pico | 26 | 4$ | - | RP2040 (dual-core Arm Cortex-M0+) | 256K | ?K | ?K | ?K | ? |
Adafruit KB2040 Keeboar | 18+2 | 9$ | - | RP2040 (dual-core Arm Cortex-M0+) | 256K | ?K | ?K | ?K | ? |
RP2040-Zero | 20+9 | $5 | $11 | RP2040 (dual-core Arm Cortex-M0+) | 256K | ?K | ?K | ?K | ? |
Proton C | 23+1 | 18$ | - | STM32F303CCT6 | 256K | 248K | 40K | 4K | 3.3V! |
Elite C | 24 | 18$ | - | Atmega32U4 | 32K | 28K | 2.5K | 1K | |
C Pro Micro | ? | ? | - | Atmega32U4 | 32K | 28K | 2.5K | 1K | |
nice!nano | 25 | 25$ | - | nRF52840 | 256K | 1M | ? | wireless with charging option, 3.3V | |
ShiroMicro | ? | ? | - | Atmega32U4 | 32K | 28K | 2.5K | 1K | Mid-mount USB-C |
Arduino Nano | 14 22? | 15$ | 2$ | Atmega328P | 32K | 28K | 2K | 1K | 45x18 - just for reference |
Goldfish | 23 | - | - | Atmega32U4 | 32K | 28K | 2.5K | 1K |
"Controller"
The term "controller" is used quite ambiguously in keyboard building. Both microcontrollers and development boards are referred to by this name.
Microcontroller
The microcontroller is the central element of your circuit. The brain of your project, a really fascinating little thing.
A microcontroller is like a computer on its own with integrated CPU, memory and storage space all in a tiny socket (7x7mm). It runs the firmware (your program) to detect keypresses.
The most popular microcontrollers for keyboard projects nowadays are the Atmega32U4 and the RP2040.
The Atmega32U4 was the first popular one offering integrated USB connectivity. An electronic project can be recognized as an actual keyboard by your OS without the need for an external USB interface to program it.
The RP2040 is a very affordable chip. It's quite an overkill for a keyboard but it's able to run CircuitPython and KMK (e.g. you can set it up in like 2 minutes).
Other microcontrollers are also available, but their features (higher frequency, larger memory, more pins) are mostly overkill for a small keyboard project.
Development board (also "controller")
Development boards make programming the microcontroller and access of I/O pins very easy.
Colloquially known as "controllers", they are microcontrollers put on a small piece of PCB surrounded by all the necessary stuff (USB connector, voltage regulator, clock crystal, status LEDs, resistors, capacitors etc.) to be able to work and communicate with it right out of the box.
There are several development boards for keyboard building with Pro Micro being the cheapest ($3) and probably most popular. For years, the Teensy family was your option when you ran out of the pins of a Pro Micro (Pro Micro vs. Teensy).
More expensive development boards (e.g. Elite-C, Proton C) differ mostly in the connector type (USB micro vs. USB-C) and the number of pins.
However, early 2021, a new contender entered the stage: the Raspberry Pi Pico board and the RP2040 microcontroller, plus the Sparkfun and Adafruit boards using the same RP2040 chip.
The RP2040 is cheap, feature-rich and way more powerful than an Atmega32U4. At first sight it may seem an overkill for a keyboard project. However, combined with CircuitPython and KMK firmware, it allows a different workflow for people regularly updating their keymaps.
The Pico lacks QMK support at the moment.
Pins
The number of easily accessible GPIO pins is probably the most crucial property of a controller/development board in a custom keyboard project.
The number of pins defines the maximal number of keys in the keyboard matrix. While the Atmel32U4 has 26 I/O pins, only 18 of those are easily accessible on Pro Micro.
To build larger keyboards you may need to hack the Pro Micro or choose another development board with more pins.
Pinout
A pinout is a map of pin names and functions.
Pins are referenced by names (eg. A2, E5) in your firmware code, in documentations and data sheets.
Confusingly, pin names of the microcontroller and markings on the development board's PCB may differ. Fortunately, nice pinouts are there to help.
Here is a Atmel32U4 pinout with pin names.
Trends & History
2019-2020
Various kits and builds appeared with exposed through-hole components featuring the good old Atmega328P. Because of the lack of integrated USB support, these projects use V-USB and USBaspLoader to integrate the USB interface part in the bootloader.
2021
Raspberry entered the microcontroller scene with their RP2040 and the Pi Pico board. Several boards followed (by Sparkfun and Adafruit) featuring this chip.
Open source development boards
Pro Micro
C Pro Micro
An USB-C Pro Micro version available at booth.pm.
Goldfish
Another Pro Micro pinout compatible board with mid-mounted USB C, this time by Dr_Derivative: geekhack thread and GitHub repo.
23 IO pins, sturdy through-hole USB C connector, Pro Micro compatible pin footprint.
nRFMicro
Added Li-Po charger, USB Type-C and a physical ON/OFF switch. GitHub repo
ShiroMicro
ShiroMicro is a ProMicro clone with Mid-Mount USB Type-C connector by /u/elfmimi.
Pic: https://imgur.com/a/7PU1Kje
Other alternatives:https://github.com/joric/nrfmicro/wiki/Alternatives
Alvaro
Pro Micro-compatible 32u4 Breakout Board. A heavily-modified Goldfish Rev. C. While the schematic, basic layout, pinout is essentially the same, it uses 0603 components instead of 0402 and has some other changes.