With its copious number of GPIO pins and native USB, the Raspberry Pi Pico is arguably the ideal microcontroller for developing your own platform agnostic USB Human Input Devices. But you don’t have to take our word for it. Check out how quickly the $4 USD board allowed [Alberto Nunez] to put together a pair of foot pedals for his computer.
A peek inside the enclosure reveals…well, not a whole lot. All that’s hiding inside that heavy-duty plastic box is the Pi Pico and some screw down terminals that let [Alberto] easily wire up the female bulkhead connectors for the pedals themselves. Incidentally, while you could certainly make your own pedals, the ones used for this project appear to be the sort of commercially available units we’ve seen used in similar projects.
With the hardware sorted, [Alberto] just needed to write the software. While he could have taken the easy way out and hard coded everything, we appreciate that his CircuitPython script loads its configuration from a text file. This allows you to easily configure which GPIO pins are hooked up to buttons, and what key codes to associate them with. He didn’t really need to go through this much effort for his own purposes, but it makes the project far easier to adapt for others, so our hats off to him.
If you’re looking for a bit more inspiration, our very own [Kristina Panos] put together a Python-powered macro foot stool that you can put under your desk for rapid fire keyboard shortcuts. Plus you can stand on it to reach the top shelf, if need be.
How much force does it take to actually activate those foot pedals? My guess is not something ergonomic at all! Really like the idea here but it’s really only for infrequent use at best is all.
If your feet can’t handle a dozen grams of actuation force, how do you stand?
Or drive a car.
Or play the drums.
Contrariwise! For foot switches, it’s important to have a HIGH enough actuation force. Otherwise just the weight of your foot activates it, so you have to actively keep your foot’s weight off of it. These are standard foot switches, designed with this in mind. Take a look at the buttons used on guitar pedals – you don’t see any lightweights there!
Hmm. Way more interesting is the electronics build system behind it: https://github.com/galopago/TUSISTEMITA
The second i saw the red basepkate i thought: what a good idea. I only have to find out why the grid is 10.16mm..
10.16/4 = 1 inch.
10.16/4 = 2.54mm = 0.1″, so 10.16mm = 0.4″. Not sure why that would be a good grid spacing.
I did something like this about a decade ago, whilst suffering with RSI. I cannibalised a cheap SUB mouse and rewired the left and right buttons to these exact type of foot pedals. Surprisingly usable, cheap, and definitely helped my fingers & wrist recover.
*USB mouse
Honestly, a Pi is probably overkill for a project like this.
You can use QMK and a Teensy and accomplish the same (I did myself)
It’s not a Pi. It’s a Pi Pico (which is basically a Pi Arduino).
Don’t tell me: you could have done this with a 555.
I wouldn’t be surprised if someone finagles a low speed USB human input device with a truckload of 555’s and some passives.
No. I don’t think I could have done it with a 555.
Actually, I *have* done this with a 555… but not through USB.
Buttons just short out different resistors, changing the frequency of the 555. Input is into the computer line-in audio jack. Program monitors input frequency, fires off signals when the different frequencies are seen.
Why? So you can get multiple inputs down a single analog pair through a (literal) firewall/penetration panel.
Coolest thing is you can fit multiple audio carriers down that analog line, and can FM modulate to send analog signals too (like ECG and respiratory signals), as well as several button presses and telemetry channels. My rig had three analog channels and 4 digital button press channels, all fitting in a 7 kHz analog bandwidth.
This was a quarter century ago… I’d use a Teensy or a Pico to do it now.
Hardware is overkill but the price is better than the others.
I’ve done something similar with an Arduino pro micro. The pico is definitely overkill in function if not in price. A Teensy is overkill in every regard.
I’d personally do it with a $2 blue pill. For a project as simple as this, the counterfeits would work just as well, so no worries about reliable suppliers.
While this is an elegant way to do this, I ran into a situation where I didn’t have time for such elegance. I needed to have foot switches generate F4 and F5 codes, to start and stop video playback so that I could transcribe the audio into text. My solution was to buy a $5 keyboard from Goodwill, trace the wires to its microcontroller to determine what keys connected which row to which column in the matrix, cut off all of the PCB except for enough to operate the microcontroller, and wire the two foot switches to the appropriate column and row pins. I put this in a small project box, just big enough to put big pushbutton switches on, and put the piece of paper with the matrix encoding written on it inside the box, so that if I needed this for a different application, I could just re-wire the switches.
But I do appreciate elegance.
Now that’s a hack!! :D
Cool story, bro.
i usually just use a atmega32u4 based dev board for this kind of thing. but i suppose using a beefier micro could give you more resolution and less latency. but im old and dont like change.
i built one of these for a specific a video game. bound a frequently-used key (but with no room for it on a regular controller) to a single button.
i cannibalized this bootleg USB SNES controller and wired a single button to a larger push switch. it was essentially a project box with a button placed on the end, turned upside down. the metal plate was resilient enough to take foot presses but it was janky as hell.
i have a project in mind that may involve a small USB keypad to change images on a display. currently using Arduino Nano but it doesn’t support USB. should i switch to a Pi Pico?
Reminds me of this simple tool for scopes http://pedror.com/trigger-pedal/
We are using the ATMega32u4 in our devices and even with OLED, different configurations, tone output, Neopixel and Bluetooth (via addon) it’s still enough :-):
https://github.com/asterics/fabi
And now with WebGUI: https://fabi.asterics.eu
Where is the 555?
Brilliant!