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
les
Posts: 21
Hi guys,

I have made an autopilot panel using the tutorial
Videos , led segments to display Vs, altitude, IAS and vs. with 4 encoders to set them.

Speed and hdg work ok, displays are fine, the encoders didn't always change the settings, sometimes you would have to turn three or four clicks before a change. I enabled debug mode, now it works every click but there is a lot of lag between clicks and the display changing.

Altitude starts out ok, but after changing the setting a few times, the led display will go off or display a few random led segments.

Vs encoder does not work at all, have followed the tutorial, checked all the wiring three times, and checked the config.

Any ideas?
Thanks
Les
2017-07-13 10:27
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi les,

the ideal relation of an encoder ist 1:1 - means 1 detent 1 pulse.
It seems that you have encoders 4:1 - means 4 detents 1 pulse
That should be the reason why your display-changing is so sluggish.
To understand this try the following link: http://svglobe.com/arduino/in_encoder.html (go to the middle of the page)

If the altitude- Display goes off or shows only a few random segments this may cause an incorrect wiring, please check it. If you had the connections soldered, so check them please double. If you use the MAX7219 Boards in a daisy-chain, check that you replace the built-in Diode (D1) against a wire-bridge. Otherwise supply every board with a seperate 5V connection. If a Display is #3 or higher in the chain, the voltage is reducet at every board by 0,7V. Please check this and change the power like one of the obove cited ways.

Depending of the VS encoder: do you mean the display for the altitide-setting or the display for the rate of climb/descent?
[Last edited by StephanHo, 2017-07-13 15:12]
Grüße,
Stephan (Time: UTC+2)
2017-07-13 12:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Les....

We need some more informations from you....
What Aircraft ( AddOn) do you controll. Standard or maby PMDG ??

To the Problems....

The Displays...
Here Stephan already say the important facts....
A Display that show nothing or 88888888 normaly is wrong wired ( Take a look to the Solder Points of the 5 Pin Wire Headers) .... Lots of the Chineese Displays have issues in the Pre Solder Points )
A Display with wrong Segments ( After a while) is normaly not powered enough.
As Stephan Said.... Not Use the 5v from the last Display in a row... Always get 5 v direct from Arduino to each Display ( Or if you good technical... Uninstall the Diode)

If you like you simply can check this.... Install your 4 Displays eachone single on the Arduino ( Each with 3 Pins.... No Daisy Chain ) .... Then it should work if there is no real issue in one of the Displays


Encoder:
You say the missing actions stop with using "Logging Debug"
So i think you got the Debug Problem ( Like me too). Here another User still report the missing commands are gone when using DEBUG Mode BUT then you have lags in Encoder Uses.
Problem is.... Sebastian NOT get this Problems on his System ( this is only at maby 20% of the Users) We still research this since 6 Months but not became a solution. I HOPE we can help you in the future.

If you like to help us..... Then you can recheck one thing and Report us the result.... Maby this helps in our research....

Please make a Mobiflight Config WITHOUT Outputs.... Only The Inputs you still use.... Save it and Restart Mobiflight and Simulator
Then Start the same Test Situation like now and Test with "Logging Mode ON and Logging Mode OFF"
Can you Confirm the Lags and Delays of Encoder are still there.... If Yes are they still there only with Logging Mode ON ??

Would be nice if you find time to do this in the next weeks.

Thank You !
Good Luck !
2017-07-13 21:19
Avatar
les
Posts: 21
Hi,
Thanks for the replies,
I will do the test on the lag without outputs and report back this week

I have 4 max led units wired up, no daisy chains.
All wired into a single arduino mega.
The altitude display is set to pad with zeros, it displays perfectly to start with, in my particular setup it displays
An autopilot alt of 5000ft. If I then start changing it using the encoder, after a minute or so the display goes either blank (no LEDs lit at all) or a few random individual led segments remain on . Using the encoder some more doesn't change the display at all and it only returns to normal after a full shutdown of everything and restart.....
2017-07-21 11:18
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Ok.

Now without daisy chain we can exclude this problem. The already existing issue must have another reason.

I think about this fact....

You know the Max7219 MUST be booted when you startup the Arduino Mega..... The Wirmware must set the Display to our needed setup..
If you for example set a Max Display.... Start your arduino and then you disconnect the Max7219 5v Cable for 1 Seconde and reconect it again the Display will not work again.... Cause its not bootet now. You have to reset the Arduino again so the MaxChip rebootet to startup state again.

MABY this is your problem here....
Please confirm you connect your Display PERFECT on the Arduino. And confirm the Pin Header on the LEft side is solder 100% Correct without Wiggle Contact .
I remember my first testing runs long time ago where i connect the MaxDisplay just with some JumperWires direct in the Solderpoints (No Pin Headers was solderd already)
This workes for some minutes.... But just the vibration of knocking an the table was enough to kill the connection for a millisecond and then the Display was broke (Not Booted) until a restart is done.

So my tip here. Please get shure: The Pin Header is used and PERFECT soldered..... And Your wire system is solderd, too or with Crimp Contacts.
The MAx7219 is verry sensitive.... A provisionaly wire system not work. solder everything (in best quailty) is high recommend !!
Good Luck !
2017-07-21 16:06
Avatar
les
Posts: 21
Hi,
I think you are right! All the displays now work after a recheck of all the wires and complete restart.

All the encoders work, just the push buttons which I can't get working

(The vertical speed encoder has stopped working now, so I think I will get rid of the jumper wires and breadboard and solder everything)
2017-07-26 10:50
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
I know this is bad.... Myself i use breadboard, too for testing the elements..... But it´s not perfect... You know now already!

iconles:


All the encoders work, just the push buttons which I can't get working



You mean the Push Buttons ON TOP of the Encoders or normal Push Buttons ??
Both should working perfect with Mobiflight !

If you need help please explane us your setup and what you like to controll in the sim. I will help you then !
( And if posible give us the exact name of your Button/Encoder or a link to the data sheet. )
Good Luck !
2017-07-26 15:42
Avatar
les
Posts: 21
Hi,
It's the button activated by pushing the encoder knob in.
The small light on the Arduino board flashes when I push them, so I think therefore they are working?
So could it be a problem with my input programming on mobiflight?

Would anyone be able to write out exactly what
Offset and values formula I would need?

I'm trying to have a setup where you turn the encoders to set the altitude, speed, heading. Then push the encoder button to activate it.
So far, the encoders all work for setting the values, my master autopilot switch works, but can't seem to get the others to work
Regards
Les
2017-07-28 13:25
Avatar
mikeb1028
Posts: 29
Supporter
Have you setup the encoder button as a button in MF? Using a tutorial I found on here, I use one encoder to set the COM1 frequency MHz and KHz. Push the encoder button and the encoder changed the MHz. Push again, it changes the KHz. The tutorial could be used in your application as well.

If you haven't set it up yet, check out the tutorial in the forums. Very helpful and I now have COM1, COM2, NAV1 and NAV2 working.

I don't have the forum post link at the moment but I can find it if you need it.

Or maybe you have it setup and just need the offset to code into MF?
2017-07-28 20:46
Avatar
les
Posts: 21
Hi,
Thanks for the reply- I will need your tutorial, if I ever get the autopilot working, the radio is my next project!!

The push switches on the encoders do seem to all work- if I set them to event "toggle spoilers" then they all work as a toggle for that,. But I can't get them to work on the autopilot functions. I'll try to find the tutorial, as you say I could use your MHz/khz method with the right offset to toggle the heading hold / alt hold / speed hold...

Fs2004 by the way

Thanks
Les
2017-07-28 23:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Again my friend... We only can help you if you give us the information WHAT Plane are you using....
For example the Standard FSX B737 not have a Push Function for the MCP encoders....

If you use maby a special Airbus Addon then you need another technic. For Jeehell you need a special Offset or a Joystick Command.
Thats different to standard Aircrafts !!!

So i think your button is still conifgured correct cause you tell me it work with other things like spoilers....
Then you simpy need to look for the right command. Check your FS2004 Offset List for the action you like ( for example Altitude Hold) and then set this command to the Push Button ON PRESS.

Sorry if i missunderstood you..... But i not see the problem.... You already know how to set a function to the button like spoilers... So why you not simply use "Set Altitude Hold" instead of "Toggle Spoilers" . ????


The Tutuorial is a sticky ..... https://www.mobiflight.com/forum/topic/652.html
Good Luck !
2017-07-29 15:23
Avatar
les
Posts: 21
Hi,
I using fs2004 and standard aircraft as a trial, will hopefully use my add-on aircraft once I get everything working.
Taking altitude hold for example:
I set the "on press" to no action
Then for the "on release" I used the FS offset from the mobiflight drop down list, in the value box I set :
If($=1,0,1)

When trying it I get no response .
Maybe the drop-down offset list works for fsx but not fs2004?
Or my code in the value box is wrong?

Thanks for the help as always
2017-07-31 17:33
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi les,

if you want to use Mobiflight with FS2004 you should use the EventIDs für the FS2004.
You can download them here: http://www.schiratti.com/files/dowson/FS2004controls.zip or
took the whole package from http://www.schiratti.com/dowson.html

These EventIDs are only for the standard-plane of FS2004
Grüße,
Stephan (Time: UTC+2)
2017-07-31 20:49
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconles:


I set the "on press" to no action
Then for the "on release" I used the FS offset from the mobiflight drop down list, in the value box I set :
If($=1,0,1)
When trying it I get no response .

Maybe the drop-down offset list works for fsx but not fs2004?
Or my code in the value box is wrong?



I think maby the Problem is the missing ON PRESS. I can not test it at the moment cause i´m at work but i "think" that i remeber it is not posible to set a ON RELEASE without a ON PRESS.
So On Press always must be first use.
Please tell me WHY do you want a executing of the command specialy on the release ?

If it´s no matter that using Press or Release then please try out using ON PRESS instead of On Release for your function.
If it MUST be On Release (Whatever reason) then i recommend to set a FAKE Input on Press... For example a Key sending of a not used key.

Please report if this helps.

*************

To Offsets Basicly.... I Never used FS2004 for Homecockpits so i not informed about FSUIPC V3.x for FS2004 and i don´t know the Offsets. BUT I Think 98% are simular to FSX. Stephan already link you the Files....
So just Note.... The Presets in Mobiflight are only examples.... Please simply recheck if used Offsets are correct for your FS2004 List, too. Or directly imput the data youreself !
Good Luck !
2017-07-31 22:58
Avatar
les
Posts: 21
Thanks guys
That's great,
I'll check it all and report
2017-08-10 16:05
icon