
Keyboard leds
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
5RP2040
LQFN-56(7x7)12bit 133MHz 30 LQFN-56(7x7) Microcontrollers (MCU/MPU/SOC) ROHSRaspberry PiMicrocontrollers (MCU/MPU/SOC)W25Q128JVSIQ
SOIC-8-208mil-40℃~+85℃ 100,000 cycles 120ms@(32KB) 128Mbit 133MHz 1uA 2.7V~3.6V 20 Years 3ms Power-on reset、Hardware write protection、Software write protection、Write enable latch、Absolute write protection SPI SOIC-8-208mil NOR FLASH ROHSWinbondNOR FLASHSN74AHCT1G125DBVR(UMW)
SOT-23-5-40℃~+125℃ 1 1 10uA 12ns@5V,50pF 2V 3.8V、4.4V 4.5V~5.5V 440mV 74AHCT 800mV 8mA 8mA SOT-23-5 Logic Gates ROHSUMWLogic GatesSRV05-4
SOT-23-6L-55℃~+150℃ 15V 1pF 4A 5V 5uA 6V 80W ESD Four channels IEC 61000-4-2、IEC 61000-4-5 Unidirectional SOT-23-6L ESD and Surge Protection (TVS/ESD) ROHShongjiachengESD And Surge Protection (TVS/ESD)TPS2121RUXT
VQFN-HR-12(2x2.5)-40℃~+125℃@(TJ) 2 2.8V~22V 25uA VQFN-HR-12(2x2.5) Supervisor and Reset ICs ROHSTexas InstrumentsSupervisor And Reset ICs
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)
| GPIO | Net | Function |
|---|---|---|
| 16 | LCD_MISO | SPI MISO |
| 18 | LCD_SCK | SPI clock |
| 19 | LCD_MOSI | SPI MOSI |
| 17 | LCD_CS | ILI9341 chip select |
| 20 | LCD_DC | ILI9341 data/command |
| 21 | LCD_RST | ILI9341 reset |
| 22 | LCD_BL_PWM | Backlight PWM |
| 13 | LCD_T_CS | XPT2046 touch chip select |
| 12 | LCD_T_IRQ | XPT2046 touch interrupt |
| 14 | LCD_SD_CS | SD card chip select (LCD module) |
I2C Bus — Power Management ICs
| GPIO | Net | Function |
|---|---|---|
| 4 | SDA | I2C data (TUSB320) |
| 5 | SCL | I2C clock (TUSB320) |
LEDs & Power Control
| GPIO | Net | Function |
|---|---|---|
| 6 | RGB3.3 | SK6812 data → level shifter → 5 V strip |
| 3 | DIM_DATA | TPS2121 dimming/current limit control |
| 8 | POWER_INT | Interrupt from power management IC |
USB
| Signal | Function |
|---|---|
| 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_DATAline 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| Qty | Value | Footprint | References |
|---|---|---|---|
| 8 | 100n | Capacitor_SMD:C_0402_1005Metric | C7, C10, C11, C12, C13, C14, C15, C16 |
| 7 | 5.1k | Resistor_SMD:R_0402_1005Metric | R1, R2, R3, R4, R5, R10, R11 |
| 3 | 100nF | Capacitor_SMD:C_0402_1005Metric | C17, C18, C129 |
| 3 | 1u | Capacitor_SMD:C_0402_1005Metric | C5, C6, C9 |
| 3 | 330u | Capacitor_Tantalum_SMD:CP_EIA-7343-31_Kemet-D | C1, C19, C20 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric | R6, R7 |
| 2 | 1uF | Capacitor_SMD:C_0402_1005Metric | C127, C128 |
| 2 | 22p | Capacitor_SMD:C_0402_1005Metric | C3, C4 |
| 2 | 27 | Resistor_SMD:R_0402_1005Metric | R8, R9 |
| 2 | 3.0A 1206 Polyfuse | Fuse:Fuse_1206_3216Metric | F1, F2 |
| 2 | SW_Push | Button_Switch_SMD:SW_SPST_TL3342 | BOOT1, RST1 |
| 2 | USB_C_Receptacle_USB2.0_16P | ModHob:USB_C_Receptacle_HRO_TYPE-C-31-M-12 | J1, J5 |
| 1 | 0.1u | Capacitor_SMD:C_0603_1608Metric | C2 |
| 1 | 0.1uF | Capacitor_SMD:C_0402_1005Metric | C112 |
| 1 | 10k | Resistor_SMD:R_0402_1005Metric | R14 |
| 1 | 10u | Capacitor_SMD:C_0603_1608Metric | C8 |
| 1 | 30k | Resistor_SMD:R_0402_1005Metric | R13 |
| 1 | 665 | Resistor_SMD:R_0402_1005Metric | R12 |
| 1 | Conn_01x03 | Connector_JST:JST_XH_S3B-XH-A-1_1x03_P2.50mm_Horizontal | J4 |
| 1 | Conn_01x05 | Connector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_Vertical | J2 |
| 1 | Crystal_GND24 | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y1 |
| 1 | RP2040 | Package_DFN_QFN:QFN-56-1EP_7x7mm_P0.4mm_EP3.2x3.2mm | U1 |
| 1 | SN74AHCT1G125DBVR | SN74AHCT1G125DBVR:SOT95P280X145-5N | U6 |
| 1 | SRV05-4 | PCM_marbastlib-various:SOT-23-6-routable | U7 |
| 1 | TFT_320x240 | ModHob:ILI9341_2.8in_Touch | U4 |
| 1 | TPS2121RUXT | TPS2121RUXT:RUX0012A | U8 |
| 1 | TUSB320 | Package_DFN_QFN:Texas_X2QFN-12_1.6x1.6mm_P0.4mm | U5 |
| 1 | W25Q128JVS | Keebio-Parts.pretty-master:SOIC-8_5.23x5.23mm_P1.27mm | U2 |
| 1 | XC6206PxxxMR-Regulator_Linear | Package_TO_SOT_SMD:SOT-23 | U3 |
Similar boards
- 4 layers52 × 51 mm

- 4 layers68.6 × 53.3 mm

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 mm

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 mm

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 layers

- 2 layers63.5 × 58 mm

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 mm

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 mm

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.