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
Caspajack
Posts: 40
Hi,

I've built a rotary wet compass for my simulator using a stepper motor which works okay but I would like to incorporate the new function that allows MobiFlight to auto zero the gauge.
Could I use a magnetic hall effect sensor and stick a small magnet to the drum part of the compass? My second question, is there a fine tuning option to locate the exact zero or North point in this case. Or perhaps is there a better way to accomplish this facility?

Regards
John.
2019-12-02 04:29
Avatar
VR-FlightSim
From: United Kingdom
Posts: 99
Supporter
Yes there is!

AS5040 Rotary Sensor (10-bit rotary position sensor with digital angle, ABI, UVW and PWM output)

We just need to convince Sebastian of its great potential for MobiFlight and hope that he will implement its support some day;)

Jay
2019-12-03 11:14
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Thats not needed here.

We not need to talk about new analog devices in this case.
I not figure out completly myself but on first view this new feature is a verry simple "ON-OFF" Switch.

So....
If you use the new system then you have to define a "controll Sensor Input" on a Pin. ( In Device Settings Tab like Sebastian show in Video)

At next systemstart the Arduino Firmware will simply turn the Stepper motor automaticly in one direction..... Basicly Endless for 100 Years.
AND at the moment when on PinX ( We define before) a Signal is detected then it stop Turning and Stepper is calibratet to this point.

So if i understand right its no mater for mobiflight WHAT sensor is in use.... A Hall Sensor (Magnetic) Photocell (Optic) Laser, Acoustic , Mechanic and so on.
Important is just that there is a closed circuit on Controll Pin to stop the Motor on corect spot. So you also can mount 2 wires without isolation that touch together on a special spot.

Hardly said.... You can also simply mount a Pushbutton on that Pin..... On systemstart Motor is turning and when you press the button by hand it will stop and calibrate at this point.
( Not usefull.... I just want to show the funtion that it is just technical a button and nothing else)

Please correct me if i´m wrong!!
Good Luck !
2019-12-03 13:40
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
That’s correct .
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-12-03 14:46
Avatar
VR-FlightSim
From: United Kingdom
Posts: 99
Supporter
Well I can see major issue here. When using this kind of calibration with instruments like wet compass or compass card of navigational indicator, we'll never get decent accuracy with mechanical switch.
I mean we need to stop the stepper in a range of at least 1° and that is mechanically quite difficult though.

It is defenitely a great tool for instruments with lmited range but not for the once with full or endless rotation.

Jay
2019-12-03 18:45
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
You can use an optical sensor like from an old mouse and a tiny hole that allows the beam to go through. That should be pretty accurate.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2019-12-03 21:28
Avatar
Caspajack
Posts: 40
I have tried to set the compass using the original method, but I can't get the compass to work in relation to the P3D one.

Firstly I set the compass to zero, with the it showing North which I guess is correct. When i start MobiFlight the compass works but never tracking the P3D compass.
Strangely when I stop Mobiflight it always return to North. Another issue I've found is that the Compass mode is switched off whenever I go back into the settings.

I assume I should use the Whiskey Compass preset for this?

I have yet to try it with the Hall Effect sensor, they are on the way,

Regards
John.
2019-12-03 21:42
Avatar
krono
Posts: 27
Hi

Looking at the auto zero on the gauges it will be fairly hard to make the gauge zero in the exact position needed. Since this is the case could a further step be implemented where once the stepper stops at zero it then pulses in either direction a set number so that you can adjust per stepper so that it will then go to the correct zero for the gauge. Say for an example the stepper goes to zero and then you have a range of say 10 steps either positive or negative to home in fully.

Ken
2019-12-04 08:12
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
@ Caspajack

The new Auto Calibration ( And also the Manual Calibration we still use since years) does NOT controll the Gauge while Your Sim is running !

Calibration means..... It turn the Motor on Systemstart to the Zero Point ( to have a fix starting situation .... everytime the same) .
After that initial procedure, the Motor is controlled by the Config..... So it do what Sim and Mobiflight told it.


So.... When your Gauge go to north at Startup and maby also go to north at finishing..... Then the Calibration work 100% fine.

If your Compass show wrong data while using the Simulator then 100% sure the Config is wrong.
I not know the Preset and if its set corectly ( We need to CHEK THIS) .....
If posible please NOT use the Preset and setup the Config by Hand.... Then you see directly if it work.

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

@ Krono / VR Flight Sim

I not know the code here. If the firmware simply let the Motor turn "endless" and will stop this "hardcoded loop" after detecting a signal on Controll Pin then your right..... Then it will turn maby a few steps further the Zero Point until the CPU on Arduino "transmit" the Stop Signal to Motor.

More profitable would be a code that say something like.....

1. Turn Stepper ONE Step in a direction.
2. IF Control Pin is LOW then GOTO to 1 and turn it another single Step.
3. ELSE .... Stop Sequence.

So it can not "overdrive" cause every single step is only done after checking the Control Pin before.

I not know the code myself here..... But pretty sure Sebastian did it that way.... Cause its simply the logical solution.
Good Luck !
2019-12-04 09:47
Avatar
VR-FlightSim
From: United Kingdom
Posts: 99
Supporter
I understand the procedure but have to agree with Ken.
He was saying that it would be handy to have final zero position "tune up" through MF on top of the home switch action.
Again, in practise, it might be quite dificult to instal the home switch in precise desired location, no matter if it's a simple switch or IR sensor.

Edit:
I just realised what Pizman meant:)
We can actually do this with "compare" function. Can't we?

My apologies for the confusion

Jay
[Last edited by VR-FlightSim, 2019-12-04 11:05]
2019-12-04 10:39
Avatar
VR-FlightSim
From: United Kingdom
Posts: 99
Supporter
btw
I'm still convinced that the AS5040 is the game changer, not just for the homing but entire new possibilities of MF.

@ Sebastian
I'd be happy to buy one and send it over to you if you're interested to explore it's capabilities.

Jay
2019-12-04 10:51
Avatar
Caspajack
Posts: 40
I have the compass working fine now, Pizman82 was correct, (as usual :) ) the config settings were wrong.
I'm using the 28BYJ-48 motors and the settings that worked for me are:

Transform $*16
Sim/Step 5760 2048
Test Value 11520

These were not my calculations. I found this information on line.

Also the compass mode is working now with the latest update (today), which has fixed the problem.
Many thanks once again for your help and for the tireless work the developers do for the community.

I'm expecting the hall sensors tomorrow so I'll have a look with that option to see how well the auto calibration works.

Regards
John.
2019-12-04 12:45
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hmmm. :confused:

I not use this "new automatic calibration" and not plan for it. So we need to wait for reply of a user that build this already !

I will say.... If a "fine tuning" is finaly needed then the whole system is unless.... If i have to calibrate (fine) it myself on every systemstart then the "old" system is much more profitable. Here i not need a Sensor and the calibration is 100% correct ..... But the disadvantage is that it is gone if we have a electrical shoutdown ( Systemcrash e.g.) and must be done once again.

Summary.... For my opinion the automatic Sensor calibration MUST be 100% accurate ( without needness of manual fine tuning) else its senseless .
Cause it is more work to tune it on every startup as do this maby 1-3 times a year if i got a Systemcrash.
Good Luck !
2019-12-04 22:08
Avatar
krono
Posts: 27
Hi
I think the auto tuning is a great idea and have not had a chance to implement it as yet. The only reason that I thought of the fine tuning was when fitting the hall effect sensor to an existing gauge. As you have said the gauge will now go to an exact spot every time when the zero function is called at start up. If this position is slightly out from the gauges needed place say o or North, then can the gauge then be moved to the correct spot. This is why I suggested the fine tuning as an automatic final step to North or zero as I said if the hall effect sensors position and the gauges 0 position are not quite the same not from your side of things but from say mine in the placing of the hall effect sensor.

I am really looking forward to implementing this but also a little worried I may not be able to pace the sensor in exactly the right place. I hope my thinking is incorrect and there will be no problems.

Ken
2019-12-05 02:26
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Ok..... We missunderstand a bit.

If you mean that auto calibration work fine and hit always exaclty the SAME spot...... BUT you have problem that the Point is not exactly at 360° e.g. in a compass in case of building issue .

Thats no Problem...... Important is for us it move always to same point. What point is not important.
Now i understand the posting VR Flightsim

iconVR-FlightSim:


I just realised what Pizman meant:)
We can actually do this with "compare" function. Can't we?



Exactly Yes.

If your Compass for example calibrate to North 0/360° BUT the sensor is a little wrong and stop your printed scale at 355° e.g. then you can "solve" this with a simple compare like $-5 or maby a If Else with a formula..... More easy for a Gauge without Compass Mode like a Temp Gauge or a Altimeter.

In simple words.... If Stepper calibrate to same point everytime you can solve the difference to the correct zero point with a compare of the Value.
Good Luck !
2019-12-05 13:55
Go to page 1Go to page 012Go to page 2Go to page 2