MobiFlight Community Support

Welcome to the forum for MobiFlight! Feel free to reach out to the community in case you have questions, issues or just want to share great ideas or details about your latest home cockpit project.

You like MobiFlight? Donate via PayPal and support the MobiFlight development. Thanks! 

icon
Avatar
Apeshaft
Posts: 51
Supporter
Hello all fellow cockpit builders!

I stumbled across this Thingiverse project the other day:

https://www.thingiverse.com/thing:2981928

I think it is quite obvious what it is and how it is suppose to work.
My question for you is, how would this solution best be integrated with Mobiflight?
My guess as far as it comes to hardware is that a 12 volt power source be connected to
a relay board which itself connects to the Arduino and the solenoid. On a given signal from
the Arduino the relay circuit closes and releases the Solenoid.

When it comes to programming, is the automatic movement of the starter switch to the OFF position
represented as an offset or event ID in the PMDG? As an output feature, are solenoids to be treated as
LED lights in Mobiflight?

Looking forward to reading your input on this matter.

Best regards

Oskar
2018-09-25 12:34
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
Hi

Basicly this is possible. With the "poor" tools of Mobiflight we need to do some little tricks.... But it work.

so i not study your linked webside.... the important fact is... Witch technology is used !

For Solonoid Systems we can work with 2 basic technics...

1. a Moving Solonoid ( Pull or Push)
Here the switch is simply "physical" pulled or pushed into the correct position if needed In that case it is important for us to get a good logic of Power manegment for the solonoid.
This solonoids must be strong enough to handle the real switch mechanics.... So its normaly not possible to "Overdrive" the magnetic power.
For example:
We say the Solonoid should PUSH the switch from START Position to OFF Position if switch in virtual cockpit is in OFF Position. This workes. BUT.... In That case the solonoid is always active (PUSHED) aslang the switch is OFF in Sim. So we can not move the switch from OFF to START manualy cause the solonoid work against us.
Here we need a second config system that controll the Main Power of the Solonoid.... ( Cause without power the solonoid can be moved without problems.)

Here a system is.... Solonoid is ON (Pushing) the switch IF Virtual Switch is in OFF Position ( If Virtual switch go from Start to OFF solonoid is powerd and push our real switch also to OFF .... BUT now s Second config say the whole solonoid is only powerd if our REAL Switch is NOT in OFF Position ( Or the left sides) .... With this logic the solonoid is not powerd while setting the switch to START and stop working after reaching OFF Position again.... So we can Move our System.

***
2. a "Holding" Solonoid and a Spring System ( This is much more comfortable and realistic )
Here the Solonoid not "move" our Switch... It simply "HOLD" our switch.
In That case there is a little spring in the mechanic that pull the Switch basicly back from START to the OFF Position.
In the START Position there is a holding solonoid that is controlled by Mobiflight.... Aslong in SIM the Virtual switch is in Start Position the solonoid is ON ..... If Virtual switch is NOT in Start Position ( for example after automatic switch back) the solonoid is OFF.

So i hope you understand.... When you turn switch to START it would be normaly swap back to OFF by the spring.... BUT In that moment the solonoid gets ON and "hold" the switch in START..... If virtual function change the solonoid gets off and the Spring swap back our switch,

****

Alternates would be technics with servo motors.... A "Puling" Solonoid also works. But i think the "Holding" technic is the best.... But it need a good mechanical Work with the spring... Maby you got a CNC Machine to build this element verry detailed with metal.
Good Luck !
2018-09-25 15:17
Avatar
Apeshaft
Posts: 51
Supporter
Pizman, thank you for your answer.

The Thingiverse project is dedicated to a specific type of solenoid,
the TDS 08A which is a spring loaded solenoid, a holding solenoid as
in your second example. So far so good.

What I would like to know further is:

1. As I understand this is possible to do in Mobiflight.
How? Just briefly, as there is no "solenoid" option.
Do I set it up as a Stepper/Servo?

2. The TDS08A requires 12 VDC input.
If I supply 12 VDC to the Arduino, can I use the VIN output pin (to make it easier)
to supply the relay? Or are there relays with input jack for DC?

Best regards Oskar
2018-09-25 18:39
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
Hi.

Not use it as Stepper or Servo.... the Solonoid work boolean. It only know 1 and 0 or better PowerOn or Power OFF.... Means Magnet is ON and do its work ( Pulling, Pushing or Holding whatever kind is used) .... Or it is OFF and not work so the Shaft is moveable or the "Holding Patern" is not active .

Basicly you set those Magnets like a LED..... If Value of Offset is "1" it Powerd the circuit.... If its "0" the circuit is without power.

****

About the 12v i not know the stuff.... You need to wait for reply of Stephan if 12v solonoids can be work with arduino ( I think NOT)
if not you simply use a Relais (5v or lower) for that..... Now you use again a LED Output Config.... That controll a relais in this Pin (Instead of LED) .
If Mobiflight set Pin High the Relais will "run" the working power for the solonoid circuit .....if Mobiflight set Pin Low the realis stop the solonoid.

About the final logic....

Are you sure it is a holding solonoid.... In the Picture of the link it looks like a "Push" solonoid that shaft will "turn" the little screw on the round switchshaft one detent to the rigth !
Good Luck !
2018-09-26 00:20
Avatar
StephanHo
From: EDDG, Germany
Posts: 1404
Supporter
Hi,

12V components usually can not be controlled directly from the Arduino (5V). It works only with a galvanic isolation. The MEGA (5V) controls a relay. The relay has a normally open and a normally closed contact. When the relay is energized, the normally open contact closes and can then be turned on e.g. control the solenoid.

Giving 12V to the MEGA pins will definitely lead to an immediate defect of the MEGA !!
Grüße,
Stephan
2018-09-26 11:27
Avatar
StephanHo
From: EDDG, Germany
Posts: 1404
Supporter
Sorry, Oskar,

you can drive the MEGA with 7-12V via the built in Voltage regulator. But this Voltage regulator reduces the voltage to 5V so that the MEGA can run fine.

So it is right that you can drive a MEGA with a 12V power supply (indirect) but never directly - this will damage the MEGA in any case at once.

But it is possible to drive the MEGA via the voltage socket with 12V AND other components (which needs 12 V). But normally you do not need an external power supply for a MEGA.

There are special relais which were driven with 5V over the pin of the MEGA and they can switch on the other side 110 or 230V AC.

Look at these ones:
https://www.roboter-bausatz.de/34/1-kanal-relay-5v/230v
https://www.roboter-bausatz.de/1673/4-kanal-relais-modul-5v-high/low-level-trigger-einstellbar
https://www.roboter-bausatz.de/1672/2-kanal-relais-modul-5v-high/low-level-trigger-einstellbar
Description is in german but you can translate it. You can also look for them at ebay or google.
Grüße,
Stephan
2018-09-26 22:11
Avatar
Apeshaft
Posts: 51
Supporter
Hello again, I have now assembled one engine starter switch, still waiting for the relay to arrive.
Still a bit confused as of how to get this to work in Mobiflight. The normal state of the solenoid must be on (spring retracted). Then when engine start is complete it must release the spring (go to off)
and then go back to its normal state (on).
I don't think I can have the solenoid in off as normal state as this would interfere with the mechanism (the input for retracting the spring and the switch to GND would be the same, and with delays of the relay taken in to account there is a risk it would just bounce back to OFF. Or maybe not?). Kindly awaiting your thoughts about this matter.
2018-10-11 07:05
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 2958
Supporter
Hi. We can prety sure create a config for that.... But i must see finaly the concept of your system ( Photo or a diagramm plan )
I also must know exactly the function (mechanical and electrical) of the solonoid....
Then we build the Config exactly so that it is correct for the function.

So i not completly understand your question..... The solonoid must only work in case of Engine Start.
Whatever technic you use ( and kind of solonoid) it must work only in this short time periode.

The Pushing or Pulling Solonoids are just work in moment when Switch must be "moved" from GRD to OFF. And the "holding" Solonoids must only work aslong Switch is in GRD Position.
We must build finaly a logic that the Solonoid is NOT Powerd out of this situations. I think it will reduce lifetime of solonoid when we powerd it all the time !
Good Luck !
2018-10-11 12:20
icon