m20 — 5×4 LEGO Macropad / Numpad
Status: Tested & Verified
5×4 Ortho (20 Keys)
RP2040 Pico / Clones
MX & Kailh Choc v2
Rotary Encoder + OLED + RGB
QMK

A versatile 5×4 ortholinear macropad / numpad mounted on a 16×16 LEGO baseplate, supporting both 5-pin Cherry MX and low-profile Kailh Choc v2 switches, plus an optional rotary encoder, I²C OLED screen, and RGB LED strip.
Status: Tested All OK
* [x] Gerbers designed
* [x] Firmware
* [x] Breadboard tested
* [x] Gerbers printed
* [x] Board tested
Features
- Layout: 5×4 ortholinear (20 keys)
- Switches: Dual footprint supporting 5-pin Cherry MX and Kailh Choc v2 switches
- Controller: Raspberry Pi Pico (
RP2040) or compatible clones (WeAct, Teenstar) - Peripherals: Optional EC11 rotary encoder, I²C OLED display, status LED, and 3-pin RGB LED strip
- Diodes: Supports both through-hole (DO-35) and surface-mount (SOD-123)
1N4148diodes - Firmware: QMK
3D Render & PCBs
3D Render

Printed PCB (Front & Bottom)

BOM
- 1×
RP2040Raspberry Pi Pico or compatible clone (WeAct, Teenstar) - 2× 20-pin DIL/DIP sockets and matching headers
- 20×
1N4148signal diodes (DO-35 through-hole or SOD-123 SMD) - 20× 5-pin Cherry MX or Kailh Choc v2 switches
- 1× EC11 rotary encoder (optional)
- 1× 510 Ω resistor + 1× status indicator LED (adjust resistor value for desired LED brightness)
- 1× I²C OLED display (optional)
- 3-pin addressable LED strip (optional)
- LEGO 16×16 baseplate and perimeter bricks/tiles
Case & Assembly
- LEGO Enclosure: See the m65 Case & Thickness section.
- Soldering & Build: Follow the step-by-step Assembly Guide.
Gerbers & KiCad
Full KiCad project files and Gerbers are available in the m-lego/m20 GitLab repository, using shared symbols and footprints from m-lego/m65.
Firmware
git clone --recurse-submodules -b mlego https://github.com/alinelena/qmk_firmware.git qmk-alin
cd qmk-alin
qmk compile -kb mlego/m20/rev1 -km default
# or using make:
make mlego/m20/rev1:default
Pinout Reference
- Columns (C0–C3):
GP1,GP6,GP7,GP8 - Rows (R0–R4):
GP9,GP10,GP11,GP12,GP13 - Encoder:
Pad_A = GP4,Pad_B = GP5 - OLED (I²C):
SDA = GP2,SCL = GP3
| Indicator / RGB | Pin |
|---|---|
NUM_LOCK |
GP14 |
SCROLL_LOCK |
GP25 |
RGB_DI |
GP0 |
Build Gallery
