Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 53
  1. #21
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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

  2. #22
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    Finally got a picture to post for everyone to see.
    Attached Images Attached Images

  3. #23
    300+ Forum Addict



    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    380
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    Quote Originally Posted by 737NUT View Post
    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.




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

  4. #24
    300+ Forum Addict



    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    380
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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.

  5. #25
    75+ Posting Member davek's Avatar
    Join Date
    Jan 2008
    Location
    FNQ Australia
    Posts
    126
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    is this thread in english ?

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

  6. #26
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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.

  7. #27
    300+ Forum Addict



    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    380
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    Quote Originally Posted by 737NUT View Post
    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.

  8. #28
    500+ This must be a daytime job 737NUT's Avatar
    Join Date
    Feb 2006
    Location
    Indianapolis, IN
    Posts
    761
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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.

  9. #29
    300+ Forum Addict



    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    380
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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.

  10. #30
    300+ Forum Addict



    Join Date
    Feb 2007
    Location
    California, USA
    Posts
    380
    Contribute If you enjoy reading the
    content here, click the below
    image to support MyCockpit site.
    Click Here To Contribute To Our Site

    Re: Interfacing real 727 eng gauges

    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?

Page 3 of 6 FirstFirst 123456 LastLast

Similar Threads

  1. Interfacing a real GPS with FSX?
    By Shawn in forum General Builder Questions All Aircraft Types
    Replies: 7
    Last Post: 02-21-2009, 01:39 AM
  2. Interfacing real radios with SIOC
    By sja in forum Interfacing Real Aviation Parts
    Replies: 6
    Last Post: 02-12-2009, 10:32 AM
  3. Interfacing real radios with SIOC
    By sja in forum I/O Interfacing Hardware and Software
    Replies: 6
    Last Post: 02-12-2009, 10:32 AM
  4. ideas on interfacing real 737 start switches ?
    By dnoize in forum I/O Interfacing Hardware and Software
    Replies: 5
    Last Post: 08-20-2008, 08:47 AM
  5. interfacing real yoke trim switch with IO cards????
    By steve diamond in forum I/O Interfacing Hardware and Software
    Replies: 3
    Last Post: 08-29-2006, 04:23 PM