Making Connections: Building a USB Footswitch

    The concept is simple: replace a few of the keys on a USB keypad with heavy duty footswitches. Then use the select function in Max to direct these switches to control your patch.
    Disclaimer: This tutorial assumes basic familiarity with electronics and the use of soldering tools. Cycling '74 assumes no responsibility for damages to your keypad or any other device in following this tutorial.
    As a guitarist, I was looking for a simple hands-free controller for Max. Rather than buy an expensive pedalboard and MIDI interface, I decided to build a simple USB footswitch. It’s ridiculously easy to make and costs less than fifty bucks.
    Here are the parts you will need:
    • USB keypad (a keyboard can work too, but is slightly more difficult to wire up---more non-ASCII key functions)
    • momentary on switches (you will find these labeled “off-(on)”)
    • fine wire
    • a box (I used a project box from the local electronics shop)
    and the tools:
    • a soldering iron and solder
    • a small screwdriver
    • wire strippers
    First open the USB keypad. Each brand is designed a little differently, but most of them are held together with tiny screws. Some brands hide these under rubber feet or stickers. Don’t worry if you have to crack the plastic shell (it gets discarded), just be careful not to damage the circuit board itself.
    Inside the enclosure, you will find a folded plastic sheet with wiring embedded in it. The keys press against this to complete a circuit. This sheet is connected to a terminal on the circuit board. Gently remove it from the terminal.
    Trace the circuit on the plastic sheet to figure to see which two leads produce a desired character. Since this is a matrix, each lead is used for multiple characters so jumpers may be required. If you don’t particularly care which characters the buttons produce (we are, after all, going to be using select to filter this input data) you can skip this step. Just check each pair before you solder to make sure you don’t get results outside of the standard ASCII codes (i.e. num lock or “000”). If you want to specify the character output of each button, simply trace the circuit on the plastic sheet
    Solder wires onto the terminal. There isn’t a lot of space, so you’ll probably want to use some fairly fine wire. To keep things neat, I used an old printer ribbon cable.
    Drill holes in the box and mount the switches. Make sure to tighten them all the way. Then connect the wires, but don’t solder them just yet.
    Run the test patch. As you press each button, its ASCII number will be displayed in the number box. Once you verify the ASCII numbers for each button, input these values as arguments to the select operator. In this example patch I ran each outlet of the select operator to an oversized bang as a simple display.
    Once you have verified that the desired characters are produced, solder wires to the buttons.
    Essentially this is just a cheap and easy way to connect momentary switches to your computer via USB. This same principle can be used with other types of momentary switches---percussion triggers, tilt switches or even some types of light sensors. Non-momentary switches can be used too; they will output continuous streams of repeated keystrokes. Use the change operator if you want to make these switches behave like momentary switches.
    This same footswitch could also be built using a wireless keypad. How could this change the usability of the footswitch?
    If you wire one of the switches to num lock, you can in effect double the number of keystrokes available to you while using the same number of switches. If you plan to do this, you may want to use a keypad that has an LED num lock indicator. If it is difficult to mount the circuit board in such a way that the LED is visible on the footswitch, consider replacing the LED with one with longer leads.

    • Jan 05 2010 | 5:34 pm
      You have done a great job with this. I greatly appreciate such a fine and useful piece of work. Thanks very much indeed. Kind Wishes from Ireland, ATB, Trigger
    • Feb 15 2011 | 5:06 pm
      This was incredibly helpful. Thank you.
    • Feb 16 2011 | 6:13 pm
      How would add LED's to each switch? I need to know when the button is engaged (for use with latching buttons)
    • Apr 18 2012 | 1:46 pm
      thanks for this!
    • Sep 03 2012 | 3:13 pm
      Thanks for this, it got me started on my own pedal but I just couldn't seem to get it working with this method, however a friend and myself managed to get it working with an arduino.
      May help others.
    • Sep 04 2012 | 7:21 am
      You could use DPDT momentary switches that could also trigger LEDSs to light up for each individual switch. It's pretty easy to set up since USB has +5v. Just run a wire from the +5v to the momentary section of each switch. Then to the positive end of an LED (usually the longer lead). Make sure you do your LED resistor math using one of the many popular online calculators. Then connect the negative lead of the LED to ground and you're good to go.
      The cheapest place to get SPST, DPDT and 3PDT footswitches is from They've got momentary and latched versions of everything. eBay is pretty good for LEDs but can take a while. You can go to your local hardware store and use electrical junction boxes for enclosures if you're a cheapskate. They're difficult to work with but they cost like $2. O
    • Oct 05 2014 | 6:31 pm
      Help Board.
      What programs, soft install for NUMPAD?
      Thank you.
    • Mar 24 2017 | 7:08 am
      thanks for this material. is very usefull...