Homebrew Flight Sim Cockpit

by
Jack Morrison

Or you can get the plain text version and the zip file containing:
-joy.com and joy.c
-mixer.gif and mixer.ps


Over the last Christmas break, I built myself a homebrew flight simulator environment, saving up money to spring for a new computer to replace an aging 386-25 (I picked up the new P90 a few weeks ago, and am now making good use of the cockpit!).

Here's what I've done, including some false starts - someone else might learn from my mistakes too.


Joystick Switch Box

I built a small box with two DB-15 female sockets and a SPDT toggle switch. A few feet of flat ribbon cable come out of the box, connected to a male DB15 plug, which goes to the computer's joystick port.

The first socket is the "main" joystick port, into which I plug my trusty Thrustmaster FCS. I'll detail the wiring in a second, but for the most part this port is wired straight into the game port.

The second socket I built a small box with two DB-15 female sockets and a SPDT toggle switch. A few feet of flat ribbon cable come out of the box, connected to a male DB15 plug, which goes to the computer's joystick port.

The first socket is the "main" joystick port, into which I plug my trusty Thrustmaster FCS. I'll detail the wiring in a second, but for the most part this port is wired straight into the game port.

The second socket is the "auxiliary" joystick port, which maps X1 on the connected joystick (rudder pedals) to X2 of the game port, Y1 (throttle) to Y2 of the game port, and B1 & B2 (in case I ever plug in a basic joystick instead) to B3 & B4 of the port.

Since the FCS "hat" switch uses the Y2 axis, the toggle switch lets me select whether main-Y2 or aux-Y1 is connected to the Y2 game port input. The FCS supports all four buttons, but since they are normally open, there's no harm in leaving both the main B3 and B4, and the aux B1 and B2, connected to the game port's B3 and B4 at the same time. (Unless you had a 2-player game and wanted to use an FCS and a normal joystick, and keep the FCS user from hitting the other guys buttons... nothing to stop you from putting in a toggle switch in that case).

Rather than draw a schematic, here are the connections. "G1" means "game port pin 1", "M2" means "main pin 2", "A3" means "aux pin 3", etc.

G1 through G10, G12, G14, and G15 go to corresponding M pins.

G1, G4, G5, G8, G9, G12, and G15 go to corresponding A pins.

G10 to A2, G11 to A3.

Finally, the switch: center to G13, one side to M13, other side to A6.

I might add another switch option to run the aux Y1 to the game port's X2, if there's something that can use a throttle control plus the FCS hat (Descent, maybe). That would simply be another SPDT toggle connecting G11 to either A3 (as currently wired) or A6.

Here is a program (joy.com - also I have provided the source code: joy.c) for reading the PC joystick port, and a test program useful for checking out joystick connections.


Rudder Pedals

Mine are much like the ones Frank describes, with a single pivoting bar. I happened to have an old rowing machine to cannibalize a nice set of foot rests from. Rather than a pulley on the pot, I just used a knurled radio knob. The control line goes through large U-staples at the rear corners of the base to hold it at the right height. You can adjust the line's attachment point along the bar to change the amount of pot travel.

Throttle

I have an FCS joystick, but for some games the hat switch isn't used (or not used well), and a throttle is more useful. I mounted a 100K pot on an angle bracket to a small base, and attached a handle to that. Someone should come up with a better handle - I'm more of a software guy and my hardware constructions are always a bit pitiful - but anyway, here's what I did:
	
			(())  <- 4" length of 1/2" diam sprinkler pipe
			 ||
	side view:	 ||   <- metal "plumbers tape" covered with
			 ||      electrical tape
		---------------------  <- thin wood scrap, about 4"wide x
		  |      ||	  |       10" long
		  |     (  )	  |  <- pot
		  |     |  |	  |
		---------------------  <- wood base, about 4x10 also
The top wood piece is mounted on blocks at a proper height above the base. A circular saw made a slot for the throttle handle. The pot has a suitably long shaft with a flat spot. Mounting the handle to the shaft was a little tricky; I scrounged up some metal rings with setscrews and put one on each side of the handle:
	
			||      -------
			||     |	|
	              _ || _   |       	|
	         ____| |||| |__|       	|
		|____|*||||*|__| (pot) 	|
		     | |||| |  |	|
		      -    -   |       	|
		      	       |	|
		      		--------
and a couple pins (on opposite sides of the shaft) through the handle, held in place by the rings. The next trick was getting a proper amount of resistance to movement. I found a wide rubber band and wrapped it tightly around the pot shaft between the pot body and the first ring - it squeaks a little, but works okay.

The pedals and throttle a wired to a DB15 connector which goes into a homemade switch box, along with the FCS. The box lets me select between the FCS hat and the throttle, and plugs into the joystick port on the computer. By the way, I have a little test program to read all four joystick axes and buttons, which is very handy for testing these hookups.


Seat

(at this point my wife is starting to give me one of "those" looks :-)

I thought about getting a nice car seat from the auto wrecker's, but it sounded like that might run into some bucks. I now think that might be worth it anyway, but I ended up building my own from plywood, foam, fabric and staples. I took dimensions off the seat that's (still ;) in my car. Then I added a platform for the joystick. The first try was a shelf that came out between my legs, angled left so my right arm rested comfortably on my leg and my wrist wasn't bent to the side. You know, just like on the space shuttle. A little preflight testing turned up a problem - pulling the stick back and keeping a thumb on the hat switch meant digging my arm down onto my leg and flexing my wrist upward. Aha, just raise the stick up higher, right? Well, the idea here was to build a tight little cockpit, and having a joystick way up in my face wasn't going to work (nor did I want to climb in off a ladder from above...). Anyway, I ended up making a platform on the right side, bolting it to the seat for stability. The FCS is held down securely with (what else?) rubber bands. This also gives me a place for the mouse that some games use (I wish I'd provided a bit more room for the mouse, though. And a little more padding on the seat bottom - after a few hours of flying the backside can get kind of numb.)


Video

I picked up a VGA-to-NTSC converter, planning to use an idle 19" color TV for the main viewscreen, with a smaller computer monitor as a "data display". While the fuzziness of the video sometimes makes the simulated displays look a little more "real", and the big screen is nice, text (especially sharply contrasting colors) is nearly unreadable. I found myself looking at the 15" "data display" all the time, and gave up on the TV. (Maybe a 35" with S-video inputs would change my mind...) The converter is still nice for videotaping my antics.

Sound

Here my personal surplus stock ran a bit thin, and I had to spend a few bucks at Radio Shack for speakers and connectors. My stereo sound card output goes to a little box (see the schematic of this either as a gif (4k) or in postscript (7k) format) that low-pass filters a mix of the left and right channels, and gives me an easily-reachable master volume control. The main channels then go through an old stereo and out to a pair of 30W 2-way car speakers. The mixed low-frequency channel goes to a separate power amp (sitting around from my old rock-and-roll band days), and out to a woofer bolted to the back of the seat. Get the biggest baddest speaker that fits your seat and budget if you like really *feeling* those missile launches and explosions. (This works especially well with Descent, which seems to have the most awesome deep explosions - and lots of 'em!)

Framework

I thought about building a complete or partial enclosure for all this, but came up with something a lot simpler - one of those metal storage shelves. Normally, they're about 5 feet tall, but as it happens the vertical supports come in two sections, so I was able to reconfigure it as two 2.5 foot tall units, about 12" x 30". These sit on either side of my legs, with a 3/4" thick board across the front for the monitor. The computer and audio gear sit on the shelves; the rudder pedals are hooked to the bottom shelf to keep them in place. A shelf holds the keyboard in front of the monitor. All the cabling is neatly tied along the shelf framework with lunch-bag twist-ties.

Here's a top view, call it "computer on the half-shelf":

	
	
		+--------+               +--------+
		| shelf  |               | shelf  |
		|        |               |        |
		|        |               |        |
		|        |               |        |
		|        | +-----------+ |        |
		|        | |  pedals   | |        |
		|        | +-----------+ |        |
		|        |               |        |
		|+-------------------------------+|
		|| +-----+  +---------+          ||
		|| | CPU |  | monitor |          ||
		|| |     |  |         |          ||
		|| +-----+  +---------+          ||
		||_______________________________+|
		+--------+ | keyboard  | +--------+
		|spkr|	   +-----------+     |spkr|
	        +----+                       +----+
	                +-+-------------+----+
	     throttle-> |=|             | joy|
	                +-|             |stick
	                  |    seat     |    | <-mouse
	                  |             |----+
	                  +-------------+
	                  \            /
	                   \          /
	                    ----------
	                        ^- woofer

And now, boys and girls, we are ready to rain destruction from simulated skies! It may never be completely done - I'm still tweaking the setup some, but it flies well enough for now. All I need is a second copy of everything, an enemy pilot to strap in, and a null modem cable...

Jack Morrison
jack@robotics.jpl.nasa.gov
Jet Propulsion Lab
MS107-102 4800 Oak Grove Dr.
Pasadena CA 91109


Return to Build Your Own Cockpit