PDA

View Full Version : Interfacing real 727 eng gauges



737NUT
12-08-2009, 01:04 PM
This is a continuation of a discussion that started in this thread.
http://www.mycockpit.org/forums/showthread.php?p=95114#post95114


I was thinking about breadboarding a simple 30 Hz square wave oscillator and connecting it to the tach input. You could scope the signal to see if the tach is loading the oscillator too heavily. Based on what we see we revise and retest.

We can build an oscillator with parts like a LM555 or almost any general purpose opamps. Have any parts floating around?

Mike,
I should have enough parts to do it, if not i can get them locally.

Rob

Mike.Powell
12-08-2009, 01:29 PM
Okay, I will cobble something together, verify it works, and post a schematic.

737NUT
12-08-2009, 01:55 PM
Okay, I will cobble something together, verify it works, and post a schematic.

Ahhh my favorite word, cobble! lol Thanks!

Mike.Powell
12-09-2009, 12:40 PM
http://www.mycockpit.org/photopost/data/536/Gen555.jpg
This is a basic 30HZ oscillator that produces a 0 to 5 volt square wave.

In the best of cases, connecting A to the tach input will cause the tach to display 2100 RPM (+-). If so, interfacing is really easy. If not, we'll try removing the DC component from the square wave.

In any case, the idea is to connect the powered-up tach to the A output and observe the waveform on the tach input with an o-scope, noting the voltages of the high and low parts. Also note any waveform distortions that occur when the connection is made.

Repeat this with the B output and the C output.

These measurement will let us calculate the loading the tach presents to the signal.


Edit: the unlabeled ground pin on the 555 is pin #1.

737NUT
12-09-2009, 02:37 PM
Thanks Mike, ill report back my findings asap.

737NUT
12-19-2009, 12:02 AM
Hi Mike,
Got the gauges and some testing done. When i hook the gauge up to the output the 0-5v output from the oscillator drops from 2.9 down to 2.6V and freq is locked in at 24Hz. O-scope showed no change in shape, just the drop in voltage that was verified with the Fluke. Needle did not move at all on the gauge. Tried both gauges. I also got an EGT gauge so i will e-mail the company and see if i can get the pin-out but i'm sure it will be the same other than the input which should be standard mil-spec for thermo-couple

Mike.Powell
12-19-2009, 12:39 AM
Ah, data!

Your measurements were done on the "A" terminal?

How about "B" and "C"?

Your voltage measurements were done with the Fluke? What settings?

Do you know if the gauge itself is actually functional?


If the gauge is functional, its lack of display activity implies that we need a signal that swings around zero volts. Once we have the "B" and "C" measurements we can calculate an input resistance and determine how to modify the oscillator.

737NUT
12-19-2009, 01:20 AM
Mike,
I got it working!! Sort of, bear with me here. I downloaded this free software, free tone generator.

http://www.nch.com.au/tonegen/index.html?gclid=CNSokdnU4Z4CFQjyDAoddhBIOQ

I opened up a set of usb powered speakers, cut the lead off one of the speakers and ran it to the gauge. It worked! 70Hz put 99.9%on the gauge, i can change it 1% increments and the gauge responds everytime. It worked only in a sq wave pattern and it worked best at a setting of 1000ms and above pulse length. My O-scope to a crap on me so maybe if you DL that software and hook your o-scope to a pc speaker like i did it might help you. I did get these readings with my fluke,
at 70Hz sound card output, the speaker leads were showing 163mV ac and 350Hz at
17Hz output we had 81mV and 89Hz on the fluke. The gauge is working perfect right now so i hope this helps you? Let me know what else i can do.

737NUT
12-19-2009, 01:33 AM
Let me add a little more, the software has the capability to output a sine, Sq, sawtooth, triangle wave. You can adj the freq. and the volume has to be all the way up.

737NUT
12-19-2009, 09:37 AM
I have both the N1 and N2 working with the speaker output from the PC and the audio generator. I sent out e-maills requesting info on the TGT gauge. It has the same amount of pins and i am going to assume it will be the same pin-out just needing a different input signal. These gauges are SWEET! Analog and digital mix is cool!

Matt Olieman
12-19-2009, 09:58 AM
Fantastic information Rob..... Thank you :) :) :)

Mike.Powell
12-19-2009, 01:10 PM
Okay, at this point we know the gauges are functional, and that they require a signal that swings around 0.

We still need to know the input resistance of the gauge. We can get this by using the test oscillator even though it doesn't trigger the gauge. When the gauge is hooked up to the "B" output, what are the voltages at "B", and at the gauge input?


If the input resistance is not too low we can use a transistor and a few resistors to convert a digital signal to one that swings around 0. If the input resistance is too low, we'll need something a bit more complex.

RadarBob
12-19-2009, 02:03 PM
Nice work chaps.

Pity your scope is playing up Rob - Just when you really need it!

Interesting that sine at 30Hz doesn't work.


Cheers,

Rob

737NUT
12-19-2009, 03:08 PM
Ok Mike here you go,

Source V = 6.4V

Output no load = 3.1V 32Hz

A= .4 drop to 2.7V

B= .5 drop to 2.6V

C= .6 drop to 2.5V

737NUT
12-19-2009, 03:09 PM
Nice work chaps.

Pity your scope is playing up Rob - Just when you really need it!

Interesting that sine at 30Hz doesn't work.


Cheers,

Rob


Exactly what i thought! Could be more to it im sure as im no engineer. lol

Mike.Powell
12-20-2009, 06:54 PM
I calculate the tachometer input resistance to be 18,750 Ohms. This is high enough that we should be able to drive the tach with a relatively simple circuit.

[The method of calculating the input resistance isn't difficult, but the description is wordy, so I left it out. However, if there is interest, I would be happy to post it.]

Your success with the audio signal indicates that we will need a signal that crosses over 0 rather than simply pulsing a positive voltage.

As a next step, I'd like to try a modification to the test oscillator. The addition of a transistor and a pair of resistors produces an output signal that bounces between +5 volts and -5 volts.

Connecting the tach input to "D" should result in a mid-scale reading on the gauge.


http://www.mycockpit.org/photopost/data/536/genv2.jpg

737NUT
12-28-2009, 09:42 AM
Mike,
It worked! I used a pot in place of the 200K resistor and was able to control the gauge perfectly with your circuit. I added another 555 to get my -5v and 70hz output gave us 100% on the gauge. Now what is our next step?
Thanks,
Rob

Mike.Powell
12-28-2009, 12:36 PM
Rob,
There are a number of options. We could hang a microcontroller off the serial com port and have it generate the tach signal. We could perhaps make use of existing interface gear you already have. For example, if you have an interface that produces a 0 to 5 volt output, we could develop a voltage to frequency converter. Do you already have some sort of interface gear?

737NUT
12-28-2009, 12:56 PM
Mike,
I have some opencockpits servo driver boards right now. We would need to convert the pwm signal from that to operate the gauge. That would be the easiest to program for me as I can account for slope and intecept angles of the gauge with that software. The PIC on the serial port interest me as well but i'm not familiar with programming them. I found a very small PWM to analog signal http://www.bpesolutions.com/bpemanuals/servo.to.analog.pdf
but nothing for a PWM to frequency. my idea is, if possible ,I would get the boards made by pcbexpress or similar, make it a cat5 style hook-up from the gauge to interface. Thaoughts, comments or other ideas? Also for the record, i am just a hobbiest electronics guy with basic understanding and not an engineer. :) I do learn quick and self teach myself allot which almost always cost more in both time and money. (in destroyed parts) lol

Thanks,
Rob

Mike.Powell
12-28-2009, 10:01 PM
The PIC on a serial port is easy to do. It's an adaptation of the stepping motor gauge tha's posted as a sample chapter. The stepping routine would be replaced with a variable frequency oscillator routine. A transistor would be added similar to the one used on the 555 test oscillator.

However, as you already have the OpenCockpits servo board, I'm toying with a different idea. The thought is to take the variable pulse width RC servo control signal and run it into a dedicated PIC. The PIC measures the pulse width then creates a square wave output at a frequency proportional to the pulse width.

737NUT
12-29-2009, 11:35 AM
Could i also use the PIC to drive my EGT gauge? I did some testing on it, looks like 0 to 100mV will do ion the signal side.
Rob

737NUT
12-29-2009, 12:21 PM
Finally got a picture to post for everyone to see.

Mike.Powell
12-29-2009, 06:53 PM
Could i also use the PIC to drive my EGT gauge? I did some testing on it, looks like 0 to 100mV will do ion the signal side.
Rob

I think we could use a very similar approach.

Here are my current thoughts on the RC servo to tach adapter:

This is based on using a PIC 16F648A. They're cheap and I've got a couple on hand to play with. We connect the RC servo control line to the external interrupt input on the PIC. We clear PIC timer2 which is 16 bits wide. We enable rising edge interrupt on the int input. Whe we see an interrupt we turn on timer2 and enable a falling edge interrupt on timer2. When we get an interrupt we turn off timer2. The timer2 contents is now a measure of the RC servo control pulse width.

The pulse width varies between about 900 and 2100 microseconds. We subtract a number from the timer2 count to remove the 900 microsecond offset. We now have a number from zero to something proportional to 1200 microseconds. This is now the number we want to control the frequency of the output tachometer signal.

Let's skip ahead to the ouput signal. This is a square wave that varies in frequency between 0 and 77Hz. We'll make this by setting PIC timer1 to interrupt about every 26 microseconds. Each time it interrupts we'll decrement a variable by 1. When it hits 0 we'll complement the tachometer output signal and reset the value of the countdown variable.

The value of the countdown variable is related to the period of the tach control signal. The value we made using timer2 is proportional to the frequency. To get the countdown value we'll have to divide the timer2 value into a constant value. Its value will depend on how we clock the timers.

The arithmetic operates on numbers larger than 255 so the code will deal with multi-byte variables.

Here's the rough hardware design the code will run on. We should be able to pull power (+5) from the RC servo controller card. I'll add the -5 volt inverter later.

http://www.mycockpit.org/photopost/data/536/ifcv1.jpg


Totally off topic: I saw Avatar http://www.avatarmovie.com/ yesterday. Wow!:shock: I would really like to find a "Sampson" helicopter flight model and some Pandora scenery.

Mike.Powell
01-04-2010, 12:30 AM
A brief update:

I've written PIC firmware to convert a standard 0.9 to 2.1 millisecond RC servo control pulse to a 0 to 77 Hz square ware. It more or less works in the PIC assembler simulator. Next step is back to cobbling hardware together.

davek
01-04-2010, 02:35 AM
:shock: is this thread in english :oops:?

Great work guys. That gauge looks excellent when fired up... you realise we will all want them ... :-D

737NUT
01-04-2010, 10:55 AM
Sounds good Mike. I'm trying to see if i can program the pic thru my OC card. What part number PIC do you use? Want to see if it is the same as the one they use as i have a spare one.

Mike.Powell
01-04-2010, 02:13 PM
Sounds good Mike. I'm trying to see if i can program the pic thru my OC card. What part number PIC do you use? Want to see if it is the same as the one they use as i have a spare one.

It's a PIC16F648A.

737NUT
01-04-2010, 02:39 PM
How many gauges can one PIC drive? Thanks for the info and again for all the help. The gauges have been working well on the bench over the holidays. No issues so far. Also, i forgot to mention that the servo card has 1023 step resolution but that shouldn't affect the the PIC programming correct.

Mike.Powell
01-04-2010, 04:52 PM
It's one gauge per PIC. Jameco sells them for $2.25 each.

The bulk of the firmware can be used for the EGT adapter, assuming you plan on using the OC servo card for the EGT as well. The portion of the firmware that generates the square wave output can be replaced by code to generate a 0 to 100% pulse width modulated output. Perhaps the way to go is to put both functions in the firmware and have the PIC choose which to do based on whether an input pin is high or low at reset time.

Mike.Powell
01-06-2010, 11:29 PM
Okay, the PIC is doing its thing. I'm simulating an RC control pulse and the PIC is making square waves with a frequency that varies linearly with changes in the servo control pulse width.

What's our next step? Can you program a 16F648A from a hex file? Should we port the code to a different PIC? You want me to program them?

Mike.Powell
01-07-2010, 08:08 PM
Here's the complete schematic for the tachometer adapter. The conversion process happens inside the PIC. The 555 chip is used as a voltage inverter to make a nominal -5 volts (actually closer to -4) so the final tachometer signal swings below as well as above 0 volt.

http://www.mycockpit.org/photopost/data/536/ifcv1_1.JPG

Rob's working on a circuit board. Once he pulls that together, we should see some nice pix of a working A/C tach under the control of an OpenCockpits servo card.

Mike.Powell
01-09-2010, 10:45 PM
Rob and I have been bouncing printed circuit board layout ideas back and forth. Here's where we are now. This is a triple RC servo control pulse to real A/C tachometer adapter. I don't think we'll build this particular version. Converting one of the adapters to an EGT adapter might be more useful.

http://www.mycockpit.org/photopost/data/536/tacifcboard.jpg

737NUT
01-10-2010, 02:47 PM
This has been a very fun and educational project for me and can not say enough thanks to Mike for all his help!!! I am looking forward to the next challenge in my quest to use as much real stuff as possible. To me, this has become almost more fun then flying, almost! :) This is my first time using PCB software and PIC controllers and my next goal is learning to program the PIC's. I plan on using Mike's synchro driver pcb project as well to drive the EPR gauges. Whats neat about this project is that we proved that the gauges could be driven by 2 different methods and actually 3 if eliminated the servo card interface. Fun stuff!!

RadarBob
01-10-2010, 05:26 PM
Nice work Guys - Knew you would get there in the end!

Cheers,

Rob

Melnato
01-11-2010, 04:16 AM
Mike/Rob...I am REALLY intrugued by the work you have done with these gauges...I just wish I understood what you were doing :)

Is any real gauge "interfaceable"? I'd love to do an RMI, Artificial Horizon and Altimeter (737 style what else)...
Are the above 3 gauges easy/hard/impossible?????

Any feedback appreciated.

Cheers,

Nat

737NUT
01-11-2010, 10:20 AM
Mike/Rob...I am REALLY intrugued by the work you have done with these gauges...I just wish I understood what you were doing :)

Is any real gauge "interfaceable"? I'd love to do an RMI, Artificial Horizon and Altimeter (737 style what else)...
Are the above 3 gauges easy/hard/impossible?????

Any feedback appreciated.

Cheers,

Nat
Absolutely! I just did a real 737 VSI, it was easy! See my post. An altimeter is next then the RMI and ADI. Look for more updates. With SIOC and OC cards and Mike's books, ideas and help it's all possible. Im no engineer, just a hobbiest electronics guy.

Melnato
01-12-2010, 06:01 AM
Thanks Rob!

Keep us posted on the altimeter and RMI...

I have NO..ZERO... SIOC experience...should I bother?

Nat

737NUT
01-12-2010, 12:00 PM
Thanks Rob!

Keep us posted on the altimeter and RMI...

I have NO..ZERO... SIOC experience...should I bother?

Nat

There are enough examples and code out there for anybody to learn and get started in. I self taught myself by looking at other codes and expierementing with codes of my own. Not overly difficult, just takes us non-programmers longer to do. :)

737NUT
01-14-2010, 10:25 AM
Just a quick update on the project status. I placed an order for all the electrical components so as soon as they arrive i will assemble a test set-up and hook to sim. Will report back soon!

737NUT
01-14-2010, 11:13 PM
SUCCESS!!!!!!!!!
Got all the parts in today so breadboarded up a temp cicuit with the PIC from Mike and hooked to my OC servo card. Firgured out the slope and intercept angles,quick program in SIOC and PRESTO! The real gauge matched the sim perfectly!! YEA! So cool seeing the needle and digital read-out working with the sim. Amazing what you can do with such a small IC chip. and a few cheap components! Thanks to Mike Powell and David Allen for all the help. Will post a video once i find a loaner camera.

Melnato
01-14-2010, 11:23 PM
Great new Rob!

How do you get the gauges to work IF they dont have FSUIPC offsets?
Or have you been lucky enough to have offsets for your gauges?
Can you program functions in SIOC that normally dont exist???

Confused and envious...:)

Nat

737NUT
01-14-2010, 11:34 PM
Great new Rob!

How do you get the gauges to work IF they dont have FSUIPC offsets?
Or have you been lucky enough to have offsets for your gauges?
Can you program functions in SIOC that normally dont exist???

Confused and envious...:)

Nat

Thanks! FSUIPC offset 0898 is Eng 1 N1 rpm. Nothing hidden or special. I used the calculations for my set-up and programmed sioc accordingly. See this site, http://www.baron58.com/Servo_Calc.htm

So with that info and Mike's PIC knowledge, this project was a sucess and very affordable considering the price of simkits.. I'll take real stuff anyday. :)

Melnato
01-14-2010, 11:47 PM
OK so as long as there is an offset, you can pretty much control any real gauge...unreal

Nat

LH784
01-15-2010, 04:28 AM
Unbelievably impressive, really "wow" :-)

Nat: there are Offsets listed for most engine parameters, for 4 engines. You get no Offsets for the APU, but as far as you are looking for N1, N2, EGT etc they are there - see Pete's FSUIPC documentation. So principally it should indeed be possible to get the whole engine stack populated (anyone, please correct me if I'm wring, but after this thread I think almost everything is possible).

Rob: If you could post some pics, also about how you actually interface the gauge with the wires. And does it automatically convert the incoming signal into both the index and digital readouts ?

Once again: congratuilations to "the team",
Florian

737NUT
01-15-2010, 09:31 AM
I'll pull apart one of the gauges this weekend and take pictures for everyone. The incoming signals are a TAch signal generated by the PIC and the gauge has it's own internal processors which drive the pointer and the digital display. What made this project MUCH easier and even possible at all was the fact i was able to secure the actual build and design specs from the company that made the gauge. The dial is actually driven by a stepper motor inside the gauge. Neat stuff! There was no need to reverse engineer this gauge do to having all the pertinent info.

737NUT
01-22-2010, 11:35 AM
Have a video made of the gauge working but it is in Avi and i can't upload it. Can anyone host it? Thanks Rob


-----------------------------
Link to Video HERE (http://www.mycockpit.org/photopost/showphoto.php?photo=5282&title=727n1test&cat=662)
-----------------------------

737NUT
01-22-2010, 11:43 PM
Here is a picture of the PCB i got today and all the components installed and working.

Melnato
02-08-2010, 04:20 AM
OK making the needle move is impressive enough...
but the digital read out too!!!!!!!!!!!!???????????

Nat

727-JCK
06-24-2011, 05:54 AM
Hi Rob,

I came accross this thread while looking for something completely different and, all out of a sudden, I realized that you guys just made my day!!! I'm awestruck. Congratulations to this great work!
A couple of month ago I still thought that I was pretty much alone to be crazy enough to try to interface real instruments. Today I see that you takkled the same probelm that I have since some weeks: I'm trying to put together and interface a 727 main instrument panel with original gauges and I was lucky enough to get the chance to buy a whole engine stack with these instruments you also have: 3xN1, 3xN2, 3xTGT and 3xPR. Since then I was looking for some documentation on these gauges. Since you were already so successful, I'd have two questions:
I saw that you posted already the documentation for the N1 gauge. Did the company send you also the docs for the other gauges? If yes, would you do me a great favour and share them? I'll happily share documentation fom my archive in case you need some...
Then, since more than a year passed since the last post: What are your experiences in the meantime? Did you stay with the setup as posted, or did you do some more fine tuning?

As a matter of fact, this is my first post in a forum what so ever. I hop this arrives where it should. In case I'm missing out on something, I'm always happy to learn...

By the way, will anyone of you be in Le Bourget for this small club meeting of aviation ethousiasts his WE? I will, so maybe see you there.

Congrats again to all of you and best regards,

Jens

737NUT
06-24-2011, 10:54 AM
The N2 gauge is identical to the N1. I have the pin-out for the EGT gauge. Give me your email address and i will send it to you. Glad this has helped you out. Make sure your power supply ground is shared with the instrument ground. Other than that, it is trouble free.

Rob

727-JCK
06-28-2011, 10:18 AM
Hi Rob,

thank you for your feedback! I sent my mail address to your private inbox for the EGT documentation. Did the company also send you the documentation on the EPR indicators? I'd still need to interface these and the fuel flow gauges. Do you have any details on these ones?
I also asked Mike about the PIC code for the N1/N2 indicators, but he lost it when his computer crashed. Do you still have it?
Sorry for asking so much at a time, but I will of course post all my progress and hints I might find during the process of interfacing my 727 MIP, so you guys have something of this too.

Thanks and best regards,

Jens

LH784
07-07-2011, 05:28 AM
Hi all,

have you got the PIC code for the N1/N2 indicators ?
If so, you you post it or PM it ?
Would be great.

Also: what kind of a power source is used that supplies both 24 and 5 V ?

Thanks,
Florian

EAL727Capt
12-28-2014, 04:00 PM
I am just now starting to set up my B727-200 engine gauges and want to do the exact same as done here.
Has there been any updates or progress to report?
Thank you very much!