Introduction: Use a Guitar Pedal to Send Mouse Events to Your PC Over USB

In this instructable, I'll explain how I used a guitar pedal as a footswitch to send mouse events over USB.

I needed a durable, reliable foot switch that I could use to send signals to my PC. Ideally, I wanted the switch to be mapped to a mouse event or a keyboard shortcut. I'll show you how I accomplished that for just a few dollars.

You can use this for a variety of purposes such as controlling the push to talk function of voice communication software, while keeping your hands free for gaming. This can also help people who suffer from repetitive stress injuries.

In my case, I wanted a foot-switch to control the operation of a photo booth.

Here's what you will need:
  1. a guitar pedal - I got a Boss FS-5U from Starving Musician my local used music store. I had planned to use an effect pedal, and would have needed to rewire the pedal internals to make it into a simple momentary off/on switch, but the FS-5U was ideal because it already is just a momentary switch meant to be used as a trigger, so it didn't require any modification to work.
  2. a guitar cable of adequate length ($3 used at the used music store)
  3. a 2-conductor guitar jack (you can get these online for around $2 each, but I got two of them on a mounting plate from a deceased amplifier for $1 at the used music store).
  4. A USB mouse. I actually bought the cheapest one I could find for $5
  5. some primary wire (~16-18 GA)*
  6. a soldering iron*
  7. some solder*
  8. a digital multi-meter*
  9. wire cutters / wire stripper*
I made it at TechShop, so I was able to use a digital multi-meter, soldering iron , solder, and wire that were available there in their electronics work area.

Step 1: Disassemble the USB Mouse

To get started, you need to open up the USB mouse. In my case there was a single screw holding the mouse together.

The left and right and center mouse buttons are clearly visible once the cover is removed. Beneath the outer plastic shell of the mouse, they are simply surface-mount micro switches.

Step 2: Determine How the Button Switches Are Attached to the PCB

Remove the Printed Circuit Board (PCB) from the mouse and flip it over so you can see the solder connections.

Set the digital multi-meter to measure to measure resistance (I used the  20 Ohms setting) and figure out which two solder connections are bridged when the switch you want is in the closed position, but not when it is in the open position.

In the first photo above, I've indicated which pair of contacts open and close with the Left Mouse Button.

Using the soldering iron, heat up these solder joints one at a time and  remove the micro-switch. This will leave a small hole in the PCB where each of the connections was.

Step 3: Wire the Mouse to the Guitar Jack

Using your wire cutters cut a small section of primary wire (I used about 12 inces) and strip away the insulator from the last quarter inch or so.

Insert the exposed wire through one of the solder contacts on the PCB which you identified in the previous step, and then solder it into place, trying to use as little solder as possible while still getting a solid joint. I placed the soldering gun against the exposed copper wire on one side of the PCB and held the solder against the wire on the other side. As the solder becomes molten, it was quickly drawn toward the source of the heat and formed a small bulge on either side of the PCB.

Repeat this process with another piece of primary wire (not the other end of the same piece) and the second solder contact. I used different colors of wire to help keep things clear visually.

The first photo above shows what my mouse PCB looked like after this step. My solder joints aren't perfect, but they are secure and not touching each other. As you can see, I used different colors of wire to help keep things clear visually.

Next you strip a small section of insulator from the other end of each of these wires and solder them to the contacts on your guitar jack. For my purposes, I connected the left mouse button to the contacts on one guitar jack and the right mouse button to the contacts on a second jack.

NOTE: If you wanted to use this as a push-to-talk switch for gaming, I would suggest using the Center mouse button, since it isn't usually used and can be easily mapped in both Teamspeak and Ventrillo.

The second picture show what the final assembly looked like.

Step 4: Test and Mount the Jack.

To test your pedal:
  1. Connect the guitar pedal to the guitar jack using a length of guitar cable,
  2. Plug the mouse's USB cable into your computer - it should recognize the hardware as a USB mouse.
  3. Step on the pedal and you should see a response on the computer.
The picture shows everything connected for my initial test.

Now all that's left is to mount your guitar jack(s) and you are in business. In the second picture, you can see how mine is mounted on a plywood box that was part of my photo booth project.
Hurricane Lasers Contest

Participated in the
Hurricane Lasers Contest

Hack It! Contest

Participated in the
Hack It! Contest