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
crodrigues
Posts: 37
Hi,
Is there any specification about the encoder to use with mobiflight?

Any tutorial about how to connect an encoder?

Thanks
Carlos
2018-02-09 23:05
Avatar
StephanHo
From: EDDG, Germany
Posts: 1488
Supporter
Hi Carlos,

in the moment you should use 1:1 Encoder (1 puls per detent). An update to use 1:2 or 1:4 Encoders is in the pipeline.

So far I know in this forum is no tutorial but if you search the forum for encoders you should find a lot of hints how to use them.

If you do not know what kind of encoder you have try to search for the datasheet.
If you have a simple encoder you can figure it out. With three pins then try GND on the middle one and on the others a LED with protrction-resistance each (for test take 330 or 470 ohms with a Vcc of 5V). Then slowly turn the encoder and you can see how this encoder works. So the LEDs will light if you turn the encoder from 00 to 01 to 11 to 10 and again 00 (where 0 is LED off and 1 is LED on). If you need 1 detent for this turn arround you have an 1:1 encoder, with two detents you have a 1:2 encoder and so on.

With this knowledge you can configure MF. Instead of the LEDs you connect two free ons of your MEGA, take an EventID and look to you sim what happend.
Please report your experiences here.
Good luck!!
Grüße,
Stephan
2018-02-09 23:28
Avatar
crodrigues
Posts: 37
Do you think this one will work ok?
I have these here.

https://produto.mercadolivre.com.br/MLB-710251213-encoder-decoder-rotativo-ky-040-p-arduino-pic-_JM
2018-02-09 23:58
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3322
Supporter
:thumbup:

But this encoder need a 5v suply additional to the 2Pin +1GRD. .... And maby those encoders are much more expensive.
Myself i use the cheapest and easyest 3 Pin Encoders.... and they work perfect.

I recommend.... If you already order/own it... then use this encoders.... If you just plan.... then buy others with only 3 Pins !
Good Luck !
2018-02-10 04:52
Avatar
crodrigues
Posts: 37
Hi pizman82,

In fact I have both versions and I can tell you that they work perfectly!!!

The 3 pin encoder is an EC12 and it has 3 pins.
Right and Left for data (I am using pin 22 and 24 over arduino)
Center pin of the encoder must be connected to the GND.

The more complex encoder is self explanatory.

Thanks a lot guys. You are the best!
Cheers
Carlos
2018-02-10 15:54
Avatar
Renato
Posts: 10
hello,

I'm using the EC11 encoder on my MCP project.
I made all the configurations using the mouse values(mouse wheel parameters 16384 and 8192). But these encoders, when I turn to increase or decrease doesn't have the same time response as a mouse. The mouse wheel is fast and accurate, differently from encoder that is slow and anaccurate. When I turn the encoder fast and stop, the encoder no stops the pulse, this one always keeps spinning, all the time I always to turn one step at time, but it is so slow. I do not know what the problem

Is there solution for it?

Thanks for your help!
2020-01-09 02:10
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3322
Supporter
Logging Mode enabled ??

If Yes Disable it.... That mode will massive delay encoders.
Good Luck !
2020-01-09 02:21
Avatar
Renato
Posts: 10
Hello Pizman,

Thanks for reply me!

So, Logging Mode is inactive, brackle is unchecked and Log Level is on INFO. Below, we have Offline Mode, and it is unchecked too.... The Test Mode Speed is on Very Fast,is there some relation with the problem? :confused: :confused: :confused:
2020-01-10 01:52
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3322
Supporter
Hi
AT FIRST: Please Confirm you use PMDG ..... If Not the Parameters are not recommend. For Standard Aircrafts Parameter is always Zero "0" .

*****

About Problem.

The Test Mode Speed Setting and also the "Offline Mode" normaly can NOT have any relation to deleays if Inputs.
Only the "Logging Mode" (as i said) is problematic, cause it will technical stop Mobiflight for some miliseconds everytime you make a Input to write us a little Textline.
Whatever.... If you still disable it then this can not be the nature of problem.

The only thing that directly act to speed if Inputs is the FSUIPC Poll Rate ( also in Settings Tab) . Please check this should be as fast as possible ( aslong System is stable)
Recommend is a Rate of 200 or 300 ms. If it is slow at 500 turn it faster..... If it is at 100 maby your System not be able to handle.... So try 200 or 300

Please Report experience here.

*******

About Speed basicly ....

Sure we must accept a Encoder can NEVER be so fast and accurate like the Mouse Wheel.

The Mouse is directly detected by the System (Windows) and is in same way deteced by the Simulator and exute a command there.
So Mouse --> Windows --> Sim

A Encoder is much more difficult.
Encoder --> Arduino CPU --> Calculation --> Sending to Mobiflight --> Calculation --> Sending to FSUIPC --> Calculation --> Sending to Sim --> Sim

You see.... Lots of more Steps. Not problematic in a single Button Press but a noticable delay on a Encoder with 5-10 Inputs per second or more when turn extremly fast.
Whatever.... the delay is there but normaly not so extreme like you describe.... A Fast turn normaly occure in a "afterrun" of maby 3-4 Inputs. Not more.

******
Good Luck !
2020-01-10 05:47
icon