Sunday 3 March 2024

MIDI Footswitch

Andy has a Line6 Bass Pod and needs to control it with his feet. He needs to be able to turn on and off three different effects. The official Line6 footswitch is no longer available but the features can be controlled via MIDI, so we need a box with footswitches that send the appropriate MIDI Control Change messages. I started with a 3D model to help with visualising where the switches should be. Having them in-line across the front of the box increases the risk of hitting switches 1 or 3 when aiming for 2, hence the offset approach.



In previous projects I used some kind of Arduino, but I fancied trying CircuitPython for this project. This has the advantage of the code being stored on the module, allowing anyone to modify it without the faff of toolchains and the relative complexity of C++.

Some requirements to start with:
  • It needs to be powered from Andy's existing 9V daisy chain.
  • The MIDI cable should be captive so the cable can't become separated from the footswitch, and to simplify setup.
  • Each footswitch has a corresponding LED.
  • It must be mechanically robust.
I happened to have a Seeed Studio XIAO RP2040, so the design is based on that. I considered hacking it together on Veroboard, but the ridiculously low cost of PCBs from JLC PCB made a custom PCB too tempting. It also makes it easy to allow for five switches and LEDs in case that's needed in a future project.

The schematic:


The XIAO can only handle 5V. The current requirement is only tens of milliamps so an old-fashioned voltage regulator is fine. Here's the final layout:


And KiCad's 3D view:


The box needs some holes:



The PCBs took about about three weeks to arrive:


Assembly:



Putting it all together:



Fully assembled:




The code is available on github.