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
smoothchat
Posts: 41
Supporter
Hi ,

I am creating a flaps guage using a standard stepper motor BYJ48.

Everything is coming along fine, however, when the guage has to move a long distance in a single motion, it accelerates to a point where it seems to be driven too fast and it stops momentarily until the step speed decelerates.

Once this pause happens, I have to re-calibrate the Zero position again.

Is there a way that I can slow the top speed of the stepper to solve this?

A "Stepper Speed" setting would be very useful, but I'd be also be very happy just to change a value in a file somewhere if that is possible.

Thanks.
2016-12-27 00:51
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Hello smoothchat

That sounds strange...

Normaly the Stepper BYJ48 with ULN2003 Driver workes with Mobiflight. That Motor should always find it´s Zero Position and is not needed to recalibrate (Only if Mobiflight Crash while using)
I Think we can help you better if you tell us your situation exactly..... What AddOn Aircraft do you Use ? And Whats set in the Config ? Offset, Transform, Compare, Interpolation, and the Stepper Values in Display tab pls.

To check maby a mechanical Problem first.....
Do you Use a physical EndStop in youre gauge (like a smal Metal Pin in Zero Position so the Needle can´t move over) ?
Do you put the gauge needle fixed on the Motor Shaft OR is it movable ?

This is just a Theory cause i got this issue in a testingobject too.....
If the needle is not fixed and run to a Endstop.... And the Motor want to move again in this direction then the shaft is turning and slips through the mounted needle (the needle is already blocked by the endstop)..... If this happen then the Motor Zero Position is alredy correct BUT the Needle is showing wrong positions cause its now in a other proportion to the shaft.

So if it´s not a mechanical Problem like above then tell us more about config... We can help sure.

Good Luck !
Good Luck !
2016-12-27 13:17
Avatar
smoothchat
Posts: 41
Supporter
Thanks for the quick reply,

No Endstop, and the needle is just a piece of paper for testing.

PMDG 737NGX

Standard interpolation settings 0, 210, 310 etc, Stepper 1000/2040

It occurs when the stepper pulses reach maximum speed.

The simplest way to demonstrate the issue is to fully lower the flaps on the sim before activating Mobiflight. Once activated, mobiflight causes a full swing and acceleration of the flap guage down to 40. The problems occur when the guage reaches full speed during that movement.

The "Test" feature with a high number to allow a full rotation, also demonstrates the issue.

A way to slow the guage would be a nice feature in anycase to reduce and smooth the "catching up" acceleration as the flaps retract. MAX speed, and Acceleration curve values would help a lot here.
2016-12-27 23:24
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Hi guys,

I had experienced the same problem once or twice. It is specific to the motor.
I will either reduce the max speed or will give the ability to adjust the max speed.

Please stay tuned for an update during the next couple of days.
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-28 00:01
Avatar
smoothchat
Posts: 41
Supporter
Excellent!

MAX speed could allow us to tweak out some of the "hunting" as the guage chases the sim values.
2016-12-28 00:18
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
iconDocMoebiuz:


I had experienced the same problem once or twice. It is specific to the motor.



i´m wondering....

How can a Motor (BYJ48) and a Controller ( ULN2003) produce different situations to my setup ???
Sorry for missunderstanding.... i was sure that all Byj48 Motors works in same way all over the world :-) Strange!
Good Luck !
2016-12-28 01:36
Avatar
smoothchat
Posts: 41
Supporter
Could just be some slack in the gears between batches or different manufacturer components.

Being able to set the maximum speed is a good idea in any case. I'd also like to set the acceleration curve, with the PMDG737, the stepper does a bit of "hunting".
2016-12-28 03:47
Avatar
smoothchat
Posts: 41
Supporter
iconDocMoebiuz:

Hi guys,

I had experienced the same problem once or twice. It is specific to the motor.
I will either reduce the max speed or will give the ability to adjust the max speed.

Please stay tuned for an update during the next couple of days.



Any news on the stepper speed fix?

I tested several steppers and had the same issue. The top speed of the stepper seems too high. A speed limit setting would hopefully solve the issue.

Thanks again for an excellent program.
2017-01-08 22:32
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
I was able to do some testing and I updated the Stepper library. It seems to be working with the old speeds. Now I wanna see if I can even increase them a little.
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-09 07:20
Avatar
smoothchat
Posts: 41
Supporter
In my case, I would want the stepper to move "SLOWER" not faster. I would even like to disable acceleration.

I think a speed control would help in many ways to reduce the hunting that the guage does with slow moving flaps (like PMDG737) .

If we could have a slider or just a numeric field to set the maximum speed, that would help greatly. I would wind it right down so it doesn't "hunt" but just keeps pace with the PMDG flaps.

The PMDG gives values 1,2,5,10,15,25,30,40. Which is not linear.

There is a point between the PMDG flaps values 0 and 1 where the stepper doesn't move, then it RACES to jump to position 1. I have tried putting extra interpolation values, but they don't seem to have any effect on values < 1

There are other points where the stepper actual reverses slightly after overshooting. This spoils the simulation.

The gauge also stops and starts with acceleration/deceleration as it tries to match the interpolation values.

A max speed setting would help smooth these out.

If you are unable to provide some user controls for the stepper speed and acceleration, can you please provide the offset and I can patch the hex file with my own values.

Thanks again for a great program.
[Last edited by smoothchat, 2017-01-11 00:20]
2017-01-11 00:07
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
iconsmoothchat:



The PMDG gives values 1,2,5,10,15,25,30,40. Which is not linear.

There is a point between the PMDG flaps values 0 and 1 where the stepper doesn't move, then it RACES to jump to position 1. I have tried putting extra interpolation values, but they don't seem to have any effect on values < 1


I talked about that in another Thread.....

The Value can be wunderfull work with the interpolation..... If it´s not smooth enough normaly we use more steps between the Values.... The Problem you suscribe is simple.....
Between 0 and 1 is a decimal value 0,001 to 0,999 BUT Mobiflight and the Stepper can´t work with decimal Values. So There is 0 and then 1... Nothing between. Same like between 1 and 2 ! The System increase smooth from 1,001 to 1,999 but Mobiflight only check 1 and then 2. In the Other Flapspositions the situation is better cause there are more Steps between the Values..... 2-5 include 3 and 4 ...... 5-10 include 6,7,8,9.

What can we do....
The Trick is to simply *multiply the Value.... for exmaple with 1000. So 0 =0 1=1000 .... 40=40000 . Effect: There are 999 showable values between 0 and 1 now !
PROBLEM: I reported already to sebastian ! The Flaps Offset of PMDG is a "float" . Actual Mobiflight can NOT multiply float offsets. ( Maby a bug only in my version. You can test if you want. He said he will fix this in one of next releases.

Good Luck !
Good Luck !
2017-01-11 00:37
Avatar
smoothchat
Posts: 41
Supporter
Ah, thankyou.

Putting $*1000 in the expression field and then adding "000" to all my compare values works like a treat.

My guage now reflects the on screen version with no hunting.

Thank you so much for kind advice. There are still many features I have yet to grasp with this terrific program.
2017-01-11 09:39
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
@ Smoothchat

After i read youre post i try it myself cause it sounds the "bug" is solved...
BUT on my System it´s not posible to run this config.

When i try to "transform" the Value with $*1000 then the Mobiflight Connector always crash whilel the Value is NOT a full number .
It workes on 0 or 1,5,10 etc but not while Transit ( Value is decimal then)

Pls confirm you use Offset 6568 4 Byte Float. And also pls confirm you use newest Mobiflight Version 7.1.3 DO the Conector crash while Transit ?

Maby youre Information helps me or Sebastian to find the issue in my system.

Thank you !
Good Luck !
2017-01-11 11:01
Avatar
smoothchat
Posts: 41
Supporter
offset 0x6568

float 4byte

mask = 0xFFFFFFFF

Transform = $*1000

Version 7.1.3

Sorry to hear that you're having issues, but it works very well for me.
2017-01-11 13:14
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Thanks.

Happy and sad at same time ! :blink:

Happy that it workes for you and the main theory is ok,

But sad, that the "bug" is not in Mobiflight for all users.
That make it harder to find the issue and maby non reproducible for Sebastian.

But whatever... Finding a Problem and solve it, it´s the "real" fun in Cockpit Building. What should we do all day, if everything workes ? Flying.... is boring :lol:
Good Luck !
2017-01-11 22:37
Go to page 1Go to page 012Go to page 2Go to page 2