Foot Switch to Laptop: Should I Use an Arduino?

Let me preface this by saying that I'm not much of an electrical engineer. I have a problem and a friend of mine thought an Arduino might be the solution, so please give me your input.

My goal is to use a foot switch to activate effects on vocals that are being run through my laptop on a Max/MSP patch. Basically, I just need a way for the laptop (and specifically the MSP patch) to recognize when the foot switch is down.

I have a momentary foot switch with a 1/4" output. I assume the best way for the laptop to pick up the signal is through USB. Is an Arduino a logical and simple middle step? What are your ideas? And has something like this been done before?

Again, I apologize if this question seems elementary to the seasoned EEs out there. I have little knowledge of the hardware side of things, so please don't be afraid to dumb it down a little.

Thanks!

Well an Arduino can certainly read a foot switch and send a serial message to the PC via the USB serial comm port, that's a trivial task for it. A lot depends on your PC host application software and what control you have over it. In older days, with real PC comm ports and printer parallel ports, you could just wire a switch contact to those kinds of ports to do such a simple task.

Lefty

Another option is to build a simple USB shield (USB socket, resistors and a couple of zener diodes) so that the Arduino can act as a simple Keyboard HID device with the foot keys sending regular keyboard codes. I've had one working for a while , based on one of the V-USB projects here: http://www.obdev.at/products/vusb/projects.html and information here http://code.rancidbacon.com/ProjectLogArduinoUSB, which looks like its been updates quite a lot since I last looked here!

I had created a single key keyboard as a test. Its a little fiddly to do as the code didnt compile with latest Arduino ide. Looking at the updated page, I think I'll re-visit my usb shield to update and refresh it.

Hope this helps

Andy

Do a google search for "usb joystick adapter": you may well want to learn about Arduinos for more-complex projects, but one of those adapters for turning old analog game controllers into USB devices would be easier and cheaper for this very simple need. All you have to do is wire the footswitch up as one of the joystick buttons, and you're ready to go.

Ran

AndyL: got details, design files, etc? I am in the process of doing something very similar. Although the final version will probably end up on a dedicated PCB, it would be nice to have the V-USB shield for the development phase...

Edit: (never mind. I should have looked at your web site before I asked! (it's all there.))

Edit: (never mind. I should have looked at your web site before I asked! (it's all there.))

If you mean the rancidbacon.com site that's me, not Andy. :)

What's the project you're working on?

--Philip;

I meant "the website quoted by [xxx]" rather than necessarily "the website authored by [xxx]"; no slight or omission of credit intended.

"My project" is a footpedal for a musician to advance music on a laptop screen instead of having to dig though 50lbs of books... For better or worse, I have been distracted by a pile of discarded USB keyboards and bypassed any "real" hardware development:

It's similar to http://www.instructables.com/id/USB-Foot-Pedal/

"real" hardware would have saved some searching for the correct key connections, and made the whole thing configurable, but it's hard to beat "free, finished, and working."

but it's hard to beat "free, finished, and working."

yes it is, and if you pursue making it into a "more than once" project you already have a proof of concept and demo