jump to navigation

NexGen Flight Simulator: Hacking the Navigation Computer Display June 6, 2013

Posted by phoenixcomm in 16 Segment driver, Aircraft, Arduino, CP-1252/ASN-128, DIY Aircraft Cockpit, Embedded CPU's, Ethernet, Flight Simulation, Hardware, Indicator Lamps, Multi Function Display, ps2 keybaord, Semiconductors.
Tags: , , ,
1 comment so far

CP-1252This is the CP-1252/ASN-128 Navigation Computer Display.  The NCD was originally designed for Doppler  navigation, but will work in my application. I have reprinted the Analysis of this from my WordPress Blog (22Apr2011)

The Analysis:  The NCD is comprised of 4 groups: Display, Keyboard, Rotary Switches, and Thumb Wheel Switches.  The Display is comprised of 4 16-segment and 13 7-segment PinLite lamps, and two LED’s.  The keyboard is comprised of a 10 key number pad and 4 special keys, it also encodes A-Z. There are two rotary switches, and two thumbwheel switches as well. I also found a users guide, TM-1-1520-238-10 pages 3-34 through 3-46 on the web.

In it’s dim past it had been converted to a flight sim, and the only thing left whrere: the display, switches, light plate, and lots of wire. Each component, had each of their connection(s) brought out in to a header.

The Plan: As it is almost impossible to find a 16-segment display driver, but I really found two parts MAX6954 (SPI and QSPI interface), and MAX6955 (I2C interface). Both devices have the same programing model and have a I/O expander which could handle the keyboard. I have chosen to use the I2C interface. I have broken down the NCD into the following sub-units:

  • Two MAX6955AAX+ :
    • one will handle the 4 16-segment displays.
    • one will handle the 13 7-segment displays.
  • The keyboard will be interfaced via a standard Ps2 keyboard encoder that will be harvested from an old ps2 keyboard.
  • I will also need 2 bytes of I/O as well:
    • 1 byte of output to handle the two rotary switches, via two priority encoders (74LS148).
    • 1 byte for both thumbwheel switches (they are encoded to 4 bit BCD).
  • And lastly I need a USB interface to talk back to the IOP (IO Processor)

I also need a embedded microprocessor, the NCD information does not need to be super fast, as in reality it is only a dumb terminal, so an Arduino should be able to keep up with everything, if there are speed issues I will most likely switch to a TI Stellaris Launchpad module.   The NCD is either taking keystrokes from the pilot, or updating the display. In the words of the Outer Limits “There is nothing wrong with your television. Do not attempt to adjust the picture. We are now in control of the transmission. We control the horizontal and the vertical”. In the scheme of things this unit will only be another end point on the IOP which is sending the key strokes or and knob turns to the simulation processor. And in turn the NCD in effect listens to the NavGroup via the IOP for present positiontime to go etc.

 Keep Tuned in More to Come!

NexGen Flight Simulator Blog Index

NexGen, Understanding Synchros April 29, 2013

Posted by phoenixcomm in DIY Aircraft Cockpit, Hardware, Software, Synchro.
Tags: , , , , , , , , , , , ,
add a comment

There are many types of synchros, Rx, Tx, and Resolvers  But what you have to remember that they are all just motors.
Synchro Diagram As you can see this is really just a 3 phase motor, that is the three (3) Stators, are 120 degrees apart. But you ask what is the Rotor winding for? Well if you look at the picture of your cars Alternator Diagramalternator with out the diodes it kind of does the same thing as the Drive winding on the alternator. So if you took the diodes out of the alternator, and you put a 400 Hz sine wave on the Drive winding, remember you have to spin it, you will get 400 Hz 3 phase power, just what I need for my plane.
Duh Now What?? 😕
So now I have you all thoroughly confused. Right?
In a perfect synchro world you will have a Tx (like on a flap), and the Rx (in the cockpit) which is inside a indicator, both Rotors are driven in parallel  So when the flap is moved the changes on the 3 Stator, windings are impressed from the Tx, to the Rx and if by magic the needle in the indicator moves with the flap.
I will not bore you with the math behind this, but this is a question?

What would happen if you put on the 3 Stators, a 400 Hz  3 phase, that is each one of the phase are 120 degrees apart, sine wave???

But wait, what about the rotor?? Ok that’s the key. Remember what we did with that alternator? We do the same thing here. But we don’t have to spin the synchro, we spin it, or move it electrically!

Digital Resolution of Angular Displacement
Bits n2 Degrees BAM
1 2 180 32768
2 4 90 16384
3 8 45 08192
4 16 22.5 04096
5 32 11.25 02048
6 64 5.625 01024
7 128 2.8125 00512
8 256 1.40625 00256
9 512 0.703125 00128
10 1024 0.3515625 00064
11 2048 0.17578125 00032
12 4096 0.087890625 00016
13 8192 0.043945312 00008
14 16348 0.021972656 00004
15 32768 0.010986328 00002
16 65536 00001

Remember those 3 phases that you put on the Stators well if we call the unshifted signal the reference and you apply it also to the Rotor winding. Your indicator should point to 0. Ok so far?
Now if you phase shift the signal 90 degrees on the Rotor winding your indicator should move to 90 degrees.
Wow this is simple shit, right?
Lets get down to business. You can see a with your eyes about a ½ degree movement. Don’t believe me look at your analog watch’s second hand. 1 second is 1/60 of a circle. So you need about 1/10 of a degree so the indicator will float. So by checking the table you will see you only need 12 bits of resolution. I have also indicated a column for 16 bit BAM, as they are much easier to deal with, than degrees. And I don’t have to use the Trig functions. To understand how to calculate the BAM please look at the link below. One more thing about a BAM it only represents part of a circle. I know I hear the question but we only need 12 bits so why use 16 and through away 4 bits? Well remember the is a computer and it likes things in 8 bit chunks, so getting a 16 bits on a 32 bit embedded CPU is no problem.
Here are two 16 bit functions, I wrote them as that is all you will need:

#define TO_BAMS16(x) (((x)/360.0) * 65536)
#define TO_DEGS16(b) (((b)/65536.0) * 360)

**You will notice that I wrote them as a #define as I let the preprocessor take care of it, rather than making them a formal functions, in that way I can avoid the call and return time. You will also notice the 16 at the end of the name, as I also have 32 bit versions of the functions. The 16 bit version is fine for the instruments  but with the 32 bit version, I can resolve down to a postage stamp size any where in the world!

ARINC 410 Interface subsystem, Continued March 2, 2012

Posted by phoenixcomm in Arduino, ARINC 410, Audio, DIY Aircraft Cockpit, Ethernet, G-4390, Gables Engineering, Linux, Radio Sub System, Relay, Semiconductors, Software.
2 comments

More information and gotchas:  

Interface Specification:  Remember I said that that the ARINC-410 has 5 bits?  That means our Bus_0 through Bus_4 is the ARINC-410 A throgh E.  Now I can use Bus_5 for Read/Write (the write is Low Active). Ok that only leaves one more,  Bus_6 and I’m going to use it for a strobe. I can do that with a Schmitt Trigger.  Now I did say that was all, but hey what about a reset line?? I don’t know if I need one but we can use Bus_7, and that gives us all 8 bits in the interface.

Outputs:  Well what are our outputs?  The table below shows the standard outputs, that is what the interface has to drive.

Function Voltage Notes
Panel Lights 28v
Dial Lights 28v
DME Lamp 28v Only on NAV

We read the position of the power switch in the status register. But it would be nice to drive all those fault flags.  So how do you drive 28vdc from TTL? There are really 4 ways:

  1. High Voltage Inverter Buffer/Drivers; such as 5406, 5416, 7406, 7416. But have no voltage immunity.
  2. Relays; You still need to drive them, that is the coil.
  3. Optoisolator;  such as TIL111. My personal choice for driving HV loads, and there good for 70volts..
  4. Solid State Relays; SSR’s are robust, and can handle both large currents and high voltages.. You can find used ones on ebay.

Audio:  The Gables Radio’s have Volume IN-HI, IN-LOW, OUT-HI and OUT-LOW. This will be a headache  that I don’t want to deal with in this post. But we still need to handle the audio some how. This leaves two choices:

  1. Do what Microsoft Flight Simulator and others do. Just ignore it.
  2. Lets build an audio sub-system.  The benefits really starts to shine when you have more that one position to fill.. ie. pilot, co-pilot, navigator, weapons officer
    • If you fly VATSIM their audio is now on a channel, on the COMM head.
    • We now can simulate Morse Code signals & DME milage station on the NAV head. More later as this will dictate other changes, like outputs to drive from-to flags, etc.
    • You can chain the audio outputs.
    • You can have the same audio at the instructors console.
    • You can record the audio for play back.

Looks like we need a part 3 later..

Driving those pesky indicators. December 30, 2011

Posted by phoenixcomm in Arduino, Boeing 707, Boeing 727, DIY Aircraft Cockpit, F-18, Flight Simulation, Indicator Lamps, Power Systems, Relay.
add a comment

Well here we are again, and I am having to drive multiple of voltages for my indicator lamps…. This can be a pain in the rear… Let me see I have  5 volts, 12 volts, 28 volts. Take your pick..

You have several choices:

  1. Do nothing, just buy lots of power supplies.
  2. Change out all the lights to one voltage. (big bucks)
  3. Something else maybe?

Me I’m out there anyway so I’m going with you guessed it: ‘C’.

The Analysis: First a little background…
Rule #1:  Computers Logic (TTL) does not like voltages over 5 volts dc.
So how do you drive a 28 volt lamp from a computer?  There are several ways..

  1. Relays..(ADVANTECH PCLD-785B with 24 relays) This card retails for $240.00. Or you can find them used for about $50.00 on ebay. This tends to be some what costly as you have to buy the boards and then a driver for them. It’s more than little kludgy with tons of wire screwed down, on barrier strips. But it does work and its bullet prof. But remember all those power supplies.
  2. HEX INVERTER BUFFERS/DRIVERS WITH OPEN-COLLECTOR HIGH-VOLTAGE OUTPUTS SN5406 and SN7406 have minimum breakdown voltages of 30 Volts DC. But when they fail it could put raw 28 volts on your computer! Ouch!
  3. Optoisolator I like a little 6 pin dip a TIL111 will handle 0 to 30volts DC with TTL inputs.  If  you want you can buy them at Digi-Key for about 18 cents each, and if you look around you can buy them cheaper else where.   Add a few parts for decoding and latch, you can drive all of your lamps.

So lets see 18 cents x 64 optoisolators is less then $12.00. This means that with just 16 cards you could drive 1024 lamps…  But wait a minute I said DC right? (Who said we had to drive the lamps with AC). Now that we have DC you can easily create a divider or regulator for you lamps from one 28 volt power supply.

Arduino Trials and Tribulations, Part 1 April 30, 2011

Posted by phoenixcomm in 16 Segment driver, Arduino, DIY Aircraft Cockpit, Flight Simulation, Linux, ps2 keybaord, Software.
Tags: , , , ,
add a comment

Well I finally got my Arduino Duemilanove and prototype shields, there should be a Ethernet shield, and a LCD shield on its way. I wanted to try and use it on my Navigation Computer Display. To my horror I noticed that you could not stack on top of the prototype shield!

This really stinks I picked them up on ebay. I am going to have to modify the shields, grrr. I found the stacking headers at Adafruit for $1.50 per set.  Not bad.

The Analysis    I need to light four 16 segment lamps and thirteen 7 segment lamps, plus two lamps which will be bi-color leds. So thats lots of wire. My choice  of 16 segment display decoders are far and few between. The first one I looked at was an intersil ICM7243 interfaces with most microprocessors right on its memory bus. but can only handle 8 characters. So I would need two of them plus more glue to handle the last 7 segment display and the two lamps.  The next victims are the Maxim Max6954 with 4 wire interface, or the Max6955 with I2C interface. Other wise they both share the same specifications: They will drive up to 16 displays with mix of 7, 14, or 16 segments. It also has five GPIO pins that can be configured as a keyboard with up to 32 keys with n-key rollover, and built in debounce. The only down side is that they have eighteen  registers to configure the part.  I also need to interface the 2 rotary switches, and well as both thumb wheel switches.  I want to use a ps2 keyboard for testing the display system.

The Plan: Testing    I just go in two of the Max6955AAX+ in 36 pin SSOP package, and my eyes are to old, so I found Proto Advantage not only do they have a great price for the adapters plus they will mount the parts for me. In the meantime I happen to have a Max6954 in a 40 pin PDIP package. I will put it on a breadboard and wire it with a few displays and try to figure out the driver that I will need. – later

%d bloggers like this: