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!

%d bloggers like this: