Skip to the content
PCBKitNew board
2 layers101 × 151.3 mmMacropad pcb, the printed circuit board in 3D

Macropad pcb

nolanwon/macropad1

20 key mechanical macropad with encoders, per-key RGB, and color display

Size
101 × 151.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
71
Nets
73
Pads
368
Tracks, vias
810, 172
Pours
1
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
19 Jun 2026
Updated
24 Aug 2026

Overview

Macropad pcb is an open-source printed circuit board by nolanwon, from the nolanwon/macropad repository on GitHub, published under the MIT licence. It is a 2-layer board of 101 × 151.3 mm with 71 parts on 73 nets, routed with 810 tracks and 172 vias.

It is built around the 1N4148W and SK6812MINI-E. Its parts include 40 diodes, 3 switches, 2 ICs, 1 capacitor and 1 resistor. It belongs with the keyboards and input and lEDs and displays boards and the RP2040 boards of this library.

Main components

2

README

README.md

20 Key Macropad

A fully custom, numpad-sized mechanical macropad with a custom PCB, hand-soldered assembly, 3D-printed enclosure, and firmware written from scratch. Features a color TFT display with a full menu system, per-key RGB backlighting, dual rotary encoders, and a built-in dual-core game mode.

status


Gallery

Assembled macropad showing now playing view 2048 game

Bare PCB Display showing main menu

Images (top to bottom, L to R): Assembled macropad showing now playing view, 2048 game, Bare PCB, Display showing main menu


Overview

This is a 5×4 (20-key) macropad built end-to-end: schematic and PCB layout in KiCad, fabrication and partial assembly through JLCPCB, a 3D-printed SolidWorks enclosure, and custom C firmware on an RP2040 running on the Pico SDK and TinyUSB (no QMK), no third-party keyboard firmware.

Highlights

  • 20-key hotswappable mechanical switch matrix with per-key RGB
  • 2.4" 320×240 SPI TFT display with a full menu system and theming
  • Two rotary encoders for volume control and menu navigation
  • Two playable games (2048 and dual-core Snake) built directly into the firmware
  • Composite USB HID device (keyboard + consumer control)
  • Custom-designed PCB and enclosure, fully hand-assembled

Hardware

ComponentDetails
MCUAdafruit Feather RP2040, socketed via machine-pin strips (removable, no direct soldering)
Switches20× Cherry MX-compatible, Kailh CPG151101S11 hotswap sockets, 5×4 grid at 19.05mm pitch
LEDs20× SK6812 MINI-E per-key RGB (reverse-mount, shining up through the PCB and switch housing)
DisplayILI9341 2.4" SPI TFT, 320×240, landscape
Encoders2× EC11 rotary encoders with push-button click
PCBCustom design in KiCad, fabricated and partially assembled by JLCPCB
EnclosureSolidWorks-designed, FDM 3D printed parts: top shell, 1.5mm switch plate, removable bottom panel
FastenersM2 brass heat-set inserts and standoffs

GPIO Map (Feather RP2040)

FunctionGPIO
Key matrix: rows9, 10, 11, 12, 13
Key matrix: columns26, 27, 28, 29
Encoder 1 (top): A / B / SW6, 7, 8
Encoder 2 (bottom): A / B / SW24, 25, 0
Per-key LED data1
Display: SCK / MOSI / MISO18, 19, 20
Display: D/C / CS2, 3
Display: RESETshared with MCU reset (no dedicated GPIO)

Assembly

  • All SMD components (hotswap sockets, LEDs, diodes, passives) are assembled bottom-side by JLCPCB PCBA.
  • Through-hole parts: encoders, display header, MCU socket strips, and the tactile reset button are hand-soldered.
  • The MCU is socketed rather than soldered directly, so it can be removed and reflashed or replaced independently of the PCB.

Firmware

Written from scratch in C on the Raspberry Pi Pico SDK with TinyUSB, targeting adafruit_feather_rp2040.

Architecture

text
src/
├── macropad.c        main loop, screen/input wiring
├── matrix.c/.h        5x4 key matrix scan, per-key debounce, Fn layer
├── encoders.c/.h       dual EC11 quadrature decode + debounced click
├── usb_descriptors.c   TinyUSB composite HID descriptors
├── led/                SK6812 per-key RGB driver (PIO) + config layer
├── display/
│   ├── ili9341.c/.h     SPI display driver
│   ├── font.c/.h        hand-authored 5x7 bitmap font (full ASCII)
│   ├── render.c/.h      character/string drawing
│   ├── statusbar.c/.h   uptime clock status bar
│   ├── menu.c/.h        scrollable iPod-style menu
│   ├── theme.c/.h       color theme system
│   └── screen.c/.h      screen manager / state machine
└── game/
    ├── game2048.c/.h     single-core, turn-based 2048
    ├── game_snake.c/.h   dual-core, real-time Snake
    └── game_select.c/.h  scrollable game-select menu

USB

Enumerates as a composite HID device with two report IDs: a standard keyboard report and a consumer-control report (used for volume via the top encoder). No USB serial/stdio, the display serves as the primary feedback and debug surface.

Display & UI

  • Custom screen-manager state machine: each screen exposes init / draw / on_encoder / on_click / on_leave function pointers, switched via screen_switch_to() and unwound with a context-aware screen_manager_go_back().
  • iPod-style scrollable main menu leading to About, LED Settings, Display Settings, Now Playing, and Game Mode.
  • Fully hand-authored 5×7 bitmap font (digits, punctuation, and full upper/lowercase alphabet) with no external font library, for licensing cleanliness.
  • Theme system with multiple presets (including a Catppuccin Mocha theme) and a global invert flag; every screen pulls its colors from the active theme.
  • Status bar shows device uptime and is suppressed during full-screen game modes.

Per-key RGB

Driven over a single GPIO via PIO, with a decoupled led_config layer (power, brightness, hue/saturation/lightness, live HSL→RGB preview) exposed through the LED Settings screen.

Game Mode

A dedicated key combination suspends normal HID output and hands key events to the active game instead:

  • 2048: turn-based, single-core, mapped to the physical numpad directional legends.
  • Snake: real-time, dual-core: Core 1 owns the display exclusively during gameplay and does incremental cell-level rendering, while Core 0 forwards input over multicore_fifo. A blocking start/stop handshake between the cores guarantees clean handoff of the SPI bus with no display corruption on exit.

The game-select screen is a scrollable list, built to accept additional games beyond the two included.


Building the Firmware

Prerequisites

  • VS Code with the Raspberry Pi Pico extension (installs the SDK, ARM GCC toolchain, CMake, and Ninja)
  • Pico SDK with the TinyUSB submodule initialized (lib/tinyusb)

Steps

bash
git clone https://github.com/nolanwon/macropad.git
cd macropad
# open in VS Code with the Raspberry Pi Pico extension, or:
mkdir build && cd build
cmake -DPICO_BOARD=adafruit_feather_rp2040 ..
ninja

Flash the resulting macropad.uf2 by holding BOOT while plugging in the Feather (or double-tapping reset), then copying the .uf2 to the mass-storage device that appears.

Note: avoid building from a path containing spaces or parentheses, and avoid OneDrive/Dropbox-synced folders since both are known to cause build issues with this toolchain.

Parts

71
QtyValueFootprintReferences
201N4148WDiode_SMD:D_SOD-123D1, D2, D3, D4, D5, D10, D11, D12, D13, D14, D15, D16, D17, D18, D19, D20 +4
20MX_SW_HSPCM_marbastlib-mx:SW_MX_HS_CPG151101S11_1uMX1, MX2, MX3, MX4, MX5, MX10, MX11, MX12, MX13, MX14, MX15, MX16, MX17, MX18, MX19, MX20 +4
20SK6812MINI-ELED_SMD:LED_SK6812MINI-E_3.2x2.8mm_P1.5mm_ReverseMountD21, D22, D23, D24, D25, D26, D27, D28, D29, D30, D31, D32, D33, D34, D35, D36 +4
4, , ,
2RotaryEncoder_SwitchRotary_Encoder:RotaryEncoder_Alps_EC11E-Switch_Vertical_H20mmSW1, SW2
1100nFCapacitor_SMD:C_0603_1608MetricC1
1330Resistor_SMD:R_0603_1608MetricR1
1Adafruit-Feather-RP2040PCM_marbastlib-various:Adafruit-Feather-RP2040U2
1CR2013-MI2120Connector_PinSocket_2.54mm:PinSocket_1x14_P2.54mm_VerticalU1
1SW_ResetButton_Switch_THT:SW_PUSH_6mmSW3

Questions

How big is the Macropad pcb PCB?

It measures 101 × 151.3 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Macropad pcb use?

71 parts, built around the 1N4148W and SK6812MINI-E. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Macropad pcb KiCad files?

From the nolanwon/macropad repository on GitHub, at the commit this page was made from: the board is kicad/macropad_pcb/macropad_pcb.kicad_pcb and its schematic kicad/macropad_pcb/macropad_pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Macropad pcb design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

Similar boards

  • 2 layers99.1 × 90.7 mmBgkeeb, the printed circuit board in 3D

    Bgkeeb

    sadekbaroudi/bgkeeb

    This is a reversible 100mm x 100mm pcb with support for mx or choc switches (no hotswap), per key led, rotary encoders, and exposes the SDA/SCL/GND/VCC lines in the form of the pimoroni trackball pins (meaning you can…

    108 parts108
  • 2 layers291.8 × 134.6 mmMegaXE keyboard, the printed circuit board in 3D

    MegaXE keyboard

    bleroy/3d-junkyard

    Random 3D models

    359 parts69
  • 2 layers243.9 × 136.5 mmBarobord, the printed circuit board in 3D

    Barobord

    sadekbaroudi/barobord

    I have spent a lot of time and money designing prototypes, testing, developing, etc. Any contributions would be greatly appreciated!

    157 parts57
  • 2 layers227.3 × 84.9 mmStm32 hotswap chiffre, the printed circuit board in 3D

    Stm32 hotswap chiffre

    sporkus/le_chiffre_keyboard_stm32

    Le Chiffre keyboard pcb with stm32F072

    110 parts53CERN-OHL-W-2.0
  • 2 layers43.5 × 33.9 mmAdapter, the printed circuit board in 3D

    Adapter

    Bastardkb/Charybdis-EC11

    EC11 PCB to be used in place of the trackball in the Charybdis keyboard.

    26 parts24
  • 2 layers142.6 × 120 mmUrsula, the printed circuit board in 3D

    Ursula

    jimmerricks/ursula

    124 parts21
  • 2 layers100 × 95.3 mmDaNumPad Glow 20, the printed circuit board in 3D

    DaNumPad Glow 20

    TweetyDaBird/DaNumPad

    A Numpad

    117 parts19
  • 2 layers289.7 × 109.1 mmWlfkbd, the printed circuit board in 3D

    Wlfkbd

    WillACosta/wlfkbd

    The WLF is a 40-key split keyboard (20 keys per half) with a column-staggered matrix and a splayed thumb cluster.

    214 parts19MIT