Simple To Build Programmable Foot Switches


Your hands do a lot of work between the keyboard and the mouse, why the heck are you letting your feet be so lazy? [Dossier van D.] is putting an end to the podiatric sloth. He built this set of three foot pedals which have gone through two versions of functionality.

The buttons themselves are made from a base plate of plywood with a smaller piece on top for each ‘key’. The two parts are separated with some foam carpet pad, with a tactile push button in between to register a click. The only thing we’d change about this is adding a couple of wooden spacers next to the switch so that accidentally sanding on a button doesn’t break that electronic component.

Originally each button was soldered to a gaming controller. This worked just fine using button mapping, but recently [Dossier] made the switch to using an Arduino Leonardo. This is a perfect choice. Unlike input devices made with older Arduino versions the Leonardo board can natively register as a keyboard, making it a snap to programmatically map any key to the switches.

If you like this project you should check out [Dossier’s] foot mouse as well.

19 thoughts on “Simple To Build Programmable Foot Switches

    1. Thanks for the link.
      But I don’t know where I can buy footpedals like that.

      Your footpedals are very like my footswitches.
      The advantage of my code is that the code is programmable. I use the virtual serial port of the Arduino Leonardo to set the keyboard and/or mouse click into the Arduino Leonardo. I wanted to change the keyboard code easily.
      Since the teensy uses a ATmega32U4, you should be able to use my code.

      1. I’ve thought about making it configurable, either through the serial port upon boot-up, or by making a program that edited the c file and and ran winavr and such to create the hex and ran the teensy loader. Either way, it was some work and didn’t feel a rush to do so.

        Another more intriguing way for me, is to make it act like a gamepad versus a keyboard. Then you should have no conflicts with current binds. There doesn’t seem to be a wealth of information on implementing the gamepad HID though so I haven’t looked too thoroughly.

        As for footswitches, Sparkfun has some metal ones for like $5. MPJA also has some nice metal ones for pretty cheap.

  1. They sell a usb 2 unit footswitch for backspace and space. Seen it in some catalog.
    Try and play piano without a sustain pedal! Those little tack sized switches will not hold up well. Maybe old mice clickers. There needs to be pre and post closure slop.

  2. There are many ways to make footswitches.

    Does anyone know if my footswitches are the first DIY footswitches which can be programmed (without the need to reprogram the Arduino Leonardo). Even without configuration software, since the virtual serial port is used. So it is OS independent, and keyboard codes or mouse click can be easily be changed for every task.

        1. Two suggested improvements… make some stops the depth of the switch body and put them at the bottom corner of each pedal, to prevent twisting and relieve the switch body from undue mechanical stress. and secondly, harden the area where the switch touches, it will knock a dimple there over time and fail to activate. You can spread epoxy on it, or glue a small hard plastic or metal plate there.

          I guess I’m not hyper enthusiastic about it, because although it’s a cool learning thing to do with the arduino and not all that trivial to achieve, I’ve got USB/gameport footpedals that I can find drivers which hook keyboard input and assign keys for most OSes, so could use them in a similar fashion if I needed to.

    1. Looking forward to the first kneeling chair equipped with footrests and bike pedals… although according to the Unwritten Rule of the Internet, if I can think of it somebody already made it, and somebody else has already come up with something much better…

  3. I thought that the Teensy COULD natively register as a keyboard. At least that is the impression I got from Paul (of when I was talking to him last about something very similar to this. Am I wrong?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.