m20 (5×4 Pad)

5×4 Pad 20 Keys Raspberry Pi Pico (RP2040) QMK
All Keyboards

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

M20 5x4 v1 M20 5x4 v2

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) 1N4148 diodes
  • Firmware: QMK

3D Render & PCBs

3D Render

M20 3D render

Printed PCB (Front & Bottom)

M20 PCB front M20 PCB bottom

BOM

  • 1× RP2040 Raspberry Pi Pico or compatible clone (WeAct, Teenstar)
  • 2× 20-pin DIL/DIP sockets and matching headers
  • 20× 1N4148 signal 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

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

M20 dual build M20 LEGO case M20 LEGO case angle

m20 (5×4 Pad)

Quick Specs

  • Layout: 5×4 Pad
  • Keys: 20
  • MCU: Raspberry Pi Pico (RP2040)
  • Firmware: QMK

Versatile 20-key macropad/numpad supporting 5-pin Cherry MX and Kailh Choc v2 low-profile switches, rotary encoder, and OLED.