Go Down

Topic: "OrbDuino" serial gaming device to USB HID shield! (Read 5 times) previous topic - next topic

vputz

Well, it looks like this has finally come to fruition; pretty simple device basically built after RancidBacon's fantastic page here, but with the addition of a 9-pin serial port, some DIP switches, and a Max233CPP chip to handle the serial to the device itself.



This is meant to resurrect old serial gaming devices.  I built it in particular to breathe new life into the SpaceTec SpaceOrb 360, which is now defunct as a gaming device (I resurrected it once with HidSporb, an XP driver, but this was a chance to implement the HID driver in hardware).

The happy news is, it works!  I'm deeply indebted to RancidBacon's page, which had the outline for the circuit.  Eagle files, the supporting library, and ludicrously detailed build instructions (I wanted Orb fans who'd never used a soldering iron to give it a try) are at the project page http://orbduino.sourceforge.net.  It successfully represents the SpaceOrb (or SpaceBall 4000, or Magellan SpaceMouse) as a 6-axis 16-button device (with goodies like chording, sensitivity curves, etc), plus mouse and keyboard which can be mapped, so it can work in any game supporting a mouse and keyboard... it may even work on USB-friendly consoles, but I don't have one to try.  It seems to work with Windows and Linux as just a plain old HID device, which was the goal!

The basic idea is that the DIP switches control whether the on-board serial chip talks to the gaming device or not (so you turn the switches off to program the Arduino, unplug the arduino, plug the shield HID port into the computer and the DB9 into the gaming device, and turn the switches on; you can turn them on selectively to try and use the port for debugging device communication, but Weird Things happen if both USB ports are plugged in simultaneously).

Unfortunately I can't get it to compile with Arduino 0017 (I think because of the usbavr .S files, which sounds like should be fixed with 0018), but it worked with 0016; I played through Quake 4 and Fable using a desktop SpaceBall 4000FLX+mouse, as well as faffing about with Left4Dead (as a joystick) and Google Earth.

Build as you want, and if you're lazy (like me) I had Seeed Studio prototype it and built a few kits (Board only, sold out atm and a few kits, which I'll refresh if they sell out).  The design is pretty basic and unfortunately puts some leads where they may hit components on the regular Arduino, so either put some tape over those (which is what I did) or use a lower-profile board like the Seeduino (haven't tried that yet but it should work).

I haven't tried it with other serial gaming devices, since I don't have access, but it should probably work... not the most elegant, but it's a first project, so I'm still proud of it--besides, what other projects will let me blow up zombies?  If I had more time, I might try and do something more elegant with an Avropendous-DIP style chip (are they still going?), but this works great with the stock Arduino, which  makes me happy.

papa-j

Hi,
Been following birdman and you for years. Great stuff and a fantastic journey. I have a SpaceOrb and a Spaceball 4000 to get cracking.
Need a little help if you can.

I Ordered and built the OrbDuino kit and mated it to Arduino Duemilanove ATMega328. Running Arduino 0018 on Vista32

Fails during compiling when I upload Basicjoystick sketch

C:\....\arduino-0018\arduino-0018\libraries\SpaceOrb\/usbdrv.h:307: error: expected identifier or '(' before string constant

C:\...\arduino-0018\arduino-0018\libraries\SpaceOrb\/usbdrv.h:315: error: expected identifier or '(' before string constant

Example sketch (blink) loads fine.

Thoughts on what I can do about this are appreciated! Thanks.

cr0sh2

Maybe I am misunderstanding what this is for: What does this do or give you that you couldn't get with an FTDI serial to USB cable (or chipset)? Is it meant to act as a "man-in-the-middle" to monitor the communications, as well as allow the use of the controller with the Arduino only (not necessarily to connect the controller to the PC)?

I know what the controllers are (I've been playing with VR since the early 1990s); I own a Spaceball (original version, not the later 4000), and I also own an Ascension Flock of Birds (two sensor, RS232/485 version) - I am more interested in connecting them to a current PC with only USB for VR/AR/teleoperation research.

If its for allow the Arduino to interpret and use the commands they send, then ok - cool; maybe something like that could be useful for quite a lot of things (I also have some old large serial graphics tablets with magnetic mouse input devices; meant for CAD use).

Sounds interesting!

vputz

#3
Feb 09, 2010, 06:51 pm Last Edit: Feb 09, 2010, 06:52 pm by vputz Reason: 1
cr0sh2:

Quote
What does this do or give you that you couldn't get with an FTDI serial to USB cable (or chipset)?


Simple: A usb hot-pluggable hid device.  It's essentially a driver implemented in hardware instead of software.  

In other words, instead of plugging in the spaceball and having to set your computer up to understand what a spaceball is, you plug a (SpaceOrb360, SpaceBall4000, etc) into this, and this into the computer, and the computer's hid stack says "Aha, I see a six-axis 16-button game controller, a keyboard, and a mouse have been connected"; it doesn't have to know anything about SpaceOrbs, their communications protocol, etc; as far as the computer is concerned, you just have a generic gaming device/mouse/keyboard.

Primarily it's oriented towards gaming (I've successfully played FPS games like Left4Dead or Descent as well as strategy games with it), and a lot of the emulation (binding axes to mouse axes, or saying "if you push far enough in the +y direction, press and hold the W key") came from that requirement.  And I have to say, playing Descent again with a desk-mounted spaceball is... well, confusing as hell to be honest.  But you could certainly bind axes and buttons to mouse/keyboard events and use it for CAD programs (particularly if they're flexible enough to respond to generic HID devices with axes and buttons).

You can also fly around Google Earth with it, which is cool.

The basic idea is really very flexible... I'm currently trying to make another adapter for my old Thrustmaster FCS/WCS/Rudder pedals...

Papa-J: Thanks!  I'll respond directly, but the short form (as you've noticed) is that you need either Arduino 0016 or the new version of the library for Arduino 0018 which I just fixed yesterday.  Sorry for the slow responses on both... I forgot the "check if you wish to be notified" button and wasn't monitoring this thread.

cr0sh

Quote
Simple: A usb hot-pluggable hid device.  It's essentially a driver implemented in hardware instead of software.


Now I understand - this is cool!

Now I want one for my Flock of Birds!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up