To get it clear right at the begining: There are several products to buy off the shelf, but to be honest, I was not willing to pay for the clavia nord bass pedal. And many of the cheaper MIDI pedals are without touch dynamics. E. g. there is an easy DIY solution by Doepfer, combining a FATAR PD/3 pedal chassis with a solid electronic "MBP 25" and a pretty front plate (housing to be done by yourself). I bought this and it is absolutely OK, but it is without touch dynamics, too (you just can adjust the velocity to a fixed value for all notes).
So my intention was to rework this to get a velocity sensitive bass pedal, using my Arduino / ATMega328P- microcontroller and the FATAR PC/3 pedals. I removed the MBP25 and ended up with about 40 EUR additional material cost (plus the PD/3).
To make this velocity sensitive, I had to install additional contacts (normally closed when pedal is not pressed), which is quite easy on the PC/3 as it seems to be prepared for additional contacts by the manufacturer. For each pedal you just have to drill an additional hole in the contact carrier and the PCB, bend a lead, push it into position, fix it with some hot glue and connect all these contacts in two groups to the "Normally Closed Row" of the diode matrix of the PD/3. Using a computer flat cable with a 20-pin socket (2 rows), I connected the PD/3 Board via its Micro Match socket to my own PCB. When pushing down a pedal, measuring the time difference between opening the NC contact and closing the NO contact gives the information I need to calculate the velocity. This is done in the ATMega328, which is programmed using the Arduino IDE (see Arduino sketch). As there are tolerances in the distance between NC and NO contacts, an individual factor for each pedal allows to adjust the calculated velocity such that they all have a similar characteristic. To be honest: professional pedal boxes probably might have a better sensitivity. But for my purposes, this works fine.
As it is not that easy to play with well-controlled velocity with the feet, I installed two potentiometers to set the minimum and maximum velocity as required (setting both to the same level will define this level to be velocity for all notes, no matter which velocity was using when pushing the pedal; setting min to "0%" and max to "100%" gives full range of velocity).
The Arduino Uno and my PCB has no nonvolatile store, therefore the settings for transposing (PD/3 has only 13 pedals and for sure you want to set it to different octaves depending on what you want to play) and the MIDI channel are "stored" in the position of a rotary switch (octave) and a 4-bit-DIP-switch, both combined with a resistor cascade.
MIDI IN and MIDI THRU give full connectivity with other devices (MIDI IN signal will be merged with the notes on / off commands from my pedals and routed to MIDI OUT).
If you are interested in expanding this to a 25-pedals box, this is possible by combining two PD/3 pedal boxes. Doepfer has a good description on how to do this mechanically. As all pins of the Arduino Uno / ATMega328 are occupied, you will have to use another Arduino (e.g. Mega2560), because you will need additional pins for the RNC3 / RNO3 and RNC4 /RNO4 lines: In the diode matrix of the PD/3 there are 8 pedals connected by 8 lines to the first row line (one for normally open, one for normally closed). The next 8 pedals are connected via the same 8 lines to the second row and so on. So for 25 pedals you need 8 lines for columns and 4 rows.
Please find the source code and the circuit diagrams attached. Feel free to comment or ask any questions or propose improvements ... ;o)
