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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
juleiin
Posts: 54
Hi,

Little update of the fcu I was talking about in a max7219 topic.







Still wondering how to wire. But I can't do a pcb. I'm still thinking about the push pull. (you can see one method in the photo)

But the problem is with 3 7segment display, I encounter many bugs. There are not all working at the same time.. they display weird stuff whereas when us alone they work perfect and even if I unplug vcc from my 5v pin the display still works :w00t: :w00t: I'm lost, help please :cry:

Can I use 3 7segment in parralel ?

What is the difference between digital and pwm ? Where do I have to plug my 7segment ?

Do you you know where I can get a320 fcu knobs ?

Thanks,
Julien
[Last edited by juleiin, 2018-05-27 18:40]
2018-05-27 15:35
Avatar
juleiin
Posts: 54
I figured out that with two 7 segment display in parallel it's displaying correct information 9 times out of ten. With three 7 segment display it's totally bugging. With only one it's working perfect.

What do I need to do ?

Second question is : is it normal the ky040 encoders skip some turn ? Like it's not in a real plane, there are many many "skips" of value increase or decrease per turn.

Thanks in advance
Julien
[Last edited by juleiin, 2018-05-27 22:29]
2018-05-27 22:05
Avatar
franciscoignacio
Posts: 34
Hi!

I´m in the same situation. I´m starting a new project with a320 using MF, but I´m finding many problems in the FCU module, the rest of the parts are only switches/korry but the FCU is complex due to 7 segment display measurements.

The lcd displays doesn´t fit very well in the fcu panel and for the moment I can´t find a sollution for this with the MAX display.

It would be possible to use a different controller? or the same controller with single 7 segment display module?

And I also need the FCU buttons.

Any information will be wellcome.

Thanks!
2018-05-28 10:50
Avatar
juleiin
Posts: 54
Hi! I managed to almost fit everything, here are the plans I made (there's a bit of cheating with the speed managed led which is on the left and the hdg/trk/fpa/vs which I put on top on either side of the fcu display.



And here's is the "hiding sheet" made of transparent paper.



For the button I printed them on transparent paper (3 layers) then stuck it on a 2mm plexiglass, coloring the edge in black, it's ok!

When it comes to the controller I think with mobiflight you can only use max7219, but you can use different tube (only four for example)
2018-05-28 11:10
Avatar
franciscoignacio
Posts: 34
Hi again!

My problem is that I´m planning my cockpit in hispapanels based panels and comercial sollutions (only the panels) and the displays should fit perfectly to get a realistic simulator.

I will try using max7219 with socket version in order to use independent tubes to config 3 modules for speed/heading and 5 modules fo alt and v/s.

Good luck with your project.
2018-05-28 11:43
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
Hi Guys.

Lots of questions :scared:

At first....

Encoder:
Are the missing detents are systematic ?? So for example every second detent is missing or only every 4th detent is seen by Mobiflight ??
If Yes then you use wrong encoders.... Mobiflight support at the moment 1:1 Encoders.... If you have a 2:1 or 4:1 Encoder then only 2. or 4. detent is executed.
((This should be fixed in the next release by a new tool) . So Wait for next update or use 1:1 encoders finaly.
OR
Are detents missing randomly ( sometimes 5-10 detents are ok then 1-2 missing then 3 ok and 4-7 missing in a row and so on ??
If yes then this can be the "Logging debug Problem" ( Maby 10-20% of users got this bug but Sebastian can not handle it until 2 years. BUT most users report that "enable Logging Mode selcted DEBUG" in Mobiflight will solve this ( whatever why) )

***

About Displays.
We talk about this lots of time here in Board. Please use Search function:
In Short words.....
Max7219 is only the CHIP .... You can use every Common Cathode Display with this chip ( Not only the 8 Red fixed ones )
If you need a special Display ( in case of a exact dimension of the hole in your prebuild panel) then buy a Display ( Only Diggits ... Without a chipset) in that configuration...
For example a 3 Digit Display like this https://www.ebay.de/i/323014447414?chn=ps&dispItem=1

THEN Simply remove the 2x4 Red Displays of your MaxTube ( If you have one with plugged Diggits) OR wire it to a single chip like this https://www.ebay.de/itm/2-Stuck-LED-Display-Segmentbar-Treiber-Chip-MAX7219CNG-MAX7219-fur-Arduino/162887443810?hash=item25ecd92562:g:4hQAAOSwJc9ad~GF

(And here a link for the plugged MaxTubes .... https://www.amazon.de/8-Digit-Display-MAX7219-Digital-Control/dp/B00P9277BE )
THEN All is possible..... With big benefit that the Max Tubes now can be placed away from your panel somewhere behind where you got more space !

****
About Display Bugs.

Please confirm you wire EVERY MaxTube SINGLE with 5v of the SAME Arduino you set the Display.
If you use a Chain with 3 Displays for example then NOT use 5v from Tube "A" to Tube "B" .... Use 5v for EVERY Tube direct from 5v Pin on Arduino !
The other 4 Lines can be used chained from tube to tube..... But NOT 5v .
( Or you need to remove a diode manualy on the MaxTubes..... then you can use the 5v from tube to tube, too.)
Good Luck !
2018-05-29 07:31
Avatar
juleiin
Posts: 54
Hi!

The missing detent are each time I beggin to turn it too fast. And I enabled Logging mode debug.

At first I thought it was the encoder quality, could it be ? It's the ky040.

And I confirm like in the other post that they are not in a chain, and I use the 5V pin and GND pin for EACH tube, which result in a parallel circuit like this :



Is it okay ?

Thanks,
We'll make it!
Julien
2018-05-29 08:22
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
Lets talk about the Display Problem in the other Topic.

About encoder:
Do you have the Logging Problem ??
If NOT then activating Logging Mode is not good.... With active Logging Mode Encoders will get slower.

Another fact is the system you use.
Is this a AddOn aircraft or Stock A320 ?? Do you use EVENT ID or do you manipluate a Offset like $+1 or is this a Datapipe of Jeehell ??

Always think about.... A simple Offset Write will need only 1-4 Bytes to send by Mobiflight and the chage will execute DIRECT in FSUIPC and Sim.
If you use EventID then Mobiflight must send 8 full Bytes in a special sequence.... If you use a AddOn the the Event in sim must start another internal Event in the AddOn.

For a ON/OFF Button that is pushed 1 time and then some seconds no another input is done thats no problem.
BUT A Encoder will send lots of commands in short time ( maby 10 or more per second on fast turning)

So a High number of Commands cobine with a 8 Byte need and a maby 2-3 time transmitting from FSUIPC to Sim to AddOn occure in missing detents cause the hole system ( Not Mobiflight itself) can not handle this level of data rate ! ( Just a idea thats not confirmed)
Good Luck !
2018-05-29 08:55
Avatar
juleiin
Posts: 54
iconQuote:

With active Logging Mode Encoders will get slower



Seems a bit better without it thanks! And it's a 1:1 :)

Good evening!

I'll be coming back for future questions aha!
2018-05-29 20:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
If i understand right from other topic we talk about Jeehell FMGS Right ??

If Yes we talk about DATA Pipe.

So Mobiflight must READ a Data from a FSUIPC Offset to get the current Value of the controlled system (HDG for example)
This Offset must be written by Jeehell before ( Another working process for the system)
Now Mobiflight must Calculate the read value by your formula ( like $+1)
Then Mobiflight must write 2 Offsets in one process ( and get shure there is no other write in this moment to get this datapipe work fine)
After that Jeehell must recognize the chaning of Datapipe Offsets in FSUIPC and must read this data and must also calculate this information.
Finaly Jeehell execute the command internal.

And all this stuff must be done 10-15 times per second when you turn encoder !! Uaaaghhh:cry:

****
You can test one thing....
Use the installed Encoder.... Open a Standard aircraft like Cessna.... And controll for testing a simple EventID from the List like "Increase AP Heading"
Also make a test with a Mobiflight Offset system like the Offset 07E2 2 Autopilot airspeed value, in knots $+1

Please report experience.... Is the Encoder working smoother and better here..... then the problem is simply the difficult Jeehell System.

if YES.... then Think about maby a another NON-Mobiflight Solution for the Encoders.... For example a LeoBodnar Board or a self reprogrammed UNO with a Joystick Library.
Jeehell support every element with Joystick commands..... Then a turning of Encoder Left will simply push Joybutton X and a Rightturn will push button Y . In Jeehell settings you define Button X is function Increase Heading for example.... and so on!
In THAT Case the command get direct to Jeehell ( without the detour over Mobiflight, FSUIPC and so on)
Good Luck !
2018-05-30 00:06
Avatar
franciscoignacio
Posts: 34
Hi again!

I'm finding some problems programing my home 320 FCU.

The encoder datapipe function with $+1 and $-1 to increase and reduce the value works ok in ALT and Speed because they are only positive values, being 0 the lower value.

The problem that I can't solve after looking al lot of threads in this forum is the next:

When I program datapipe function with $+1 and $-1 for Heading it works perfecty while I increase the value and decrease but when I try to decrease below 0 in the left direction, to select 359, 358 degrees... etc it remains in 0 with no change. What math operation should I use with ($-1) in order to pass from 0 to 359 in the left direction?

Some similar happens with Vertical speed. When I use datapipe ($*100)+1 to increase and ($*100)-1 to decrease it runs perfectly until I arrive al -100 value. Later If I continue turning left to increase desent rate it show 8000 value. Imposible increase descent rate below -100 fps

I think that I should use some math operations to manage this parameters, but I'm totally lack of ideas at this point... some help?

Another problem is the mentioned topic about the encoders rate 4:1, 2:1, 1:1. There is a complete lack of information in electronic shop,s about this fact and buying they is look like a lottery for me. I have a lot of them, some cheap, some expensive, diferent brands and specification, but all are 4:1 and they are terrible to try to manage the fcu, but this is another history for a another post...

Thanks.
2018-06-01 00:44
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
Hi

About encoders 4:1 :
YOU must always read the DataSheet or the informations in the Shop.
That always explane what Encoder you got.... ( Whatever in some Ebay Shops or Amazon this information is missing.... But a Real electronic shop support this )

Check for example here ... https://www.reichelt.de/Drehimpulsgeber/STEC12E08/3/index.html?ACTION=3&GROUPID=3714&ARTICLE=73923&START=0&OFFSET=16&SID=96Wt2zJKwQATQAAFN11eEfc5fe9c0b4de4914baa0d87b34b89928&LANGUAGE=EN
In the Name of the Encoder you already see it´s 1:1 cause it calls "ALPS STEC12E rotary pulse encoder, 24/24, vert., w. PB"
Below you see Pulses: 24 - Detents: 24 So you got same number of Signals and detents. So it´s 1:1

Other example is this.... https://www.reichelt.de/Rotary-Pulse-Encoder/STEC11B01/3/index.html?ACTION=3&LA=2&ARTICLE=73911&GROUPID=3714&artnr=STEC11B01&trstct=pol_1
That called 15/30 .... 15 Pulses - 30 Detents..... so its 1:2 cause you have 30 Detents but just 15 Signals. .... 30/15=2 so only every second detent give a signal !


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

About your config question.

Here we get 3 possible situations.
Some Addons get an error if you make a Input that is out of Range. (Not see myself but some people tell me)
Most others like Jeehell simply Ignore a Input out of Range and stay in last possible value (as you said you turn Left on ALT 0000 and nothing happen ( whatever you send -100)
Some rare Addons will Understand the Out of Range Input and "know" what you like.... so if you on Heading 000 and you turn left you will make a Input of "-1" and those addons check this and set itself to 359. ( EventID for example handle this all itself)

Jeehell should be Number 2.... It not crash but it also not solve this overrides itself.

Solution:

Here i can give you the tool to make it work..... BUT i not use jeehell and can´t test it. I Also not see the values that jeehell work with and must belive in my old PDF File.
"Maby" you need to check out the used Values yourself. Not shure if they correct.... BUT the Math Functions are the same !

1. HDG
Here you need 2 Calculations.
For ON LEFT you need the swapp from 0 to 359 (Instead of -1) use: if($=0,359,$-1)
That means... IF Value is 000 At the moment and you turn left THEN Set direct to 359 ... ELSE ( If Value NOT Zero) simply $-1 .
For ON RIGHT you need to Swap from 359 to 0 (Instead of 360) use: if($=359,0,$+1)
That means... If Value is 359 THEN direct jump to 0 when you turn right ELSE ( All other values) simply $+1 .


2. VS Speed.
Here i not undertand your System ($*100)+1 Why a (bracket) * already done before + And why this combination ?
I not know the Jeehell used Value but there should be only 3 possible ways.
A) The Input says "VS(format is VS in ft/min)" So the input should be $+100 Cause it say you should enter Feets per minute
B ) The output says "V/S in (ft/mn)/100" If Datapipe use this format then it should be $+1 to increase 100ft
C) If Jeehell use format of $ from Output and Format of Input for the Pipe then you need a Combination. Here it is ($+1)*100 or $*100+100

BUT Whatever your ($*100)+1 makes no sence to me. Maby i missunderstand but i think THIS is wrong !

I also think if you use the correct value ( simply try out the 3 ways and observe the Output Offset what happen) THEN the Minus 100 Problem is gone....
This problem is in case if your issue i think ... So a IF ELSE is normaly not needed here.

Please report experience !
Good Luck !
2018-06-01 06:35
Avatar
franciscoignacio
Posts: 34
Hi again and many thanks for your infinite help.

The heading problem has been solved with this:

1. HDG
For ON LEFT you need the swapp from 0 to 359 (Instead of -1) use: if($=0,359,$-1)
For ON RIGHT you need to Swap from 359 to 0 (Instead of 360) use: if($=359,0,$+1)

It works fine! perfect.

But the Vertical speed is not working below 0. For mi little experience, looking in a debug mode, the input value for this V/S is the next.
For on right. ($+1)*100 it works ok.

Looking in debug mode.
Current value 1, execute right turn (1+1)*100 display 200
Current value 2, execute right turn (2+1)*100 display 300
And in advance the same until 80 that is the maximun value it shows and airbus logic seems to accept 8000 fpm

But for on left ($-1)*100 it doesnt work when you are below 0
Current value 0 execute left turn so that (0-1)*100 display -100
But the next encoder left turn current value hop to 255 :blink: and it should be -1

I don't know the reason, because I'm now starting to undertand the jeehell logic, but it looks like as only positive values can be managed.

Thanks again!
2018-06-04 12:06
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3519
Supporter
iconfranciscoignacio:


But for on left ($-1)*100 it doesnt work when you are below 0
Current value 0 execute left turn so that (0-1)*100 display -100
But the next encoder left turn current value hop to 255 :blink: and it should be -1

I don't know the reason, because I'm now starting to undertand the jeehell logic, but it looks like as only positive values can be managed.



Concrats.... You find a BUG in Mobiflight :rolleyes:

Here we got a SIGNED- UNSIGNED Problem again . Sebastian realy need to think about that stuff in the future !

Short explaned.... A integer Value ( Offset) can be Signed or Unsigned !
A 1 Byte Offset for example have a Range of 256 different values....
If it´s UNSIGNED then it goes from 0 to 255 ..... If it´s SIGNED it goes from MINUS -128 to +127

In Unsigned 127 is same like 127 in Signed..... But 128 in Unsigned is MINUS -128 in Signed, ..... 129 in Unsigned now is MINUS -127 in signed and so on.
Finaly you see.... MINUS -1 in Signed means 255 in Unsigned. ( So all is correct and the value make sence finaly)

*****

To Solve this you can try a Formula..... But Basicly this must be reprogrammed in Mobiflight internal System.... Cause Mobiflight simply work with wrong Datatype here.

Please try the follow lines.

LEFT:
if($>127,($-257)*100,($-1)*100)

RIGHT:
if($>127,($-255)*100,($+1)*100)


not shure if this work..... Just a idea. Please try out !
Good Luck !
2018-06-04 12:40
Avatar
franciscoignacio
Posts: 34
It works perfect! You are a genius!

LEFT:
if($>127,($-257)*100,($-1)*100)

RIGHT:
if($>127,($-255)*100,($+1)*100)

Thanks by your excellent work and ultra fast answer!
2018-06-04 12:54
Go to page 1Go to page 012Go to page 2Go to page 2