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! 

05/03/2024 - This forum is read-only

The community support for MobiFlight has moved exclusively over to our Discord server. Register for free and enjoy more interactive functions like image and video upload, voice chat. More than 7,000 registered users around the world make it a great experience!

See you on our MobiFlight Community Discord server.

A HUGE Thank You to everyone who participated in the forum, especially obviously to Pizman and Stephan who did an outstanding job over so many years providing an incredible service to the MobiFlight community.

The forum is still providing a lot of good content, hence we keep this information accessible.

icon
Avatar
mtalledo
Posts: 5
Hi All,

I am building my home cockpit 777 with the pmdg and I have a dubious about the configuration of all buttons of the ovearhead with arduino and mobifligth.

I use a Arduino Mega + external 9v power supply.

I try to explain the problem:

For example, the configuration of the button “FLIGHT CONTROLS annunciato Thust ” is composed of two LEDs on the overhead panel (On - Off) + momentary button.

For the momentary button there are no problems .

For the leds, I have two leds, On and OFF.

On the PMDG Offset documentation is specificate only OFF state.

---FCTL_annunThrustAsymCompOFF---

Offset (643A)

Byte (1)

Type(Boolean)


Up to now there are no problems, I connect the arduino to PIN 40 and configure Mobifligth with this OFFSET and it works.

When the status changes to ON, the OFF LED rightly turns off, and here is my problem !!, How can I turn on the other LED in the ON state?

Do I have to use another PIN on the Arduino board, such as 41?, how to power input to this led?

Do I have to power the LED directly from the 5v PIN and manage the ignition from Mobifligth?, is it possible?

What is the correct way to do this connection on arduino?

Could you help me on this part of the connection in Arduino?

Otherwise I would have to take a lot of Mega cards only for the Overhead.

I wonder, how many 3mm LEDs can the Arduino Mega manage?

Thanks for your support.

King regards.

Mike.
KL737
2020-09-29 11:56
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi

Basicly Mobiflight got a easy and clear logic.... Each device is a own and single element. If your Announciator include TWO Led for TWO different things it will simply work like 2 Different Systems. So YES:.... In that case each LED got a own PIN on the Mega and it got a own Config that controll it.

Technical if a LED would be realy logical Boolean.... Means If ON should light the OFF is dark and if OFF light up ON must be dark..... Then you can in theory use 1 Pin and connect a Relais that switch between this 2 states..... BUT This is not logical and also not profitable !
1. Not logical cause this situation is not correct.... With Master Battery switch Off ( Cold and Dark) BOTH Led must be OFF..... While Lighttest BOTH must be ON. So you need to controll them individual!
2. Releais for each Output cost you much more money as simply using 1-2 additional Megas for that doubeld LED Outputs.


About the Limit.... Mobiflight allow currently 40 LED Outputs per Mega. The number of Pins is still 68 ..... So its logical to mix Inputs and Outputs to use all Pins if you like.

About the Offset:
I not know that System and in case my PMDG777 is for FSX and i no longer own that sim i can not test.
You must find out if there is a logic.... If the ON is simply always active aslong the OFF Offset show "0" then we can simply use the same offset with a "Compare"
In that case the OFF LED directly reads that Offset ( Light if Offset is 1)
And the ON LED use the same Offset with Compare "If Value = 0 THEN 1 ELSE 0 " So it "inverted" the Number and LED will light if Raw Offset is 0 and is off if raw offset is 1.
We can also maybe use the Switch Position Offset as indication for the ON LED..... thats waht you need to figure out !
Good Luck !
2020-09-29 13:29
Avatar
mtalledo
Posts: 5
Thanks for the support. Yesterday, I verified the file configuration Cold and Dark and I found the buttons in status automatic On, therefore this confused me. Now is more clear.

One last questions.
I should configure 30 leds but I checking the voltage of all leds exeded 200ma, how can I do?, Use 2 arduino and balance the ma? Or exist another solution?
Thanks.
Regards.
KL737
2020-09-30 15:48
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
There are more "magical" values..... 200mA is the less important one.

One GRD or 5v Pin support a max of 200mA.
Each single Pin should be drive with a max of 40 but we normaly say 20mA)
The Whole Mega got a Limit of 800mA MAX
The USB Port give you 500mA per Board.

So.... If you use your Mega on USB your 30 LED must below 500mA ...... If you power it external the devices should NEVER overdirve 800mA. And no LED on a Pin should stornger then 20 or 40 max.

You see.... The 200mA is no problem at the moment.

****************
Last Note: Your right!
Splitting is our best tool. Pretty sure you also need Inputs like Buttons. So if you need for a Element like a MCP/EFIS already 2 Megas.... You should not put all LED to MegaA and all INputs to MegaB ...... Simpy split them nearly 50/50 ..... So you get sure you never reach the limits without big trouble cause its no mater where you set the devices while building !
Good Luck !
2020-09-30 19:05
icon