Cockpitbuilders.com

Main => Builders Discussions => Topic started by: Flying_Fox on January 17, 2014, 08:27:44 PM

Title: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 17, 2014, 08:27:44 PM
Hi All,

With recent flood of postings regarding TQ motorization just wanted to share some of my throttle interfacing experience. It is not fully completed yet, but manual mode and autothrottle already work.

The hardware part of my 737-300 throttle motorization was done by Rob Archer, aka 727737Nut.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1090786.jpg&hash=578f2692c7323007e30587aa083a21b5e11659ed)

Rob also suggested me to use Opencockpits cards, since he worked with them  himself.
However, when I looked at SIOC script language closely I felt, well, SI...CK :). As a professional programmer I just wanted something more versatile, where I have more control on things, and decided to go with .Net (C#).

So, my electronic blocks of choice changed to:

Pokeys 55 (57)  (USB/Ethernet)
Phidgets 1064 2-motors card for throttle levers (DC motors)
Phidgets 1065 1-motors card for trim wheel (DC motor)
Phidgets 1061 8-servo card for speedbrake,  trim indicator and flaps indicator.
Electronic relays for servos to disconnect servo power when servo is in idle mode.

All these cards have DLL libraries for .Net and  sample .Net projects are availabe.

I placed Phidgets motors cards on a small panel that easily swings out from inside the TQ. Servo card is located inside the speedbrake servo housing in front of TQ.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150041_zpsd0c92f0d.jpg&hash=41e2c868bb0151b0692490487b4c8b4d09205172)

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150044_zpsbc385d87.jpg&hash=553800236c00b29b1d530b6db850d27b503c2101)

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150043_zps72e52b41.jpg&hash=dff3c67ea030e672e4865f2a05047fc356d18967)

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150261_zps08cbd6e1.jpg&hash=a9105ef7ae699d99f1c7abc7b33b4961b6036833)

Pokeys card is on the MIP control block, connected to TQ by DB25 cable. Currently I test TQ in my workshop, not in the sim itself, so I just connected it to another Pokeys card.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150262_zps82010286.jpg&hash=9e392b38cd915d36af4dc59f3d17c00ba7e348d2)

Throttle levers are run by DC motors (I use 12v for them.). Trim wheel motor runs from 25v. Phidgets Servo card needs anything in 6-15 v range, so I also feed 12v to it.

All analog and digital inputs from TQ go to Pokeys card. The general reading cycle for Pokeys and FSUIPC values is set to 100 milliseconds (it's a configurable parameter).  For Flaps and Speedbrake pots the reading cycle is  1 second, since it does not change that often.

My software controller  is a visual application that allows monitoring all the readings from Pokeys and FSUIPC (besides direct TQ control functions) It also is used as test application making  refining all the parameters and logic very easy.

Same application is also used for potentiometers calibration.  Overall all functionality is a combination of my custom .Net application, FSUIPC and ProSim737.

Here is current interface version (changes every day :) )

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2Finterface3_zps58512145.jpg&hash=73de591010f81e07b4648e2a24fd43c7ffd3235a)

Four boxes on the left represent the analog inputs from TQ pots. The necessary number of inputs is defined in configuration file and the controls are  created dynamically. So, if tomorrow I want to add another analog input, I just need to change the app.config file to tell which Pokeys analog pin is used for new input and automatically will have all monitoring info on screen in additional box. Application supports both USB and Ethernet versions of Pokeys card.

Since analog pots always have also some "noise" and readings are fluctuating, I use so called "rolling average" value (calculated from last 10 readings) for pot position reading.  This is the  "Stabilized value" in screen above.  Smoothing gets the reading value fluctuations down to +/- 1 range. In addition to  rolling average smoothing,  there is also another smoothing level for throttle levers. The motors will react only if the lever movement is over the threshold parameter, for example  +/- 3 from current position.

The box in the middle represents the actual TQ and the sliders move when TQ  levers move.

The box on the right represents autothrottle  functions.  Autothrottle input  is switchable from FSX input to input from sliders (trackbars) in autothrottle box. That mode is typically used for testing or demonstration of levers movement. The levers can be activated from it separately or synced to move together. The advantage is that I do not have to run the actual flight in FSX in order to test the logic or algorithm changes. In fact, the application autothrottle logic just reads the position of autothrottle sliders to command the lever motors.

When in FSX input mode, the  FSUIPC throttle read values just assigned to the slider position value. All necessary FSX offset values can be monitored in screen. For the throttle levers the application reads from FSUIPC offsets 088C, 0924 and writes to offsets 089A, 0932.



Here is the video of working TQ:

http://youtu.be/Ioj1_N6hh6M (http://youtu.be/Ioj1_N6hh6M)

Currently I am working on trim wheels and  speedbrake functionality.

Nick





Title: Re: Interfacing my motorized 737 TQ
Post by: mickc on January 17, 2014, 09:31:41 PM
Awesome work Nick!

Title: Re: Interfacing my motorized 737 TQ
Post by: jackpilot on January 19, 2014, 05:29:25 AM
Very nice work Nick, thanks for sharing.

Jack

(PS: as requested topic has been split)
Title: Re: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 22, 2014, 07:11:29 PM
Thanks everybody!.

Reverse mode is working now, and I also enabled and tested my trim wheels.
Had a little problem - it turned out that you cannot have Trim Up/Down gates values in Prosim 737 if ProSim MCP is not running.
I redirected Trim Up/Down gates to two Pokeys outputs and read their state in my program, then  run the trim motor in corresponding direction (or stop) through Phidgets card basically with one line of code.

Here is the latest version of program interface:

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2Finterface4_zpsb022dfd0.jpg&hash=516723229aaea540febe8e9630033a66745bd4b4)

See the trim wheel?  ;)  Trim indicator is not working yet - next step.

Title: Re: Interfacing my motorized 737 TQ
Post by: fordgt40 on January 23, 2014, 01:51:35 AM
Hello Nick
v
As you are moving onto the trim wheels, did you know that there are 4 speeds  :)

See this link to David Allen`s website

http://www.737flightsim.com/StabTrim/stabtrim.html (http://www.737flightsim.com/StabTrim/stabtrim.html)

David
Title: Re: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 23, 2014, 05:20:32 AM
Quote from: fordgt40 on January 23, 2014, 01:51:35 AM
Hello Nick

As you are moving onto the trim wheels, did you know that there are 4 speeds  :)

See this link to David Allen`s website

http://www.737flightsim.com/StabTrim/stabtrim.html (http://www.737flightsim.com/StabTrim/stabtrim.html)

David

Hi David,

Yes, I am studying that. Thank you for the link. That's next step - first I just implement basic functionality into my program, than improve it.

Nick
Title: Re: Interfacing my motorized 737 TQ
Post by: 727737Nut on January 23, 2014, 06:38:06 AM
Nick,
My suggestion would be to replicate 2 speeds only.  Much easier and for me, does the part well.  I used a relay and power inputs from my 12V and 5v sources   Quick code in SIOC, if flaps extended then relay supplied the higher voltage, if not then the lower voltage.  Make sense?  Worked great.  I know 4 sppeds is dead accurate but sometimes we need to compromise for simplicity. :)
Depending on the motor you use your voltage may be 24 and 12 etc
Rob
Title: Interfacing my motorized 737 TQ
Post by: Sudden81 on January 23, 2014, 08:39:22 AM
My suggestion is that you try to get as close to realty as possibility. You seem to know how to program and that is rely good because of the lack  of good TQ interface.

Any way I saw that you hade suport for TQ sync. But is that really how it works?

Let's say that the engines is not exactly the same and then the N1 values does not give the same trust how will they sync in realty?

And if you set the N1 values different on  engine 1 and 2 how will that effect sync?

And how can you solve that?

And can you control TQ handle speed to with your program?



Title: Re: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 24, 2014, 10:01:51 PM
Quote from: 727737Nut on January 23, 2014, 06:38:06 AM
Nick,
My suggestion would be to replicate 2 speeds only.  Much easier and for me, does the part well.  I used a relay and power inputs from my 12V and 5v sources   Quick code in SIOC, if flaps extended then relay supplied the higher voltage, if not then the lower voltage.  Make sense?  Worked great.  I know 4 sppeds is dead accurate but sometimes we need to compromise for simplicity. :)
Depending on the motor you use your voltage may be 24 and 12 etc
Rob

Hi Rob,

Since I don't use the SIOC- based stuff, but Phidgets, I don't even need different power inputs. The speed is set up programmatically without any problem.

BTW, for Trim motor I just use the 25v power brick from the old electric drill. It's 1A only but that's more than enough. When trim motor works - it eats only 6 watts.
The whole TQ eats ~20 watts at peak when trim and levers moving. Backlighting included. I have separate computer PSU for it feeding 12v and 5v, which by itself eats ~6 watt in idle mode. So there is plenty of power left for other needs.
Title: Re: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 25, 2014, 12:00:08 PM
Funny observation.

Speaking of trim wheels an indicators - every source mentions horizontal stabilizer and trim indicator going up/down and trim wheels rotation in different directions.

So far I did not find a single manual that makes a connection between the two for a simple question:

When trim indicator moves in "Nose Down" direction - which direction the trim wheels rotate? Clockwise? Counterclockwise?

My take would be that, naturally, I would expect to turn wheels clockwise in order to see the trim indicator needle going to the same direction (nose up).

But I was not able to find any confirmation to that. Even in youtube videos they show just brief rotation of trim wheels back and forth, and it's typically not possible to notice where the actual trim indicator goes.

That's what typically happens when the manuals are written by experts - simple things are so obvious to them, that they forget to mention what you really need to know. 

:idiot:
Title: Re: Interfacing my motorized 737 TQ
Post by: Garys on January 25, 2014, 12:53:56 PM
During lubrication of the jackscrew we have to move the wheels by hand. I can tell you going from full nose up to full nose down is a workout. The trim wheels follow the needle. In other words if you want to go full nose down they will rotate  towards the main instrument panel.

Gary
Title: Re: Interfacing my motorized 737 TQ
Post by: Flying_Fox on January 25, 2014, 06:40:47 PM
Thanks Gary, according to your input my trim wheels rotate in the right direction. :)

Just finished interfacing the trim wheel and trim indicator. Trim wheels are two-speed now, I will think about the logic I need for 4 speeds.
Trim indicator works through the Phidgets 1061 8-servo card. Currently I have only 3 servo for it - trim indicator, speedbrake and flaps indicator.
Configuring servo for trim indicator was very easy. I used Advanced Servo-Full test project supplied by Phidgets.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2Ftrim_servo_test_zps4f9ce495.jpg&hash=21284492fbf6fb24978e385ef7db8cb774d36bd7)

All I needed was to run it, select the proper servo from the list, click on Engage checkbox and move the Set Target Position slider to find out the proper needle movement range. In my case full needle range from Nose Down to Nose Up is 0 to 16 which corresponds the servo position range 128 to 0).

Then I just wrote the code that recalculates the trim position into servo position.
I read trim indicator position from ProSim through custom FSUIPC offset.
I have relays that turn servo power on/off, however looks like they are not even needed with Phidgets servo object that has .Engage property for the same thing.

(https://www.cockpitbuilders.com/proxy.php?request=http%3A%2F%2Fi700.photobucket.com%2Falbums%2Fww8%2FOldElephant100%2F737NG%2FTQ%2FP1150285_zps4d73aa3f.jpg&hash=3e423d68cf472556790baa0c90be24401aa00d15)

Speed brake servo functionality is also tested  already, just need to implement the proper logic for it.