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):
|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||?|
|C Pro Micro||?||?||-||Atmega32U4||32K||28K||2.5K||1K|
|nice!nano||25||25$||-||nRF52840||256K||1M||?||wireless with charging option, 3.3V|
|Arduino Nano||14 22?||15$||2$||Atmega328P||32K||28K||2K||1K||45x18 - just for reference|
The term "controller" is used quite ambiguously in keyboard building. Both microcontrollers and development boards are referred to by this name.
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.
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.
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.
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.
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
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.
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
C Pro Micro
23 IO pins, sturdy through-hole USB C connector, Pro Micro compatible pin footprint.
Added Li-Po charger, USB Type-C and a physical ON/OFF switch. GitHub repo
ShiroMicro is a ProMicro clone with Mid-Mount USB Type-C connector by /u/elfmimi.
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.