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
Ridgeandgable
Posts: 131
Hi Guys

I've order K2 Led Square switches for the MCP That I built but they have sent the wrong ones. They have sent Latching instead of momentory. Is there a way to make them work as I really don't want to wait another 5 weeks from Hong Kong :D
2019-12-31 00:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Not understand you completly.....

Important fact.... Are the LED´s indipendent ?? So do they have own Pins.
Lots of Latching switches have a "internal" LED..... Always ON if switch is in latched ON Position and always OFF oif switch is also OFF.
Those switches are not useable with a Homecockpit.... As you know it must show status of Sim.... Not status of the switch itself.

If LED are indipendent then the next question is.....
Do you like to change the mechanic OR do you like a software solution to work with the latching switches ?

Software is no problem. Simply use for ON PRESS and ON RELEASE the same EventID and Leftclick event. Then you simulate a momentary button Press.... Whatever you set the switch to ON or to OFF ( So everytime you use it).

Disadvantage is you "feel" the position of the switch and maby also see it (if it got a bigger movement) . To solve this you must try to open a housing. The Latching is just mechanical. (Electrical every latching switch is also a momentary Button) . Maby its possible to rework it ( remove spring or mill the holding part. )
You pretty sure see the mechanic if you be able to open a switch.
Good Luck !
2019-12-31 02:10
Avatar
Ridgeandgable
Posts: 131
Hi Pizman

The led in intergrated into the light.

I thought I had it working perfectly with trial and error, but then I noticed an issue with the sim.

The button has on the back 5 Pins

Ground and + Live (Led)
C
NO
NC

I wired up...

Ground with Ground Pin
NO & + to pin 23
and C to 5v on arduino

When I latch the button on, the speed button illuminates in the sim and the LED on the button glows :) Perfect I thought. When I unlatch the switch, the button on the sim deactivates and the LED goes off.

But the issue I found is, if I press the Speed button on the ground, the button illuminates, but the sim doesn't, as NGXu doesn't allow this whilst on the ground, but in my cockpit, it looks like its working.. So now I see your point :D

Possible fix would be to Use the Ground and + to pin 24 and the C and NO to pin 23 to operate the button, then the button should only illuminate if the SIM is illuminated?
2019-12-31 02:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
To help you i would need the datasheet of the switch.

if it got 5 pins i hopefully think it have a "indipended" LED ( but i´m not sure without see the shematic)

Basicly you should see the switch as TWO single systems..... A Button and a LED.
So for Homecockpit usage the Button should have a GRD and a Input line ( wired to a PIN on Mega that is defined as a INPUT)
And it should have another Line that powerd LED that is wired to a dfferent PIn on Mega that is defined as a OUTPUT. ( The ground can be shared or it have 2 GRD... one for the Button and one fo the LED)

Basic logic...... The Button INPUT send a Signal to Sim..... The LED OUTPUT show a status of a Offset.... But finaly the LED is not electircal connected to the switch itself.

*****
Summary....
Maby you just make a issue in wire logic and your LED is fine but you connect it wrong.... OR The Button is completly wrong and is not compatible.
Please link Datasheet.... then Stephan or myself will check it for you.
Good Luck !
2020-01-01 02:41
Avatar
Ridgeandgable
Posts: 131
Hi Pizman

Happy new year.

I managed to get it all working, but have a few leds / buttons that work when they want too. I think the issue is the grounds all joined together and a few maybe loose.

I’m going to attempt to re-wire and daisy chain the grounds. Out of Ground pin to button a, button b to c etc, is that the best way?
2020-01-01 03:15
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
About switch..

Sounds good....But think about if it realy work or if it just look like it work.
Simple testing.... Press your button..... Function in Cockpit gets ON and also your LED is lighted.
NOW Disable the function in the virtual cockpit by mouse click..... So the virtual Announciator is OFF.
If your Real LED also get off now then it realy show sim status..... If the Switch LED stay ON ( Whatever the Sim LED is OFF now) then your system is not correct and the Real LED will only show the Switch status but NOT the Sim status as we need it.


About GRD.

Yes this is possible and many users work with this logic..... But pay attention to a important fact.
There are TWO ways to do this....

A ) Full System.
Here also all Megas are wired in a chain. You set a GRD Pin of Mega1 to a GRD Pin of Mega 2.... to a GRD Pin of Mega3 and so on.
Then you can set common Grounds of Switches LED and so on whereever you like.

B ) Single Systems.
Here the Megas are not chained together.
In This logic you can also chain Grounds of Multiple Elements like switches and LED ..... BUT you can only chain Devices together that are connected to ONE Mega.
If you try to set a switch to PinX on Mega 1 but you wire the GRD to a chain that end in Mega2 then this can occure in a Error.

Stephan recommend the first Methode..... then GRD Chains are no problem and work fine in whole system.
Good Luck !
2020-01-01 11:51
Avatar
Ridgeandgable
Posts: 131
Thanks Pizman

All Done :D

https://ibb.co/QD8D9LB
2020-01-01 17:54
icon