Advertisement

How-To: Real controls for R/C flight simulation


Today's how-to comes from some research for one of our top-secret projects. We'll be loading up a remote control airplane with some customized electronics, and we really don't want to crash it. In todays how-to we'll modify an old R/C transmitter to become a PC joystick so we can fly crash a virtual plane all day and keep the real one from ending up looking like the dummy in Mythbusters. Check it out!


For today's how-to, you'll need:

  • An old R/C transmitter

  • 10k ohm resistor

  • 2n2222 or better NPN transistor

  • D-sub 25 pin solder type connector

  • D-sub 25 pin hood

  • 5~9 volt power adapter or sacrificial USB cable

  • the usual soldering tools


Here's how it works: We get a 'PPM' or Pulse Position Modulated signal from the transmitter. The PPM signal is fed to a 10k ohm resistor which connects to our transistor. The transistor is connected to pin 10 and to the ground at pin 18 of our D-sub 25 connector. To power the transmitter, we add 5 volts or so and a ground. The ground is common to the sub-D 25, so you'll need 3 wires from the transmitter to the D-sub 25 connector. We used some spare cat-5 cable. For our power supply, we grabbed an old AC power adapter from the parts bin, but if you have a spare usb port, you could cut up a cable and get your power from it or tap it from inside your computer. (We drew the power ground as a seperate line, but it also connects to pin 18.)

If you don't like the idea of the parallel port interface, there are several more advanced circuits based on PIC microcontrollers. These will provide serial or even USB interfaces. We like the parallel port interface because it's so simple.


We bought an old Futaba AM 4 channel conquest radio. These are cheap on ebay. If the radio you buy has a 'trainer' port on it, you can just build or buy a cable that connects to the port. Since our old Futaba doesn't have one, we had to open it up to get the PPM signal. We're going to remove the actual radio transmitter, so it doesn't matter if you get an AM or FM unit.


Get out the screwdriver and start taking the transmitter apart. Once you've removed the screws, the back will pull right off. The antenna unscrews easily. We ran our cat-5 through the hole that the antenna used to occupy.

Every manufacturer varies, but on the older Futaba radios, it's easy to get at the PPM signal. This small board on the left side is the actual radio transmitter. It's modular and will unplug from the main board. If you're not sure which is which, the transmitter board is the one that the frequency crystal plugs into. We removed the transmitter board and used a sound card based oscilloscope to identify the PPM signal. The board has been plugged in for years, so it may take some work to break loose. Take your time, be firm and it'll be ok. If not, there's always your happy place.


This is where we soldered our blue and white cat-5 lead to the pin with the PPM signal. To get the connection without destroying the connector, we tinned the wire then laid it next to the pin and melted them together. The main board is flipped over in this shot, but the pin with the PPM signal is the first one at the bottom of the connector. Connect two other leads to the ground and positive power leads that would normally go to the battery pack. Don't forget to insulate them to prevent shorts.


The mod work is completed. Note which wires you've connected to the PPM and power leads. Route the cat-5 through the antenna hole, reinstall the main board and screw the case back together. A strategically placed zip tie will keep the new wire from being yanked out of the radio.


At the D-sub 25 connector, the circuit can be built free-form. Solder the lead with the PPM signal to the 10k ohm resistor. The other lead of the resistor is soldered to the base pin of the transistor. The emitter pin is grounded at pin 18 and the collector pin soldered to pin 10. Covering the exposed parts with a bit of electrical tape will prevent shorts inside the shell. Since we terminated our cat-5 wire at our D-sub 25 connector, we connected our power leads and used the D-sub 25 shell and a zip tie to provide stress relief for everything.


Our completed transmitter joystick came out pretty decent. The cat-5 will take the abuse and we won't have to worry about keeping batteries in it.


There is an excellent piece of free software called Flying Model Simulator or FMS. It's free to download and many people have created the files for importing various models of planes. The graphics aren't anything incredible, but the physics the model world is based on are real enough. There is a downside to the simple circuit we used to build the joystick interface. If you're using an older version of Windows to run FMS, it has support for the parallel port interface. Unfortunately, it won't work for windows XP. Luckily there's a handy utility called PPJOY that will provide a parallel port joystick driver for Windows XP. The developer seems to have gotten cranky at some point, and stopped working on it but we managed to get it working on one of our test boxes. (The home page is on geocities, so you may need to google a bit to download it. You want version 0.83)


Install PPJOY. In your control panel double click the parallel port joystick icon and configure a new joystick using the options above and let windows do its driver dance.


Installing FMS is a breeze, once you do you'll have to configure the joystick. Click Controls and select Analog control.


Select Joystick Interface and click on Mapping/Calibrate.


Click the Calibrate button. Make sure the centering sliders on the transmitter are centered and move the sticks fully around on the controller. The bar graphs will stop freaking out, and you'll see them move very smoothly with the control sticks. Once that's done, click Next. Let go of the sticks so they'll center up and click Finish. Click OK to close the calibration screen.


If the plane crashed while you were busy setting up the joystick, just press the 'i' button to initialize the simulation. Have fun flying... and, uh, crashing.