Skip to the content
2 layers87.7 × 51.5 mmKeyboard leds, the printed circuit board in 3D

A custom PCB for reading MIDI output from a keyboard and lighting the respective LEDs.

Size
87.7 × 51.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
55
Nets
77
Pads
273
Tracks, vias
541, 53
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
19 Dec 2025
Updated
21 May 2026

Overview

Keyboard leds is an open-source printed circuit board by modern-hobbyist, from the modern-hobbyist/keyboard-leds repository on GitHub. It is a 2-layer board of 87.7 × 51.5 mm with 55 parts on 77 nets, routed with 541 tracks and 53 vias.

It is built around the RP2040, W25Q128JVSIQ and SN74AHCT1G125DBVR(UMW), with the SRV05-4 and TPS2121RUXT among its other parts. Its parts include 24 capacitors, 14 resistors, 8 ICs, 4 connectors and 2 fuses. It belongs with the keyboards and input and lEDs and displays boards and the RP2040 boards of this library.

Main components

5

README

README.md

🎹 Piano Keyboard LED Visualizer (WIP)

This project is a custom RP2040-based LED controller designed to add reactive RGB lighting to a piano or MIDI keyboard by reading the incoming MIDI stream and driving high-density LED strips.

This is my second iteration of MIDI-driven keyboard LEDs, but the first time going all in with a fully custom PCB, power-path management, and an onboard touchscreen UI.

⚠️ Status: Work in progress
Hardware is under active development, firmware and features are evolving, and this README will be updated as the project matures.


✨ High-Level Overview

  • Reads MIDI input from a keyboard or computer
  • Visualizes notes and velocity using addressable RGB LEDs
  • Includes a touchscreen UI for configuring colors, brightness, and animations
  • Designed to safely handle high LED current while remaining USB-compliant when connected to a computer

The long-term goal is to make this a flexible platform for experimenting with different LED visualization styles while keeping the hardware robust and reusable.


🔧 Hardware Overview

Core Components

  • MCU: RP2040
  • External Flash: Winbond W25Q128JVS (16 MB)
  • Display: 2.8″ 320×240 TFT LCD with touch
  • LED Support:
    • Designed for ~1–1.5 m of 144 px/m LED strips
    • Intended for per-key piano illumination

USB & Power Architecture

  • USB-C (Data / MIDI / Firmware Flashing)
  • USB-C (Dedicated LED Power Input)
  • TPS2121 – automatic power-path switching between USB sources
  • TUSB320 – USB-C CC controller used to determine available current
  • Polyfuses on both USB inputs for protection

The board is designed to intelligently decide how much LED brightness is safe depending on the power source.


🎯 Design Goals

  • Dual-mode operation
    • Plugged into a computer → automatically limit LED current to stay within USB limits (~500 mA)
    • Plugged into a keyboard’s MIDI output + external USB-C PSU → allow much higher LED brightness (~3 A target)
  • Touchscreen UI
    • Adjust brightness, colors, and animations
    • Switch visualization modes without a computer
  • High LED density support
    • Enough bandwidth and power to drive dense LED strips cleanly
  • Expandable firmware
    • External flash provides room for animations, fonts, and UI assets

Exact feature set is still evolving — the focus right now is getting the hardware and power logic correct.


📌 GPIO Pin Map

SPI Bus — ILI9341 Display + XPT2046 Touch (shared)

GPIONetFunction
16LCD_MISOSPI MISO
18LCD_SCKSPI clock
19LCD_MOSISPI MOSI
17LCD_CSILI9341 chip select
20LCD_DCILI9341 data/command
21LCD_RSTILI9341 reset
22LCD_BL_PWMBacklight PWM
13LCD_T_CSXPT2046 touch chip select
12LCD_T_IRQXPT2046 touch interrupt
14LCD_SD_CSSD card chip select (LCD module)

I2C Bus — Power Management ICs

GPIONetFunction
4SDAI2C data (TUSB320)
5SCLI2C clock (TUSB320)

LEDs & Power Control

GPIONetFunction
6RGB3.3SK6812 data → level shifter → 5 V strip
3DIM_DATATPS2121 dimming/current limit control
8POWER_INTInterrupt from power management IC

USB

SignalFunction
USB D+ / D−Data USB-C — MIDI host + firmware flashing

QSPI Flash

Managed automatically by MicroPython. Connected to the W25Q128JVS via the RP2040's dedicated QSPI pins (not accessible as general GPIO).


🧠 Firmware

MicroPython firmware is included in the firmware/ directory. See firmware/README.md for full setup and flashing instructions.

Features:

  • USB MIDI host — keyboard plugs directly into the data USB-C port
  • SK6812 LED animations: velocity, rainbow, sustain, single color, gradient
  • ILI9341 touchscreen UI with scrollable settings menu
  • Persistent settings saved to flash (brightness, animation mode, MIDI channel, LED count, etc.)
  • Brightness limiting via TPS2121 DIM_DATA line based on available power

Requirements: MicroPython ≥ 1.24 for RP2040 with usb.host support.


🧩 PCB Review Context

This board uses a few parts that are new to me, particularly for USB-C and power management:

  • TUSB320 – for USB-C current detection
  • TPS2121 – for seamless power-path switching

While I’ve built multiple custom mechanical keyboards, this is my first design combining:

  • Dual USB-C inputs
  • High LED current
  • USB-compliant behavior
  • Onboard display + touch

Feedback on power logic, USB-C usage, and general robustness is especially appreciated.


📦 Bill of Materials (BOM)

A complete BOM is included in the repo and reflects the current PCB revision.
Key highlights:

  • RP2040 MCU
  • W25Q128JVS external flash
  • TPS2121 power mux
  • TUSB320 USB-C controller
  • SRV05-4 ESD protection
  • TFT LCD (ILI9341-based)

⚠️ Component values and footprints may change as the design is reviewed and iterated.


📸 Media & Updates

I plan to document this project on my YouTube channel, Modern Hobbyist, including:

  • PCB bring-up
  • Power testing
  • LED current experiments
  • Firmware development

Links will be added as videos are published.


🤝 Feedback & Contributions

This repo is currently focused on design review and learning, but feedback is very welcome.

If you have experience with:

  • USB-C power negotiation
  • LED power distribution
  • RP2040 display pipelines
  • MIDI-driven lighting

…I’d love to hear your thoughts.


📄 License

TBD (will be added once the design stabilizes)

Parts

55
QtyValueFootprintReferences
8100nCapacitor_SMD:C_0402_1005MetricC7, C10, C11, C12, C13, C14, C15, C16
75.1kResistor_SMD:R_0402_1005MetricR1, R2, R3, R4, R5, R10, R11
3100nFCapacitor_SMD:C_0402_1005MetricC17, C18, C129
31uCapacitor_SMD:C_0402_1005MetricC5, C6, C9
3330uCapacitor_Tantalum_SMD:CP_EIA-7343-31_Kemet-DC1, C19, C20
21kResistor_SMD:R_0402_1005MetricR6, R7
21uFCapacitor_SMD:C_0402_1005MetricC127, C128
222pCapacitor_SMD:C_0402_1005MetricC3, C4
227Resistor_SMD:R_0402_1005MetricR8, R9
23.0A 1206 PolyfuseFuse:Fuse_1206_3216MetricF1, F2
2SW_PushButton_Switch_SMD:SW_SPST_TL3342BOOT1, RST1
2USB_C_Receptacle_USB2.0_16PModHob:USB_C_Receptacle_HRO_TYPE-C-31-M-12J1, J5
10.1uCapacitor_SMD:C_0603_1608MetricC2
10.1uFCapacitor_SMD:C_0402_1005MetricC112
110kResistor_SMD:R_0402_1005MetricR14
110uCapacitor_SMD:C_0603_1608MetricC8
130kResistor_SMD:R_0402_1005MetricR13
1665Resistor_SMD:R_0402_1005MetricR12
1Conn_01x03Connector_JST:JST_XH_S3B-XH-A-1_1x03_P2.50mm_HorizontalJ4
1Conn_01x05Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ2
1Crystal_GND24Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY1
1RP2040Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mmU1
1SN74AHCT1G125DBVRSN74AHCT1G125DBVR:SOT95P280X145-5NU6
1SRV05-4PCM_marbastlib-various:SOT-23-6-routableU7
1TFT_320x240ModHob:ILI9341_2.8in_TouchU4
1TPS2121RUXTTPS2121RUXT:RUX0012AU8
1TUSB320Package_DFN_QFN:Texas_X2QFN-12_1.6x1.6mm_P0.4mmU5
1W25Q128JVSKeebio-Parts.pretty-master:SOIC-8_5.23x5.23mm_P1.27mmU2
1XC6206PxxxMR-Regulator_LinearPackage_TO_SOT_SMD:SOT-23U3

Similar boards

  • 4 layers52 × 51 mmDARPA MCTR, the printed circuit board in 3D

    DARPA MCTR

    Alsa2/ThumbMuncher

    Darpa Lift Challenge Code Repo

    100 parts
  • 4 layers68.6 × 53.3 mmPhyduino pico, the printed circuit board in 3D

    Phyduino pico

    UofTPhyEssSW/Student-Workshop-Course-L1

    University of Toronto, Dept. of Physics, Electronic Support Services - Student Workshop Course L1 course files

    130 parts2
  • 4 layers68.6 × 53.3 mmPhyduino pico, the printed circuit board in 3D

    Phyduino pico

    perc-sw/phyduino_pico

    CAD files for the student workshop Phyduino Pico Arduino IDE compatible board.

    129 partsGPL-3.0
  • 6 layers90 × 90 mmCodex micro wired revA route nognd, the printed circuit board in 3D

    Codex micro wired revA route nognd

    slopus/codex-keybored

    A 100% vibe-coded hardware build: Fusion 360, six-layer KiCad PCB, STM32 firmware, and live JLC factory handoff.

    97 parts10
  • 2 layersKeyboard, the printed circuit board in 3D

    Keyboard

    joshajohnson/keyboard-template

    A starting point for all my RP2040 based boards.

    53 parts
  • 2 layers63.5 × 58 mmLatest, the printed circuit board in 3D

    Latest

    minipadKB/minipad

    The PCB and case files for the minipad, an RP2040-based 2-3-key keypad for the rhythm game osu!.

    39 parts52GPL-3.0
  • 2 layers224.4 × 97.8 mmKnobdeavour, the printed circuit board in 3D

    Knobdeavour

    ScatteredDrifter/Buran-Ortho

    A 39-key orthogonal keyboard with support for two knobs, based on a rp2040

    105 parts46
  • 2 layers253.3 × 113.3 mmCut slope, the printed circuit board in 3D

    Cut slope

    hazels-garage/cut-slope

    119 parts29

Questions

How big is the Keyboard leds PCB?

It measures 87.7 × 51.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Keyboard leds use?

55 parts, built around the RP2040, W25Q128JVSIQ, SN74AHCT1G125DBVR(UMW) and SRV05-4. 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 Keyboard leds KiCad files?

From the modern-hobbyist/keyboard-leds repository on GitHub, at the commit this page was made from: the board is keyboard-leds.kicad_pcb and its schematic keyboard-leds.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Keyboard leds design in my own project?

Its repository states no licence, so its author keeps all rights: ask modern-hobbyist before reusing the design.