Back to projects

ESP32-S3 MIDI Pedalboard

Aluminum pedalboard with five footswitches and status LEDs
The assembled pedalboard: five footswitches with a status LED for each
Aluminum enclosure drilled with five holes
Enclosure drilled for the footswitches
ESP32-S3 board next to a perfboard
ESP32-S3 DevKitC-1 and the perfboard carrier
Perfboard with female headers soldered on
Perfboard with headers for the ESP32-S3
ESP32-S3 mounted on the perfboard
ESP32-S3 mounted on the carrier
BoardESP32-S3 DevKitC-1 (N16R8)
Inputs5 footswitches, 5 status LEDs
ConnectionUSB MIDI (class compliant, no drivers)
FirmwareC++, Arduino on PlatformIO, TinyUSB
DesignEnclosure drawing, KiCad schematic

Overview

A five-switch foot controller for playing guitar with a computer. It plugs in over USB and shows up as a MIDI device called "MIDI Pedalboard" in Windows and in a DAW, so each footswitch can control recording, playback, or effects without taking my hands off the guitar.

Hardware

The controller is built around an ESP32-S3, which has native USB. Each footswitch pulls a GPIO pin to 3.3 V using the chip's internal pull-downs, and each has an LED with a 220 Ω resistor to show whether it is on. I drew up the enclosure in millimetres, including the hole sizes for the footswitches, and built it in an aluminum box with the board on a removable perfboard carrier.

Firmware

The firmware uses the TinyUSB stack built into the ESP32 core with a custom USB MIDI descriptor, so no external libraries are needed. Each switch works as a latch: a press toggles it on or off, sends a Control Change message (CC 20–24 on channel 1, value 127 or 0), and updates its LED. Presses are debounced at 50 ms. Because the board only needs to read switches, I dropped the CPU to 40 MHz and turned off Wi-Fi and Bluetooth.

Using It

In Waveform Free I used MIDI learn to map the switches to transport controls. I also mapped one switch to the space bar with MidiKey2Key, so it can start and stop playback in any program.

Next Steps

The schematic is done in KiCad and I have started laying out a custom PCB to replace the perfboard.

Back to projects