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
marmar
Posts: 3
Hello
Can someone show me how to connect 5 rotary encoders to the Arduino mega to use with MobiFlight? I would like to use them to set CRS, IAS, HDG, ALT and VS
I can not find schematic anywhere
Best regards from Poland
2017-05-22 22:25
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi marmar,

welcome to MobiFlight.
To answer your question we have to know which simulator you use, which type of aircraft (standard or i.e. PMDG or P3D...).
The answer is depending on your konfiguration.
Till now we can only determine that you want to built a MCP.
Grüße,
Stephan (Time: UTC+2)
2017-05-22 23:06
Avatar
albeagle
Posts: 142
Regards
AlbEagle

https://flyingforfun.weebly.com/
2017-05-23 00:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi MarMar
Welcome to Mobiflight.... Hello to Poland !

Setting of 5 Rotary Encoders is no Problem.


Mobiflight supports this as a OWN device.
Your Rotary got 3 Pins. ( A,B and Ground). Connect GRD of all 5 Encoders to ONE Arduino Mega. Connect each A and B Cable to each 2 Pins in the Mega.

Example shematic:
Encoder 1 : A Cable to PIN 10 B Cable to Pin 11
Encoder 2: A Cable to Pin 12 B Cable to Pin 13
Encoder 3 A Cable to Pin 14 B Cable to Pin 15
and so on.

In Device Settings Tab of Mobiflight create " New Device" Use Typ "Encoder" and Input for the Both Lines witch Pins you use.
Do the same for the other 4 Encoders and SAVE this Config to the Board ( PLEASE Look the Tutorial for Parking Brake..... I Know there was used a Button not a encoder...... but there you see the basic workflow)


AFTER THAT:
Now you need to make Configs for youre Encoders...... As Stephan told, Here you need to know what Aircraft you use. AddOns like PMDG use other System like Standard Cessna for example.
Please try out. If you got problems still request for further help here !
Good Luck !
2017-05-24 13:56
Avatar
marmar
Posts: 3
Thank you very much for your answer.
I use unfortunately 737 default FSX and 737 PMDG
Also I ve got 2 kinds of encoders. Which will be better ??


KY-040 https://circuitdigest.com/sites/default/files/inlineimages/Rotary-Encoder.jpg
OR
EC11 https://photos05.redcart.pl/templates/images/thumb/995/800/800/pl/0/templates/images/products/995/eedd7b5d8a00a802c3fae022fc43a0ac.jpg

Best regards
2017-05-25 13:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
LOOK UP !

For PMDG you need a different Logic !...... Hardware is the same but Configs are different. PMDG work with EventID instead of Offsets !
So not be supprised youre config that work in Stock B73 will NOT WORK in youre PMDG !

To Encoders....

Both should work fine in Mobiflight.
The First need a additional 5v cable to run ( Old Arduino technics). We talk about this lots of times here in forum (use search engine)

Myself i use the Alps https://www.reichelt.de/Drehimpulsgeber/STEC12E07/3/index.html?ACTION=3&LA=2&ARTICLE=73922&GROUPID=3714&artnr=STEC12E07&SEARCH=%252A

Arguments :
-Metal Encoders are mostly hard to hack! If you need a hole through the shaft for mounting a double layer plastic ones are better.
-The KY040 always is set on the PCB. Maby a problem if you got less space in your element.
-At Last Look for the Impulse/Detent System..... Mobiflight workes better if this is 1:1 (Like 24 Detents 24 Signals) For Example a 15/30 Encoder occures in a situation that only every 2nd Detent will be send to Mobiflight and you have tu turn always double time to get a input !
Good Luck !
2017-05-25 16:38
Avatar
AndyFrew
Posts:
hello...If the leads you are showing belong to the encoder, I would guess that the red and black leads are +5V and ground, respectively, while green and white could be the A and B output lines or pulse and index mark.
If you got it for free and can't find any info, the only way to know is to power it up and see what signals appear on the green and white wires when you spin the shaft. You might need 10K pullup resistors to +5V on the green and white wires to see a signal. An oscilloscope would be very helpful.

pcb manufacturing assembly
[Last edited by AndyFrew, 2019-06-12 23:04]
2018-12-27 19:10
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi AndyFrew,

welcome to Mobiflight!

With Mobiflight you didn't need any pullup resistors because the Mobiflight firmware uses the built-in function of the MEGA to use any input with a (built-in) pullup resistor.

Instead of a oscilloscope you also can use normal LEDs to see how an encoder works (spin slowly!)
Grüße,
Stephan (Time: UTC+2)
2018-12-27 20:14
icon