Homebrew USB Devices?
by Griffin Milsap · in General Discussion · 12/05/2005 (8:54 pm) · 15 replies
I was wondering if anybody here has toyed with the idea of a homebrew USB input/controller device.
I'm looking for a tutorial, or a schematic on how a USB device works, and how I could create my own in my basement.
Does anybody have any resources they know of? Can anybody reccommend a method of writing drivers for the device?
If you could come up with your own input device, it would really change your game. Is this Indy Territory?
-Griff
I'm looking for a tutorial, or a schematic on how a USB device works, and how I could create my own in my basement.
Does anybody have any resources they know of? Can anybody reccommend a method of writing drivers for the device?
If you could come up with your own input device, it would really change your game. Is this Indy Territory?
-Griff
About the author
#2
12/05/2005 (11:15 pm)
It's not something done easily. The USB standard is open so all the documents and interface hardware should be out there.
#3
I use the AVR microcontroller so I've seen a few AV USB devices. Check out www.avrfreaks.net
Some hardware these days like ARM7s come with USB ports I think.
I've seen some pretty amazing projects doing basic USB (not standard compliant though) with very little hardware.
If you are new to the whole area, best bet is to use a USB<>RS232 chip from FDTI or similar and just use the serial output.
If you have 8051 knowledge, or will learn it, you can use this USB development board from Futurlec (www.futurlec.com/USBDevBoard.shtml). It only costs US$32.90.
I don't play with 8051 so I can't comment on it too much.
USB is starting to become the domain of the hobbyist (this wasn't so IMO about 18 mths ago, but is starting to get that way now)
BTW Another big problem you'll face is writing a driver for Windows/ GNU/Linux and I assume Mac that works with the USB.
If you get your prototype going, manufacturing shouldn't be a problem. Lots of good cheap places in Eastern Europe and China that will make your items for you.
I'd go with Europe so knock offs don't start coming out of the same Chinese factory.
People like www.olimex.com might be able to help you there.
12/06/2005 (12:36 am)
There are some interesting projects sprouting up recently using USB.I use the AVR microcontroller so I've seen a few AV USB devices. Check out www.avrfreaks.net
Some hardware these days like ARM7s come with USB ports I think.
I've seen some pretty amazing projects doing basic USB (not standard compliant though) with very little hardware.
If you are new to the whole area, best bet is to use a USB<>RS232 chip from FDTI or similar and just use the serial output.
If you have 8051 knowledge, or will learn it, you can use this USB development board from Futurlec (www.futurlec.com/USBDevBoard.shtml). It only costs US$32.90.
I don't play with 8051 so I can't comment on it too much.
USB is starting to become the domain of the hobbyist (this wasn't so IMO about 18 mths ago, but is starting to get that way now)
BTW Another big problem you'll face is writing a driver for Windows/ GNU/Linux and I assume Mac that works with the USB.
If you get your prototype going, manufacturing shouldn't be a problem. Lots of good cheap places in Eastern Europe and China that will make your items for you.
I'd go with Europe so knock offs don't start coming out of the same Chinese factory.
People like www.olimex.com might be able to help you there.
#5
You may want to check out the USB section over @ www.beyondlogic.org
As Nigel mentioned AVR parts are pretty easy to get hold of so they may be worth a look.
12/06/2005 (11:41 am)
I spend my working life working with microprocessors of one sort or another and can tell you that knocking together a little USB device is easily within reach, even if you need to write drivers to communicate with your new shiny device.You may want to check out the USB section over @ www.beyondlogic.org
As Nigel mentioned AVR parts are pretty easy to get hold of so they may be worth a look.
#6
12/06/2005 (11:57 am)
There's also the "USB Complete" book by Jan Axelson, which I've used. Not great but useful.
#7
Advanced Linux Programming
Linux Device Drivers
That will cover the Linux side at least, but I am not sure if kernel version changes over the years has broken these methods discussed in the books.
I'm not sure how much work it is for an indie, but a big company like xgaming.com decided not to use the USB spec. on their game devices. Instead, they used keyboard emulation, using a strange keyboard passthrough adatper. All of this to avoid having to write drivers on all supported platforms (Windows, Linux, Mac, GameCube, XBox, Playstation 2). They ened up making USB and other proprietary adapters to support systems that do not have PS2 ports.
I'm not saying anyone should follow in these footsteps (because my XArcade really F's up my keyboard input), but it was sort of on topic. Plus, I wanted to point out the great lengths a company has gone to avoid using USB and creating drivers (which I still don't fully understand why they'd rather make adapters instead of write drivers), let alone an indy developer try it. Although it's not the size of the company that matters, it's the talent.
If anyone knows any DIY tutorials to get started on rewiring an XArcade controller to USB and write drivers, I may be interested in ripping apart my $150 controller.
12/06/2005 (12:16 pm)
That would be definately cool to design custom devices to replace the cumbersome-at-first use of mouse/keyboard combination for playing PC video games. As far as driver programming, I own these two books (yet never put them to their full use), which are now even freely available:Advanced Linux Programming
Linux Device Drivers
That will cover the Linux side at least, but I am not sure if kernel version changes over the years has broken these methods discussed in the books.
I'm not sure how much work it is for an indie, but a big company like xgaming.com decided not to use the USB spec. on their game devices. Instead, they used keyboard emulation, using a strange keyboard passthrough adatper. All of this to avoid having to write drivers on all supported platforms (Windows, Linux, Mac, GameCube, XBox, Playstation 2). They ened up making USB and other proprietary adapters to support systems that do not have PS2 ports.
I'm not saying anyone should follow in these footsteps (because my XArcade really F's up my keyboard input), but it was sort of on topic. Plus, I wanted to point out the great lengths a company has gone to avoid using USB and creating drivers (which I still don't fully understand why they'd rather make adapters instead of write drivers), let alone an indy developer try it. Although it's not the size of the company that matters, it's the talent.
If anyone knows any DIY tutorials to get started on rewiring an XArcade controller to USB and write drivers, I may be interested in ripping apart my $150 controller.
#8
12/06/2005 (12:27 pm)
I would say the the new xbox360 controller works with windows and comes with a driver so that might be somethign to look at for indie teams as they don;t have to worry about manufacturing. but someone would have to write a linux and mac driver which i dunno how hard that would be
#9
If you find yourself mashing something together and get stuck with firmware/drivers then drop me a mail and I will see if I can point you in the right direction or give you a hand.
12/06/2005 (12:29 pm)
Drivers for Windows, Mac and Linux aren't too much problem. I would have to dust of my PS2 linux kit to see how easy PS2 stuff is! If you were serious about PS2 and XBox dev though you would have the proper dev kit already.If you find yourself mashing something together and get stuck with firmware/drivers then drop me a mail and I will see if I can point you in the right direction or give you a hand.
#10
I just go to
http://www.lik-sang.com/
buy a ps2 to usb converter and - boom - I have a controller that's cheap, usb, and it can take a beatin and it still works.
@Jeffrey Bakker - I just build my own xarcades. You go to the local arcade supply warehouse and get street fighter II joysticks and the real arcade buttons, some wood at home depot, paint - or airbrush if you're fancy, large hole drill bit, ps2 controller, solid core red wire.
Take apart ps2 controller, connect the buttons again by soldering where the human press would connect.
connect other ends of wire to real arcade buttons.
connect digital joystick
Now just go to lik-sang or fry's ( kiky-x usb 2 ps2 adapter - works under linux ) and get a usb2 to ps2 converter.
I was worried about ordering from hong kong but the stuff came in.
12/06/2005 (1:09 pm)
Most pc controllers are made like crap and way overpriced.I just go to
http://www.lik-sang.com/
buy a ps2 to usb converter and - boom - I have a controller that's cheap, usb, and it can take a beatin and it still works.
@Jeffrey Bakker - I just build my own xarcades. You go to the local arcade supply warehouse and get street fighter II joysticks and the real arcade buttons, some wood at home depot, paint - or airbrush if you're fancy, large hole drill bit, ps2 controller, solid core red wire.
Take apart ps2 controller, connect the buttons again by soldering where the human press would connect.
connect other ends of wire to real arcade buttons.
connect digital joystick
Now just go to lik-sang or fry's ( kiky-x usb 2 ps2 adapter - works under linux ) and get a usb2 to ps2 converter.
I was worried about ordering from hong kong but the stuff came in.
#11
12/06/2005 (1:45 pm)
When I was eight, I tried making my own "Power Glove"...I took apart my old atari controller and electrical-taped the curcuit board and button contacts to a cheap one size fits all stretchy winter glove. It didn't quote turn out the way I expected. lol
#12
my self built "xarcades" took a major pounding by 2 six year old blackbelts on pepsi and candy and they are still working after they attempted to play street fighter alpha on ps1 in "hyper" input mode.
12/06/2005 (2:15 pm)
@ Jeffrey Bakkermy self built "xarcades" took a major pounding by 2 six year old blackbelts on pepsi and candy and they are still working after they attempted to play street fighter alpha on ps1 in "hyper" input mode.
#13
Cool. You just cant beat them industrial strength buttons and sticks !! A friend of mine built something like that for his dreamcast (dont laugh) and that lasted many a games session at partys and on drunken returns from the pub :)
Morel of the story. If you want near indestructible buttons and sticks then consult your local arcade supplier!
12/06/2005 (2:26 pm)
@CharlesCool. You just cant beat them industrial strength buttons and sticks !! A friend of mine built something like that for his dreamcast (dont laugh) and that lasted many a games session at partys and on drunken returns from the pub :)
Morel of the story. If you want near indestructible buttons and sticks then consult your local arcade supplier!
#14
I'm not necessarily interested in mass-producing the device, but I thought it would be interesting to not only make an interesting game, but to invent a new input device to really make a new genre.
I don't know if any of you have played the game "Bop It". You are given this wierd stick thing which talks at you and gives you instructions with what to do with the stick. When it says "Bop It" you have to push the button in the middle of the stick. Then if it says "Pull it" you have to pull a tab at the end of the stick. Then theres "Twist it" which requires you to twist the knob at the other end of the stick.
That has an oddly sexual aspect to it now that I think of it...
Anyway, I was thinking about making this wierd controller with around 10 to 15 different things to do, and in the game, you would do all of this to the rhythm of music. I'm probably just going to stick with my keyboard implimentation, but it would be an interesting thing to try your own input device.
-Griff
I don't know if I like "Bop It" anymore...
12/06/2005 (4:34 pm)
Hey! Thanks for all the replies! I'm not necessarily interested in mass-producing the device, but I thought it would be interesting to not only make an interesting game, but to invent a new input device to really make a new genre.
I don't know if any of you have played the game "Bop It". You are given this wierd stick thing which talks at you and gives you instructions with what to do with the stick. When it says "Bop It" you have to push the button in the middle of the stick. Then if it says "Pull it" you have to pull a tab at the end of the stick. Then theres "Twist it" which requires you to twist the knob at the other end of the stick.
That has an oddly sexual aspect to it now that I think of it...
Anyway, I was thinking about making this wierd controller with around 10 to 15 different things to do, and in the game, you would do all of this to the rhythm of music. I'm probably just going to stick with my keyboard implimentation, but it would be an interesting thing to try your own input device.
-Griff
I don't know if I like "Bop It" anymore...
#15
@Charles - I'd love to make my own arcade controller, but I cannot afford such parts right now. Plus I already own a 23-button XArcade, I just don't like the way the adapter works (it messes up my keyboard when plugged in). What I'd like to do is convert it to USB with real drivers (I've bought their USB adapter, which is just a ps2 splitter and still messes up the keyboard).
12/06/2005 (7:24 pm)
Lol @ "Bop It" - was thinking with my mind in the gutter too@Charles - I'd love to make my own arcade controller, but I cannot afford such parts right now. Plus I already own a 23-button XArcade, I just don't like the way the adapter works (it messes up my keyboard when plugged in). What I'd like to do is convert it to USB with real drivers (I've bought their USB adapter, which is just a ps2 splitter and still messes up the keyboard).
Torque 3D Owner Jesse Liles
would almost certainly be very restrictive to most indy budgets.