I was looking to buy a MIDI pedal with a good range of motion and a fairly low price (mainly to control virtual instrument's expression/volume while my hands are on the keyboard, and my right leg is on a sustain pedal).
I didn't find what I was looking for, so I figured it's a good motivation to improve my CAD skills, and make my own.
My idea was to let the user choose the range they want, so... this pedal supports up to 80 degrees. While not expected to be fully used (I know I don't have that flexibility) different ranges work for different positioning of the pedal, and personal comfort.
Behavior
By default, the full range is used.
A press on the blue side-button initiates range selection mode, which is enabled for 5 seconds. It's indicated by a blue light, and can be ended sooner, by an additional press on the button.
Range is chosen by moving the foot pedal back and forward, over the desired range.
After the range is set, it is saved to EEPROM (so it's not power depended).
Movements in the range are indicated by the green light (indicating MIDI commands are sent to the host) while movements outside of the range, are ignored.
Solder 3 wires to the potentiometer (15cm each. You can cut them more precisely later).
Connect the potentiometer to the potentiometer_holder (Use glue):
Connect the potentiometer_gear to the potentiometer (make sure it's tightly coupled with the shaft):
Connect the potentiometer_holder to the base_plate, using 2 screws. Don't tighten the screws too much (allow the potentiometer_holder to slide on the rail, for later adjusments):
Connect the 2 bearings to the left and right bearing holders:
Connect the right_bearing_holder to the base_plate with 2 screws:
Connect the rod_gear to the rod.
Push the rod through the bearing of the right_bearing_holder. Make sure it's oriented correctly, so that the rod_gear's teeth connect to potentiometer_gear's teeth when both gears are aligned:
Connect the left_bearing_holder to the base_plate with 2 screws, pushing the other side of the rod into the left bearing:
Make sure that rod_gear is aligned to the potentiometer_gear, and that a bit of the rod sticks from both sides of the bearing holders.
Connect both left and right rod connectors to the rod:
Put the pedal on the left and right rod connectors, and connect the screws, without connecting the nuts:
Move the pedal back and forth, making sure both gears are in contact. Correct the angle of the potentiometer_gear, so that it moves together with the rod_gear and doesn't block it from moving the whole range of the pedal.
Disconnect the pedal from the rod connectors, and tighten the potentiometer_holder screws:
Solder potentiometer wires to Arduino (The picture below is from the finished assembly. In this step you only need to solder the marked wires):
Potentiometer top wire -> Arduino GND
Potentiometer middle wire -> Arduino A0
Potentiometer bottom wire -> Arduino 5V
Solder micro_switch to Arduino (The picture below is from the finished assembly. In this step you only need to solder the marked wires):
LED minus & one of the button pins -> Arduino GND
Other button pin -> Arduino pin 2
LED plus -> Arduino pin 3
Connect the micro_switch to the base_plate (use glue):
Connect the button_holder to the micro_switch and base_plate (use glue):
Connect Arduino to the base_plate (use glue):
Reconnect the pedal to the rod connectors with screws and nuts.
Add rubber pads:
You can optionally add a pad to the button, to make it easier to press with your other leg.