m48 — 4×12 Planck-Style LEGO Keyboard
Status: Tested & Verified
4×12 Ortho (48 Keys)
STM32F401 / F411 BlackPill
Rotary Encoder + RGB Strip
QMK

A compact, Planck-style 4×12 ortholinear mechanical keyboard mounted in a modular LEGO enclosure with an optional rotary encoder and addressable LED strip.
Status: Tested All OK!
* [x] Gerbers designed
* [x] Firmware
* [x] Breadboard tested
* [x] Gerbers printed
* [x] Board tested
Features
- Layout: 4×12 ortholinear (48 keys, 5-pin PCB-mount MX switches)
- Controller: WeAct
STM32F401orSTM32F411BlackPill - Peripherals: 1× EC11 rotary encoder, status LED, optional 3-pin RGB LED strip
- Firmware: QMK
3D Render & PCBs
3D Render

Printed PCB (Front & Back)

KiCad Layout

BOM
- 1× WeAct
STM32F401BlackPill with headers - 1× 40-pin DIL/DIP socket
- 48×
1N4148signal diodes (DO-35 through-hole) - 48× 5-pin Cherry MX–compatible switches
- 1× EC11 rotary encoder
- 2× 220 Ω or 350 Ω resistors (for status LEDs and boot pull-up; see m65 BOM notes)
- 1× status indicator LED
- Optional: 3-pin addressable LED strip
- LEGO 16×32 baseplate and perimeter plates/bricks
Case & Assembly
- LEGO Enclosure: See the m65 Case & Thickness section.
- Soldering & Build: Follow the step-by-step Assembly Guide.
Gerbers & KiCad
Production-ready Gerbers for JLCPCB:
Full KiCad project files are available in m-lego/m48 on GitLab. Prebuilt UF2 firmware is available at mlego_m48_rev1_default.uf2.
Firmware
git clone --recurse-submodules -b mlego https://github.com/alinelena/qmk_firmware.git qmk-alin
cd qmk-alin
qmk compile -kb m-lego/m48/rev1 -km default
# or using make:
make m-lego/m48/rev1:default
Pinout Reference
- Columns (C0–C11):
A10,A15,B3,B4,B5,B7,B6,A1,A2,A3,A4,A5 - Rows (R0–R3):
A6,A7,B0,B10 - Encoder:
Pad_A = A0,Pad_B = A8
| Indicator / RGB | Pin |
|---|---|
NUM_LOCK |
B12 |
CAPS_LOCK |
C13 |
SCROLL_LOCK |
B13 |
RGB_DI |
B15 |