Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Geek Culture / USB Input

Author
Message
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Dec 2009 01:13 Edited at: 7th Dec 2009 01:15
Hi,
I want to make a circuit that when a switch is pressed, my computer can detect it via USB, and that I can make a program in vc++ or vb that can get this information.

I found this website http://www.electronickits.com which had some interesting USB circuits on it. I think this one looks the most suitable: http://www.electronickits.com/kit/complete/data/vek8055.htm although im not sure which inputs I would use to connect my switch?

Any idea?

Thanks,
Alex

NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 7th Dec 2009 01:14
Use a gamepad. It's simple and cheap. Why overcomplicate?

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Dec 2009 01:16
I like to overcomplicate things. Any ideas how I would connect it up?

MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 7th Dec 2009 01:24 Edited at: 7th Dec 2009 01:38
2 ways to do this.

1. Use a USB Gamepad, and Alter its circuits as required, (This would proberley be the Cheapest way)

2. Phidgets, Im not being rude, Phidgets are a way to add components to a computer, i used them once to add buttons to my case, and connected them via an internal USB Port, but you could connect them via an external one, But this would be more expencive, when i did this, it cost about £50 to add 3 buttons to my PC, But its proberley cheaper now, Do it this way you can add Buttons, Motion Detectors, IR, Motors, TouchPads, LCD Displays and more, they give you the drivers, and you then make the programme to control the new hardware you have made, This way is more expencive, and you would have to make the casing for the new hardware you make.
http://www.phidgets.com/

Everyone Be Cool, You, Be Cool.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 7th Dec 2009 01:35 Edited at: 7th Dec 2009 01:37
Wow! that circuit board looks perfect for communicating via usb! I was thinking along the lines of programming a microcontroller and getting a USB breakout board, but that's much easier to use. On the downside, it's $90 (I hate soldering microcontrollers), whereas the raw parts (Not including assembly, programming, or the circuit board) are probably worth $10 or less. Still, unless you're a circuitry hot shot, that looks like the way to go.

It sounds simple enough to use. I think you could hook up 5 buttons, and 2 potentiometers easily enough. The two analog outputs look pretty nifty.

To hook it up, first, familiarize yourself with circuitry if you haven't already. If you've never soldered or hooked up a stable power supply (It looks like this system runs on 5V, so in this case, hooking up a power supply could mean a 9V battery hooked up to a 5V voltage regulator), then definitely do so before ruining a $90 board.

If you already know (kinda sorta) what you're doing, then a 5V (i think) power regulator, hooked up to some buttons, which are in turn hooked up to the USB inputs should suffice.

[edit]
oh wait, that board is powered via USB... that simplifies things! It also looks like the inputs can have up to a 50V input, so no worries there either. You should do fine with a 9V battery hooked straight up to some buttons (I dunno if the inputs can run straight off the USB power supply. If they can, you don't even need a battery - which is nice)

MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 7th Dec 2009 01:41 Edited at: 7th Dec 2009 01:44
most of the Phidgets are mostley powered by USB, but it depends on which componsnts you get, and not too expencive for the individual phidgets, but the controller board or whatever you call it is the expencive bit.

Everyone Be Cool, You, Be Cool.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 7th Dec 2009 01:42 Edited at: 7th Dec 2009 01:46
some of the stuff on that phidgets website looks overpriced. Take this thumbstick from SparkFun.com:

http://www.sparkfun.com/commerce/product_info.php?products_id=9032

which costs $4

Now look at this:

http://www.phidgets.com/products.php?category=7&product_id=1113

It looks like the exact same joystick, with a little breakout board. Definitely not worth the extra $10!

[edit]


$28
$35

MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 7th Dec 2009 01:46 Edited at: 7th Dec 2009 01:50
then search the net for cheaper places to get the components, i just used that site as an example of phidgets.

Everyone Be Cool, You, Be Cool.
David R
21
Years of Service
User Offline
Joined: 9th Sep 2003
Location: 3.14
Posted: 7th Dec 2009 02:04
Quote: "which costs $4

Now look at this:

http://www.phidgets.com/products.php?category=7&product_id=1113

It looks like the exact same joystick, with a little breakout board. Definitely not worth the extra $10!"


Isn't that because $14 gets you 5 of them? Or at least, according to the quantity thing on the right hand side it does

09-f9-11-02-9d-74-e3-5b-d8-41-56-c5-63-56-88-c0
NeX the Fairly Fast Ferret
20
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 7th Dec 2009 02:11
No, that's how much it costs per item if you buy 5 or less.

Athlon64 2.7gHz->OC 3.9gHz, 31C, MSi 9500GT->OC 1gHz core/2gHz memory, 48C, 4Gb DDR2 667, 500Gb Seagate + 80Gb Maxtor + 40Gb Maxtor = 620Gb, XP Home
Air cooled, total cost £160
AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Dec 2009 09:18
Thanks that Phidgets stuff looks really cool, shame about the price

AlexI
20
Years of Service
User Offline
Joined: 31st Dec 2004
Location: UK
Posted: 7th Dec 2009 09:37 Edited at: 7th Dec 2009 09:38
I think I am going to buy this http://www.phidgets.com/products.php?category=18&product_id=2005 will give something to entertain myself with for a while Thanks for all the help

MSon
20
Years of Service
User Offline
Joined: 13th Jul 2004
Location: Earth, (I Think).
Posted: 7th Dec 2009 09:42
do a search on the net first, see if you can find it cheaper anywhere else first, and remember, dont blow up your pc

Everyone Be Cool, You, Be Cool.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 7th Dec 2009 12:42
I'd always go for the cheap option, as cool as that kit looks, you only have 1 interface board, and what looks like an elaborate array of controllers, but what controllers will you actually need.

I mean, I'd get a project case and an old USB joypad, strip out the circuit board and cable, and wire up any buttons to the joypad. If it's just buttons that is - nobody need know what's inside the project box, and it won't cost $100. I did exactly this to wire up my classic arcade joystick from atari 9-pin to USB. Worked a treat, cost practically nothing, and I can use it in anything that supports USB joypads.

If this is the sort of thing you are interested in, then I can certainly see why you'd want that kit, and maybe a few extra interface cards as well! - but if it's just to do a specific job, then that's a lot of money to spend, when you can do the same thing quicker, cheaper, and easier.


Health, Ammo, and bacon and eggs!

Login to post a reply

Server time is: 2025-05-25 10:21:40
Your offset time is: 2025-05-25 10:21:40