Introduction: USB MIDI Expression Pedal

This project turns an analog guitar or keyboard expression pedal into a software MIDI pedal to be used with virtual stomp boxes.

Project time: 1-3 hours

Supplies

  • An analog expression pedal
  • Arcade joystick USB controller
  • Box
  • Jack socket (stereo if pedal has stereo jack, otherwise mono)
  • Foot switches or buttons
  • Wires, soldering gear
  • Joystick to MIDI driver


In this project an old Roland EV-5 pedal is used as the pedal, but any pedal with a linear potentiometer in the 10K - 200K ohm range should be usable.

We will use a cheap Bosega CY-822A "zero latency" USB arcade controller, to convert the foot pedal position (potentiometer position) into a low latency digital input. There are other similar arcade PCBs available, that may be used as well as long as analog mode can be enabled. These controllers are usually available for a few $ online.

The box is just any box of a size where the PCB, buttons and sockets will fit. I used a sturdy lunchbox sized storage box from IKEA.

The jack socket should be a stereo jack socket.

The foot switches are optional, but they are very easy to connect to the joystick controller.

Step 1: TL;DR

Short version:

  • Mount jack socket and optional switches to box.
  • Disconnect R7/R8 junction from R5/R6 junction by cutting PCB lane.
  • Disconnect R5/R6 junction from R3/R4 junction by cutting PCB lane.
  • Connect R7 top to jack shield connector.
  • Connect R5 bottom to jack tip connector.
  • Connect R8 bottom to jack center connector.
  • Connect R7 bottom to R1 bottom.
  • Connect switches to bottom row joystick bottom sockets.
  • Connect USB to PC.
  • Calibrate.
  • Install Joystick to MIDI converter or use DAW with joystick input.
  • Rock and roll.


Step 2: Understanding the Controller

The cheap USB arcade joystick controllers are usually configured for a digital joystick as this is the most widely used type for arcades. Unfortunately there is no switch or similar on the controller to make it encode analog input instead, however it does have the capability with minor modifications.

How the controller detects direction

The controller can detect four analog joystick direction: X, Y, Z and Z Rotation. It does so by measuring the difference in resistance between the upper resistor and lower resistor in the right hand bank of resistors (R1 to R8).

However, since these boards will mostly be used for digital joysticks connected to the sockets AU,AD,AR,AL socket above, the resistor bank is fixed with a single pair of equal resistor and a PCB lane on the backside connecting all resistor pairs to the first. Connecting the AU switch will lower R1 to near 0 ohm. AD will connect R2 and so forth.

This means that the controller is actually an analog controller with fixed resistors, so all we need to do is replace the resistors with the potentiometer reading from our pedal.

Step 3: Making the Controller Analog

To make the controller analog, we need to disconnect the fixed resistors for the axes we need.

The axes are X, Y, Z, Z Rotate for R1/R2, R3/R4, R5/R6, R7/R8.

It is easiest to connect to the right most resistor pair, however I found it difficult to map Z Rotation to MIDI later, so I recommend using the Z-axis and the following instructions is for the Z-axis, which require a little more work.

Seperate R5/R6 and R7/R8

All resistor pairs are are connected in the center with a PCB lane on the backside to share the R1/R2 resistors. This lane needs to be cut between R3/R4 and R5/R6 as well as between R5/R6 and R7/R8. Two cuts. See image.

Use a scalpel and a steady hand to cut through the line and verify with a multimeter that the risistor pairs have now been separated.

Add potentiometer wires

We now need to add the wires that we will connect to the jack socket.

Use three thin wires preferably of different colors.

Lets name the wires Red VDD (+5), RA, RB.

The wire lengths should be cut, such that it can reach a jack socket at the edge of the box.

  • Solder the VDD wire to any of the top holes in the resitator bank. All top holes are connected to VDD, so any VDD point on the board will do.
  • Solder the RA wire to any of the two wholes between R5/R6.
  • Solder the RB wire to any of the bottom holes in the resitator bank. All bottom holes are interconnected to RB, so any hole will do

Reconnect R7/R8 to R1/R2

The R7/R8 (Z rotation) was diconnected, so we have to reconnect it to R1/R2 again. Otherwise the joystick controller will constantly produce random Z rotation events.

  • On the backside of the board, solder R7/R8 to R1/R2 with a short piece of wire.

For reference I found these instructions on how to enable the analog capability in these boards. The instructions mentions the need to switch mode to analog or move the J1 resistor, however I found that this only switches the joystick mode between "move" and "hat view", so there should be no need to move that resistor.

Step 4: Connecting the Input Jack

In step we connect the three wires soldered to the controller Z-Axis to the input jack.

  • Drill a hole in the box and mount a stereo jack socket.
  • Solder the VDD wire (resistor row top) to the shield connector.
  • Solder the RA wire(midway hole) to the tip connector.
  • Solder the RB wire (resistor bottom row) to the center connector.

This order of VDD, RA, RB worked with the Roland EV-5. Other pedals may have different wiring.

Pedals with only a mono jack

The EV-5 has a sensitivity dial that changes the resistance to the shield. Using three wires and a stereo jack enables this dial to be used, since we can use it to change the ratio between the top and bottom resistor when using the pedal, however it should also be possible to use a foot switch with no sensitivity dial, by simply soldering a fixed resistor (or potentiometer) to either R5 or R6.


Step 5: Add Foot Switches

Add any number of foot switches to the box and connect these to the joystick buttons (bottom row of connectors). Usually this can be done without soldering with the proper wires.

Step 6: Connect the USB Cable

Finally make a whole in the box for a USB cable and connect that to the top left USB socket on the controller. Note that some boards have been assembled with the connector reversed. Make sure the red USB wire goes to VDD.

Step 7: Calibration

These instructions are for Microsoft Windows only

  • Start Windows and connect the USB controller. Windows should recognize it as a generic joystick.
  • Open the joystick calibration tool. Search for "Set up USB Game Controllers"
  • Click properties
  • Exercise the foot switches and validate that the button lights up.
  • Select Settings and then Calibrate...
  • Skip the X/Y Axis calibration.
  • In the Z-axis calibration screen. Exercise the foot pedal from fully closed to open a couple of times. The goal is to get avoid dead zones at either extremes. It may help to adjust the sensitivity dial. The EV-5 worked well for me with the sensitivity at about 1 (of 0-10). The calibration tool tries to figure out the range of values, so if you adjust the sensitivity, you may have to use Back/Next to reset the detected range. You can also use "Display raw data" to ensure that the value changes at either extremes and use the sensitivity until it does.
  • Press next. Skip through Z-rotation calibration and press OK to end calibration.
  • We are now pretty much done.

Step 8: Joystick to MIDI

The next step is to convert joystick values to MIDI.

I mostly use the Reaper DAW that supports joysticks as MIDI input. It just needs to be added as a MIDI input in the settings and then we are ready to rock.

Another solution is the freeware tool Fero JoystickMIDI. This tool converts joystick to MIDI output, however, if you want to use the pedal with software pedals and amps you will have to loop it back to MIDI input. loopMIDI will do that.