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.

Go to page 1Go to page 0123Go to page 2Go to page 3
Avatar
herly
Posts: 67
I have KY-40 encoder and would like to connect to Arduino MEGA, refer to some instructions from web, it can be connected to any pins of Arduino Mega. I tried several times but it can not function at all. Although I have followed the instruction from MobiFlight Youtube but the result is the same. Please assist me and thank you..

Best regards,
Herly
2017-01-20 12:56
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Hi.

I think you mean something like this.... http://i.ebayimg.com/images/g/ZvoAAOxyTMdTLACV/s-l300.jpg

These Encoders are mounted on a PCB and got a special circuit witch shared GRD and uses 5V too.

This is not need with mobiflight ( and maby not useable ... I can´t get run this Encoders in past)

I will recommend you "normal" Encoders like the cheap ones from ALP ... https://www.reichelt.de/?ARTICLE=73923&PROVID=2788&wt_mc=amc141526782519998&gclid=CKOZ4e3n0NECFVG6GwodfrAJgA

You can buy another manifactor, too. Important is only that these Encoders NOT mounted on a PCB and NOT wired in a special logic for maby an Arduino Kit.
Mobiflight needs Always 2 Data Pins and a GRD Pin on the Encoder ( And another Data and GRD Pin if you want a additional push button )

Hope this helps.

Good Luck !
Good Luck !
2017-01-20 14:04
Avatar
corco19@hotmail.com
Posts: 25
Hi all

At this moment I have an encoder just like that working with mobiflight, and, for now, it has been working fine (I use it for QNH with Jeehell FMGS).

Check the wiring:

GND --> To GND in arduino
BCLK --> To a "random" pin you want to use in arduino
DT --> To a "random" pin you want to use in arduino
SW --> To a "random" pin you want to use in arduino (this is for the switch)
5V --> To 5v pin in arduino (I tried to use it without this connection, and it does not work)

Once this is done, configure the device and input

Finally, try if it works. If it doesn,t recheck wiring and enable debug logging in order to see if Mobiflight recognizes the inputs.

Best regards!
2017-01-20 15:18
Avatar
albeagle
Posts: 142
I'm using the encoder aswell and it is working fine. If I don't connect 5v than the encoder inreases the value no matter which direction i go. So make sure you connect 5V.
Regards
AlbEagle

https://flyingforfun.weebly.com/
2017-01-20 21:00
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Nice to hear !

Then sorry for wrong information.... I Try this in my early phase with poor experience about the technic. Maby i did another misstake, but i not be able to get these Encoders run this time.

But finaly i recommend the alps again.... Cheaper and 1 cable less. And if you want to drill a hole through the encoder to build a concentric rotary encoder these Metal Stuff is bad, and you demage the PCB. Then the simply plastic encoders are much better !

Good Luck !
Good Luck !
2017-01-20 23:14
Avatar
herly
Posts: 67
Dear colleagues,

Thanks lot for your advise, I will try a.s.a.p and give you the result. Have a nice weekend..

Regards,
Herly
2017-01-20 23:21
Avatar
albeagle
Posts: 142
pizman82 exactly what i'm doing. I had these laying around and i used them for testing purpose. I ordered some plastic ones so i can drill a hole and build dual concentric rotary encoders for my radios and GPS :). I didn't get them yet, let's see how it goes. Here some pictures from my radio i want to build for my Cessna 172.









AlbEagle
[Last edited by albeagle, 2017-01-21 00:04]
Regards
AlbEagle

https://flyingforfun.weebly.com/
2017-01-20 23:47
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
:-)
Nice Work.

Hope you got good machines at home.

My first try for this DIY Rotary switches , was with real poor tools..... With a hand Driller it was nearly not posible to get the hole in the middle... ( kill 3 Encoders while testing )
BUT
If you learn it and use a professional drilller or a milling machine this get better and better.

At last one tip to prevent you of going insane :scared: ... Just have always a look for the (realy) Small Metal Balls inside the Rotary Switches.... These " bitc**es hurt you and you spent 4 houres per day to search for them below youre desk. ;)

Good Luck !
Good Luck !
2017-01-20 23:59
Avatar
herly
Posts: 67
I did as instructed, the signal on arduino bib when encoder is turned, but the display remain unmove. Any suggestion? I follow the instruction on seeting as Sebastian describe on youtube..
2017-01-21 02:46
Avatar
corco19@hotmail.com
Posts: 25
I think we need some more info in order to help.

What aircraft are you using? Manufacturer aircraft (A2A, PMDG, Aerosoft..) or FSX default aircraft??

is it connected properly to FSUIP, etc?
2017-01-21 03:48
Avatar
herly
Posts: 67
Oow I forget to inform you. I am using pmdg 737..

Sorry for that and thank you
Herly
2017-01-21 04:05
Avatar
corco19@hotmail.com
Posts: 25
HI

I am sorry to say I have never used PMDG so I couldnt help you much more.

Anyway, It´s understood you need to look for the correct eventID in Mobiflight, and set the value you want to send.

Good Luck!
2017-01-21 06:09
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Dear Herly.

I use PMDG and can help you !
But i don´t know where the problem is.... Do you got Hardware Problems alredy with youre encoder ? (The others here told that it can work in Mobiflight, but you have to wire the 5v+ additional to Arduino.
OR
Do youre switch work and you only got problem to config it for a PMDG Action.

Please test out if you encoder workes correct with maby a standard cessna function.
When youre encoder runs fine then i can help you to set every PMDG function you like. got Lists and configs for most of functions.
Good Luck !
2017-01-21 12:54
Avatar
herly
Posts: 67
Dear colleagues,

I solved already my problem, it was caused by mis coding on parameter..and the pin coding input. Thanks for all and have a nice weekend..

Herly
2017-01-21 19:38
Avatar
herly
Posts: 67
Just would like to ask a question why the encoder, when I turn right or left more fast why the display moving slow? Is there any improvement how to fix it?
Thanks lot..
2017-03-27 08:50
Go to page 1Go to page 0123Go to page 2Go to page 3