Project Overview
This project is a fully custom-designed MIDI keyboard, developed end-to-end by designing, fabricating, assembling, and testing a multi-layer PCB. The keyboard uses a microcontroller-based key scanning system and communicates MIDI signals over USB, allowing seamless integration with digital audio workstations (DAWs) and music production software.
Key Functions
Sensing: Detects which keys are pressed using 4 x 6 key matrix connected to ESP32
Compute: The ESP32-S2-SOLO-N4 processed key inputs and encodes them as MIDI messages
Power Management: The USB-C input powers the system, while the voltage regulator steps down from 5V to 3.3V for stable MCU operation
Output: Sends real-time MIDI signals to a computer or synthesizer for sound generation
Block Diagram
Components
Mechanical key switch
Tactile switch used for velocity (time-difference) detection
Sufficient GPIO pins for key matrix scanning
Native USB-MIDI support
Low-power, cost-effective microcontroller
Efficient and clean power delivery
Provides stable 3.3V supply for MCU and peripherals
Component details
BOM(Bill of Materials)
Schematics
USB-C & LED
ESP32
Voltage Regulator
Mechanical Switch Matrix
Tact Switch Matrix
Layout & Board Dimensions
Key Matrix
Microcontroller and Power Input
Board Dimensions: 5.12 * 4.65 inches
Full Layout (Front + Back)
Front Layer
Back Layer
Microcontroller and Power Input Section
The ESP32-S2-SOLO-N4 microcontroller is the core processing unit that scans the key matrix and handles MIDI signal generation.
The USB-C connector provides both power and communication with the computer.
A voltage regulator (5V → 3.3V) ensures stable power for the ESP32 and logic-level components
Key Matrix Section
The 4×6 key matrix consists of 24 keys (switches S1–S24), each connected through row and column traces for efficient scanning.
This layout reduces the number of GPIO pins needed by allowing the ESP32 to detect key presses through row-column combinations instead of individual wires.
Each key is associated with a diode to prevent ghosting and ensure accurate key detection when multiple keys are pressed simultaneously.
The layout is optimized for signal integrity and short trace lengths, minimizing electrical noise in the keyboard circuit.
This PCB integrates compute, sensing, and power management in a single compact design for a functional MIDI keyboard prototype.
Physical Board
Front
Back
Wicki-Hayden Layout
Ease of Use: Layout keeps all different chord types in the same hand pattern, allowing the user to more easily compose their music