Simplest and cheapest one button USB interface

Hi all.

Can anyone offer any advice. I'd like to make a small device that has a single momentary button, that I can connect to a USB port on my PC, and have the PC perform an action when I press the button.

I've used an Arduino demi in a project and was really impressed with how easy it was. I could quite easily make what I want using one, but it's a bit overkill.

Can anyone point me at any resources for the simplest way to hook up a microcontroller to a single switch and a USB interface? Something like the u-hid would also do the job, but I can't seem to find any UK suppliers, and it's not all that cheap either. I also like the idea of a programmable microcontroller attached to the switch so I could write whatever software I wanted for the PC, rather than use a keypress like interface.

Cheers,

Steve

I don't know if any one has managed to do this, it is certainly difficult.
The best might be this:-
http://www.create.ucsb.edu/~dano/CUI/#CUIv1/
But it is not ideal.

You could pull the PCB out of a USB keyboard and repackage it. I took one apart recently; the PCB was about 2" x 6", IIRC.

-j

you could use a teensy: Teensy USB Development Board
Teensyduino: Using USB Mouse with Teensy on the Arduino IDE Teensyduino: Using USB Keyboard with Teensy on the Arduino IDE

The cheapest USB button interface would be to get a cheap USB gamepad like below. On line they can often be found in the ~$4-8 range.

Thanks for the help. I like the look of the teensy a lot, but getting it from the US could bump the costs up. I hadn't thought about ripping a control pad apart, but that's a very interesting idea too, I'll have to look into that.

I've also just found this AVR-Stick that I'm going to look into a bit too. It certainly fits the small and cheap requirement :slight_smile:

Cheers,

Steve

The game pad approach is probably the simplest and lowest cost assuming that you can map the gamepad events to something useful like a keypress event in a the gamepad driver.

Something else you might want to look at is to see how the USB Palm cradles worked; you can still buy interface cables and cradles on Ebay on occasion (mostly the former from shenzhen; I typically see cradles at thrift stores). Since there are drivers and such for Linux, finding the code to see how they work shouldn't be too difficult...

I have not done it, but I found this:

They have made a lot of USB things.
It looks like not much money, less than $10 using Atmel AVR's a bit like an Arduino but cheaper
http://www.obdev.at/products/vusb/prjhid.html

It says it can be a keyboard, so maybe that is all you need to do.
Give your PC program focus, and it could maybe send the right key to do what you want.