[simpits-tech] Controlling synchros

Simon Bennett servantofcthulhu at hotmail.com
Wed Jun 1 20:22:59 PDT 2005


>	Man, you've bitten off quite a big piece here. :) Powering/controlling 
>real
>instruments is not known as one of the easiest things in sim building. Good
>luck on it, though. Have you decided on how you're going to control your
>stepper motor (or whatever other device you decide to use to drive your
>torque transmitter)?

I like a challenge.

The stepper motors will be controlled by a PIC microcontroller, which 
communicates with the FS2004 via the serial port.

>	Since you're going to be driving instruments, I assume you're digging into
>the programming aspect of things..what sim are you using? Depending on the
>sim, you may be able to go a step further and set certain sim variables 
>based
>on switch state (this is a lot more straightforward when using joystick
>buttons as opposed to keystroke events, however). This would mean if a 
>switch
>is in the "on" state, the respective sim function would always be "on" as
>well. You wouldn't have to sync up the sim's internal functions to switch
>positions every time you run it.

Unfortunately this is probably the only way I can really do this with just a 
keyboard port connection. I intend to create my own 
microcontroller-controlled keyboard interface which will handle all of this, 
but that will have to wait. The ex-keyboard controller is only a temporary 
solution.


I'm using FS2004, for sure, and possibly LOMAC or Falcon 4, eventually. I 
plan on having the sim hardware being totally independent of the software. 
All of the gauges, switches, lights, etc. are to be managed by a second PC. 
This box will run FreeBSD as an operating system since I hate windows and 
the windows API with a passion. It also frees up resources on the main sim 
computer, since all it has to do is swap a few bytes back and forth across 
the LAN. The second PC communicates with the cockpit electronics over the 
serial port. The cockpit electronics tell the 2nd computer when a switch has 
been pressed. The 2nd computer then decides what action to take and 
communicates with the main sim computer either directly over the LAN, or if 
that isn't possible, by telling the homemade keyboard interface to send a 
command in the form of a keypress.

All of the cockpit electronics will be PIC microcontroller based. I'll 
probably use mainly 16F88 chips, since they are cheap, packed with neat 
features, and pin-compatible with the ubiquitous PIC16F84. I'll have to 
design my own data bus and break everything down into systems and 
sub-systems to keep everything moving in the right direction.

If I opt for MFDs or a working HUD, I have a couple 386 laptops that would 
be more than able to drive the displays.

When this system gets built depends on the amount of time I have. I have a 
lot of parts I have to order from digikey. I have already begun writing the 
software. All of the PC stuff will be written in C++, the PIC code in 
assembly.

For the individual console panels, I originally thought each one was going 
to have to have its own microcontroller, but now I'm not so sure. I was 
worried that a single microcontroller wouldn't have enough I/O pins to 
handle even a single panel full of switches or lights, but it didn't take me 
long to think of a way around that. For a panel with a lot of switches, like 
an audio panel, I can just put each set of 8 switches behind a latch or a 
buffer or something, and have a counter to turn them on and off, cycling 
between them. If I use 8 I/O pins on the PIC for switches, and 4 to select 
the set of switches, I could have up to 128 switches running off of a single 
microcontroller. My original idea was to have a line encoder like a 74HC148 
to send a binary signal to the PIC when a switch was triggered, but this 
wouldn't let me tell whether the switch was on or off at any given time.

For output to LEDs or the like, for, say, an annunciator panel, I could just 
use the same approach only have a few latches to keep track of whether the 
light should be on or off. Hmm.


So this is what I get for not having any money for an EPIC card. Well, it's 
more fun to do it yourself, anyway.

Sorry for the rantyness.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



More information about the Simpits-tech mailing list