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 012Go to page 2Go to page 2
Avatar
jjvelar
Posts: 47
Hi,

I'm building a wet compass but I'm not able to make it working properly.
My setup is:
pin 1: 13
pin 2: 12
pin 3: 11
Pin 4: 10
offset: 02cc
value type: int
size in bytes: 9
mask: 0xFFFFFFFFFFFFFFFF
sim / stepper: 360 / 2048 (why 2048 and not 4065? this motor's stride angle is 5,624º with 64 steps. And 64 x 360º/5,625 = 4096)
test value: 2048 (btw, what is it for?)
compass mode: ticked

problem #1: the manual calibration is not moving the stepper with poitive values (+1, +10, +50)
problem #2: when the plane moves, the stepper does not show the right heading

am I doing something wrong?
2016-12-29 22:02
Avatar
jjvelar
Posts: 47
someone? please! :-)
2016-12-31 17:11
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Hi

what aircraft are you using? The offset settings are not correct. Try using FLOAT and use bytes 8 as stated in the FSUIPC documentation.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2016-12-31 19:11
Avatar
jjvelar
Posts: 47
Hi,

First of all I'd like to wish you a happy new year.
I'm using PMDG 737NGX.
You were right: It's a 8-bit FLOAT. It was a typo. Sorry for that.
Which should be the right parameters for this gauge with thiss stepper motor and driver?
Thanks again,

Jose
2017-01-02 00:14
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Hi Jose....

Sim means the Value of offset that should be a full circle of the Stepper (In youre case 360 for 360 degres)
Steps must be right for youre motor..... Just Multiply Steps and gear rate ..... In youre case 64*64=4096 (more later)
"Test" means a value you want to display for testing.... In youre case i would use 360 to let the Compass make 1 full turn ... or you take 180 for a half circle test run or maby 720 for 2 Full Circles......
If you wan´t to find out exactly how many steps youre motor got use the Test function..... Use maby 10 times the "Sim" Value for Testing..... In this case 360*10=3600
So the Stepper turns 10 Times a full circle..... If the "Steps" are right it have to stop exact on same point that it startet before..... If it stops a little away then the steps are to low/high.... I Read that this motors are not perfect build.... the Steps are 0,x % variable. Not Important for a Compass or Flaps Gauge..... But a altimeter is maby more hundret feets wrong after climbing to FL380 for example.


At last.... If you not be abble to set Zero Point pleas check if Mobiflight is not Running (Play Button) If the Stepper is active youre not be able to set it cause it parallel get comands from Simulator too.

Good Luck.
Good Luck !
2017-01-02 06:06
Avatar
avidflyer
Posts: 138
Hello Pizman82,

i trieded today the compass mode with a stepper. I put in 2048 as steps and 360 for the Sim value (it seems so that my stepper has 2048 stepps). In the test the stepper turned 180 to south but 90 and 270 he turned in the wrong direction. (90 = west and 270 = east) Connected to the Sim he behaved the same way and turns in the wrong direction. How can I change that?
I used a default plane (Cessna)

Thanbks in advance

Christian
2017-01-02 10:08
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Hiho.

Youre right. I Just try this without a real Compass Module.... Just on my labratory Testing Board.....
The Compass Must turn Counter Clockwise to show right direction i think ....

After short thinking there are 5 ways to solve this .

1. Rewiring the Motor.... I never try but google brings some hits.... If you change the wireing logic from Motor Pins on ULN Board the direction should be reversed.
2. Try to Interpolate the Value. Maby 1=359...... 359=1 ( Not sure if this workes cause there is a special function to solve the 359/0 problem in the Compas Mode)
3. Just mount the Motor from the Other side. If you build a WET Compass like in 737 put the Motor on top... So it´s direction is mirror inverted
4. Use two Cogwheels to build a 1:1 gear for inverting direction.
5. The "software way".... Let´s ask Sebastian to set this in Programm..... In Code he tell the motor by +1 or -1 the Direction.... he only have to change this when Compass is active OR he add a new Clickbox for Steppers where we can decide witch direction this config should have. Maby this checkbox is the better way cause there are more gauges that need counterclockwise motors (else we always need to campare the value for right display.!


Good Luck !
Good Luck !
2017-01-02 23:11
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Interpolating the value works. Please try it out. Assign 0->360 and 360->0.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2017-01-02 23:38
Avatar
avidflyer
Posts: 138
Thanks Doc and Pizman82,

I put in the Interpolation 0 = 360 and 360 = 0 and it runs great. I saw that whiskey compass behavoir is also simulated, up to this point I didnt recogniszed this.

also Süd drüber und Nord vor

Thanks!!!!

Christian
2017-01-03 08:40
Avatar
klaasemann
Posts: 6
Hi,

i have printed Heinblöd´s Wet compass - it is great !
The compass is working but it is turning the wrong direction.
When using interpolation 360-0 the stepper it is not working. Unclick interpolation the stepper runs.
Maybe create an "invert" button for switching direction would be nice.
How dows the "set zeropoint" work ? Do i have to recalibrate after every start ?

Thanks in advance
Klaas
2017-01-16 18:28
Avatar
avidflyer
Posts: 138
Hello,

Did you put in the two lines for interpolation or only one?
0=360
360=0

Regards Christian
2017-01-16 19:11
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
As avidflyer said....
Youre interpolation needs both lines.... with only 360=0 it can´t work cause then 0 = 0 too :-)

About Zero Point.

You set the Zero Point normaly only one time when creating the config.. So Mobiflight will Return to this point after Sim is Closed..... BUT. If you got a Error or crash and mobiflight doesn´t reset the stepper then you have to recalibrate it. While Bulding and testing this happend lots of time maby.... But when you finished youre Project and Mobiflight have a working config these errors normaly not happens again.... Only while a blackout or a system crash in Simulator for exemaple.
Good Luck !
2017-01-16 20:21
Avatar
klaasemann
Posts: 6
Hi Pizman and Christian,

thanks for your respopnse.
I tried to add a new, second line (360 - 0). But Mobiflight crashes.
Added a new compass and just modified the second line (1024-1024).
Now it works !

How do add screenshots within posts ?



Cheers
Klaas
2017-01-16 21:23
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Hi Klaas

To add pictures you need a webspace or a puplic file Uploader.... Just click on "Picture" in the menu above the smilies and copy/paste the link of the uploaded picture between the img/img.

Nice to hear youre compas work..... I can´t understand what you mean with 1024-1024 ( Cause the Compas only got a value from 0-359 ..... but it works .... thats was the target.
Are im right that you use for "sim/stepper" input in servo setup not 360.... you use 1024 there ???
Yes then the Interpolation needs to be 0=1024 ..... 360=0
I will recomend you here to use for "sim" the value range of original Offset .... "360" in that example !

Good Luck !
Good Luck !
2017-01-17 09:52
Avatar
klaasemann
Posts: 6
Hi Pizman,

hm not really perfect becaus i still have probs to set the zeropoint for the compass.
My settings are:

Offset: 0x02CC, Float, 8 bytes
Compare/Interpol: 360 - 0 and 0 - 360 ( 1024 -1024 is the default value of the second line. You have to edit this line because adding a new one will crash MBFLT )
Sim/Stepper: 360/4096 (1024)

My prototype Cessna gauges are working perfect with following values:

RPM 3500
Offset: 0x2400, Float, 8 bytes
Sim/Stepper: 77/32

VSI +/- 2000ft
Offset:0x02C8 (FSUIPC profile - General Current VS)
Sim/Stepper: 81/32

Frontside with VC:


Backside:


With Cmopass:



I just ordered some more steppers for my next gauges...


Cheers
Klaas
2017-01-17 21:04
Go to page 1Go to page 012Go to page 2Go to page 2