J G 927 Posted August 6, 2019 Report Share Posted August 6, 2019 (edited) I have recently bought some Panavia Tornado parts and I am trying to use them with my FS. Tornado gauges are all electrically powered and are therefore very suitable for this task. I use a 5v Arduino board to control them. So far I have: An undercarriage leaver which is easy to install as it is basically a switch. However it has some LEDs in the handle which flash while the gear is traveling. Getting this to work was achieved with a relay to switch on the required 12v supply to the LEDs which was passed through a car indicator flasher unit and by using the appropriate FSUIPC offset to activate it. A gear indicator gauge. Again I used relays to switch on the 12v supply, one for each light controlled by FSUIPC offsets. A warning light panel (over 50 lights) again controlled by bank of relays and a 12 volt supply. All of the above work well. My next project is a trim gauge. This has the three trim types depicted by aircraft shapes which move to indicate the trim state. These are analogue and are 12v. I want to control these three aspects of the device with the analogue output from the Arduino board. If the gauge ran off 5v then I could control it directly but I need 12v and so need to control it indirectly as I have done with the digital relays for the lights above. So I need something which will allow me to control 12v analogue from a 5v analogue output. A simple relay wont work as it is either on or off. Does anyone know how this analogue issue can be solved? Edited August 6, 2019 by J G Link to post Share on other sites
allardjd 1,853 Posted August 6, 2019 Report Share Posted August 6, 2019 This looks like it should do it. You'll need the MegaMoto Shield for your Arduino, an external 12V power supply and some Arduino code. The Arduino uses the PWM pin(s) to control the shield which controls the output from the 12V to the load(s). I don't think it would matter that your load is not a motor. https://forum.arduino.cc/index.php?topic=434078.0 Post #6 says this... - - - - - - - - - - - - - Hello, maybe it's a bit "overpowered" but a very easy-to-use solution for your problem: MegaMoto Motor Shield http://www.robotpower.com/products/MegaMoto_info.html The shield provides a full H-bridge or a double half-bridge functionality, with PWM control (0...100% in both directions) and also current feedback to the analog pins. I am using this for a couple of months now to control very high loads (12V, 10-15A). Works pretty fine! Also the current feedback seems to be quite accurate. All you need is an external power supply, which delivers 12V and the necessary amps. With this you just use the 5V (or 3.3V) pins of your Arduino to control the shield, but not for powering the motor. In principle, the shield simply opens and closes the line between your motor and your power supply. Regards and good luck! - - - - - - - - - - - - - 1 Link to post Share on other sites
allardjd 1,853 Posted August 6, 2019 Report Share Posted August 6, 2019 This Arduino shield looks like it can do the same thing, but is intended for lower current loads than the one above - probably fine for what you have in mind. Note that it's pretty cheap - $7.95 USD. You'd still need a 12 V power supply from somewhere other than the Arduino board. https://www.amazon.com/DEVMO-Shield-Expansion-Arduino-Duemilanove/dp/B07S39BCZ6/ref=sr_1_2_sspa?crid=2A0NEUMTA9EZW&keywords=arduino+motor+shield&qid=1565134812&s=gateway&sprefix=arduino+motor+shield%2Caps%2C163&sr=8-2-spons&psc=1&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUExUlMzVUFaQzYxNk1YJmVuY3J5cHRlZElkPUEwODU2NTU3MURNNDI4QVBEN0ZQQiZlbmNyeXB0ZWRBZElkPUEwNjA4ODg2MVBLQTZTNUVIWkhTVSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU= Thinking about it some more, your application is more like a servo than a conventional motor. John 1 Link to post Share on other sites
allardjd 1,853 Posted August 6, 2019 Report Share Posted August 6, 2019 Another - $6.99 on Amazon https://www.amazon.com/Qunqi-L293D-Shield-Arduino-Duemilanove/dp/B014KN2898/ref=sr_1_3?keywords=arduino+servo+shield+12v+output&qid=1565135208&s=gateway&sr=8-3 Pretty sure the best answer is an Arduino motor or servo driver shield plugged into the top of your Arduino with an add-on 12 V power supply. Be sure the board you get has input pins for a remote power supply of >= 12V. I saw one that was only good for 10V and 600 mA, so not all of them will work. You should probably tie the Ardino and external power supply negatives together, though the shield might be hard-wired to do that for you. You could also do this with discrete components built around a power transistor or an op amp, but it would take a lot of fooling around and the Arduino & shields solution takes a lot of the work out of it and provides a lot of built-in functionality and protections. Calibration would be fiddly, no doubt and being able to tweak that easily in the Arduino code/script/sketch would make that much easier than trying to do it with pots, trimmers, etc. John 1 Link to post Share on other sites
J G 927 Posted August 7, 2019 Author Report Share Posted August 7, 2019 (edited) Wow thanks for all your effort John, It looks like just what I need. I have bought a 4 channel card as I need to control 3 trim states, only about six quid - peanuts. I also saw that the output was bi-directional, important for left/right trim, it looks just fantastic. I will add a topic that will chart my progress wit these things if anyone is interested. Thanks again John, you're a star. J. Edited August 7, 2019 by J G 1 Link to post Share on other sites
allardjd 1,853 Posted August 7, 2019 Report Share Posted August 7, 2019 Yes, I'd like to see your progress on this, including photos if you can. That Arduino stuff is really magic and there are all kinds of add-on shields and sensors and actuators available that are made to work with it. You're only limited by your ingenuity with this stuff, and of course your budget. Most of it is pretty cheap, however. How are you tying your real world devices back to FS? John Link to post Share on other sites
J G 927 Posted August 9, 2019 Author Report Share Posted August 9, 2019 (edited) Ok, so far I have four cockpit parts to integrate into Xplane. I use Mobi-flight software and the Xplane version of FSUIPC to achieve connection and control. I have: A landing gear leaver, installed and working. It uses a simple program switch to detect the leaver movement and commence the movement of the gear. The Tornado has LEDs in the handle which flash whilst the gear is moving. These seem to work well on 12 volts and so I use a relay and 12v supply to light the LEDs and FSUIPC offsets to control the relay. To achieve the flashing for the LEDs I simply put a car indicator flashing unit into the 12 volt circuit. Two gauges, Undercarriage lights and trim gauge. From behind the gauges look like this, as do all gauges I haven't found any non-electric gauges yet and the number of pins varies with each guage: The wired gauge is the landing gear lights. This works in the same way as the LEDs in the gear leaver, but each LED has its own Offset and relay. The second gauge is the trim gauge. Somewhat harder to make work, but I think it can be done, I need to experiment. The trim indicators work through variable voltage and the direction of trim is zero volts for no trim and then + or - volts to move the trim either side of zero. This will be the last of the gauges I will get working, and if successful I will try to source a Flaps/slats/wing sweep gauge. lastly I have a warning panel. This has a lot of independent lights, almost all of which have related offsets. It will be a simple programming procedure, but it requires a lot of relays. The bank in the picture has 52 relays! Finally I have a complete throttle box for the tornado. But that is a project for the future. Edited August 9, 2019 by J G Link to post Share on other sites
allardjd 1,853 Posted August 9, 2019 Report Share Posted August 9, 2019 Interesting hardware. Thanks for posting. The relays for the warning panel look like overkill. It really doesn't require a relay to operate a lamp or LED, just a simple low-power transistor, which would have saved a ton of space in the aircraft. Understand it's older technology, but so are transistors now. They've been around for quite a lot longer than the Tornado has. Of course a lot of military hardware is designed on a cost plus basis, so if a contractor/vendor can justify a more costly approach he gets paid accordingly. Does that relay rack go inside the warning display box? There must be a lot of wires connecting to that in the aircraft. Trim gauge is pretty neat. Please post as you get it working from the Arduino. I guess the gauge "needles" can be thought of as simple voltmeters, displacing in proportion to the negative or positive voltage applied. Probably not how it would be done if designed today but simple and reliable and accurate enough for that particular application. Is the knob in the center of the gear indictor lights just for adjusting brightness? Great looking gear anyway. Where did you manage to find this kind of thing for sale? John Link to post Share on other sites
J G 927 Posted August 10, 2019 Author Report Share Posted August 10, 2019 19 hours ago, allardjd said: Interesting hardware. Thanks for posting. The relays for the warning panel look like overkill. It really doesn't require a relay to operate a lamp or LED, just a simple low-power transistor, which would have saved a ton of space in the aircraft. Understand it's older technology, but so are transistors now. They've been around for quite a lot longer than the Tornado has. Of course a lot of military hardware is designed on a cost plus basis, so if a contractor/vendor can justify a more costly approach he gets paid accordingly. I don't know much about transistors although I understand what they can do ;( so I opted for the relay solution. Does that relay rack go inside the warning display box? There must be a lot of wires connecting to that in the aircraft. No they don't. The wiring connects to two plugs on the back of the unit like the other guages Trim gauge is pretty neat. Please post as you get it working from the Arduino. I guess the gauge "needles" can be thought of as simple voltmeters, displacing in proportion to the negative or positive voltage applied. Probably not how it would be done if designed today but simple and reliable and accurate enough for that particular application. They are like simple voltmeters. Is the knob in the center of the gear indictor lights just for adjusting brightness? The knob just mechanically moves a filter over the lights. There is a switch on the warning light panel which just switches in a resistor to do the same thing. Both units have a test circuit that is easy to switch on. 19 hours ago, allardjd said: Great looking gear anyway. Where did you manage to find this kind of thing for sale? Ebay! John Anymore questions, I will be happy to answer. Link to post Share on other sites
J G 927 Posted August 13, 2019 Author Report Share Posted August 13, 2019 Small update. I now have a motor shield for use with the trim gauge, Hopefully I can get it to work with the Arduino board. The only stumbling block might be the mobiflight software, I don't know how it will act with the motor shield, and the shield doesn't come with any literature at all so I don't know how it works at all. Hopefully the likes of You Tube will come to my assistance. If I cant get it to work with the Arduino Shield then I believe opencockpits have something that should work, but its an expensive option. Other news, I have mapped out the pins on the back of the trim gauge and now have a set of pins that will allow me to power the three trim elements of the gauge. So now I know its all working and which pins I need to use. Some progress at least. I will try to get the trim gauge working before I attempt to do the warning lights as the trim gauge will share an Arduino board with the landing indicator gauge and the landing gear leaver. Also I will need to design and build a mount for the lights unit before I can think about doing the wiring for it My work list is: Wire up a switch box to an Arduino board. (not gauge related but uses the board.) Re-wire the Landing gear leaver to use a pin not taken up by the addition of the motor board Wire up the landing gear indicator lights gauge and program mobiflight to use it Look to get the motor shield working with the trim gauge. I will let you know how I get on. Link to post Share on other sites
allardjd 1,853 Posted August 14, 2019 Report Share Posted August 14, 2019 Does the shield use analog or PWM outputs from the Arduino? May be optional, with a jumper on the shield or some assignments within the Arduino code. I suspect the shield plugs into all the output pins on the Arduino, so there should be a way to use either analog or PWM outputs (but probably not the digital outputs) to drive the shield. The shield documentation and any included sample code should show how to do that. If I remember correctly, some of the Arduino analog outputs can be configured in the code for PWM. I can see how the Arduino code/board will drive the motor shield and how the motor shield outputs will apply analog voltages to the pins of the gauge, causing the needles to deflect. I guess you can use the control assignments within FS for trim inputs and that will affect the AC within FS, but how will those inputs within FS get to the Arduino to make the gauge follow your inputs? Also, autopilot will affect trim settings within FS so when set up properly, the gauge should reflect those when the autopilot is coupled. Should be a really interesting display. Which Arduino are you using? Uno? Mega? Other? John Link to post Share on other sites
J G 927 Posted August 14, 2019 Author Report Share Posted August 14, 2019 I am using a mega or rather three megas, two for the warning lights and one for all the rest. The motor shield leaves pins twenty something to 53 free which is enough for all the other lights and switches bar the warning panel. As for getting the motor shield working, that is going to be a challenge. The shield comes with no paperwork whatsoever so I have some work to do there. I am using Mobiflight software (www.mobiflight.com) as the s/w interface but I am not sure if it can cope with the trim guage needs. There are some alternative options available for this aspect. As for the autopilot, time will tell, Mobiflight uses Fsuipc offsets so if the AP actions are reflected in their values then the guage will show them as well. 1 Link to post Share on other sites
J G 927 Posted August 20, 2019 Author Report Share Posted August 20, 2019 I have seen this: https://www.ebay.co.uk/itm/Tornado-Aircraft-Engine-Control-Panel-Ex-RAF-MoD/192979744881 and this: https://www.ebay.co.uk/itm/Tornado-Combined-Position-Indicator-Flat-Slat/223482246170 and this: https://www.ebay.co.uk/itm/Panavia-Tornado-F-3-Fuel-Quantity-Indicator-Unit/323888211443 The engine control panel would be easiest to get working but the combined position indicator would be the most interesting to implement. First I need to get what I have working, and I can only justify the combined position indicator if I can get the trim gauge working. Link to post Share on other sites
J G 927 Posted September 1, 2019 Author Report Share Posted September 1, 2019 I purchased the combined position indicator and the engine control panel . I have also a combined fuel gauge and a engine air intake control panel. (All Tornado). The latter has no direct use in my sim but it has the perfect combination of switches and buttons to replace an existing home made panel that controls the mains supply to my two fs pcs and remote switches to power them up. Over the next couple of weeks I will be building the various panels to mount the various tornado parts into. Once this is done I will post some photos of the setup. The amount of background wiring and PCB stuff us rapidly increasing and I am toying with the idea of using the case of an old PC to mount it all in! 1 Link to post Share on other sites
J G 927 Posted November 7, 2019 Author Report Share Posted November 7, 2019 (edited) I am behind schedule with this now. I have purchased the Tornado Aircraft Engine Control Panel, the Tornado Combined Position Indicator and the Fuel Quantity Indicator. The first two of these are useable but I have not yet got the fuel quantity gauge to work. I haven't given up on this but I think I will have to bypass the gauges electronics and wire direct to the internal motor that drives the fuel amount reading. So far I haven't had to do this with other gauges, wiring to the original rear socket at the rear of the gauge has been working just fine. There are some issues with the control of gauges that require variable voltages to control them. I have purchased a power supply that enables the user to change voltage and amperage settings to help me with this. The issue is that not all gauges seem to use the same voltage range. So, for example, the gauge that shows wing sweep, flap , slat and air brakes all have a different voltage requirement to move the needles their full range. See the gauge below: What is not clear to me at the moment is if I can use one multi-motor controller with a constant (highest) voltage that covers all of these aspects of the gauge and control the voltage ranges in software or if I will need to have one motor controller per displayed item and feed each controller a different voltage. I suppose the good news is that it does actually work! Edited November 7, 2019 by J G Link to post Share on other sites
J G 927 Posted November 18, 2019 Author Report Share Posted November 18, 2019 I have now started ont the cockpit build which I will need to complete in order that I can mount and wire up the guages. This will be loosely based on a Tornado cockpit but not a replica as I don't have the space or the funds to do this. Picture to follow when I am out of the design phase. Link to post Share on other sites
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now