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 112Go to page 3Go to page 2
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi Smoothchat,

I think you have gone the same way as I, but you took other values.

Your Circle is 1000 mine 3600 steps. So your Stepper runs 3.6 times faster than mine. Your reference for one needle-revolution is 1000. If the needle has to go to the input value for flaps 40 you have 750 steps. With me the needle goes 2690 steps for flaps 40. 2690 / 3.6 = 747.22 or ~750
Look to the interpolation list in the tutorial. The smaller the value to the reference the faster the needle.

Our input is always the same because the FSX-value runs from 0 to 40 (flap-value - input).

To make a complete revolution you should take a value(relative) to a circle (in degrees - simple to calculate).
If you transform the FSX-value with $*1000 your startvalue is also 0 and the end-value is 40000.
You have 1000 steps for a full revolution, I have 3600, but we need only 3/4 of a revolution from 0 to 40 flaps or 270 degrees or 75% of a full revolution.
So your max value (interpolated) should be in the near of 750 - right? The ratio in our both interpolations is the same but my needs more between steps to reach the flap values.
You have to see it relative not absolute.
Try my values from the tutorial and your flap-needle should move as smooth as mine. But you should not try it with the test button, take the real flaps.
I'm looking forward to your results.
Grüße,
Stephan (Time: UTC+2)
2017-09-16 20:34
Avatar
smoothchat
Posts: 41
Supporter
Thankyou Stephen. I was using the default values that appear when I create the stepper.

I tried altering the steps per revolution to 3600, but this appears to alter the mathematic values which determine how FAR to rotate the stepper, but not how FAST.

My problem is that the stepper firmware physically steps the stepper too fast and the stepper gets overdriven and basically freezes because it cannot cope with the speed of the pulses..

In the mobiflight_mega.ino firmware file, there is a definition of the maximum speed for the stepper. (#define STEPPER_SPEED 600)

I change this to (#define STEPPER_SPEED 300) and recompile, and it solves my problem.

-

Perhaps i can ask you to do a simple test for me. :)

If I set a test value that matches the sim/stepper value, I get a 360deg rotation of the stepper. (eg: sim/stepper = 3600 / test value = 3600)

Using the test function, this rotation takes approx 7 seconds to complete (this is with my modified code)

So we can say that the speed of my stepper is 360/7 degrees per second. ( 51 degrees per second )

How long does a full 360 rotation take on your stepper?
[Last edited by smoothchat, 2017-09-17 04:19]
2017-09-17 00:47
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
Hi smoothchat,

basically it does not matter how fast a stepper can move or move.

In considering the speed with which the flaps are driven, is the only FSX to consider, not the stepper, because the measure of the things with which the stepper is steered is the FSX, not the parameters that actually move the stepper.

So the stepper can move only, if the control value also changes in the FSX. So the stepper depends on the FSX! The FSX requires e.g. 11 seconds to move the flaps from position 0 to 1. The stepper can not do this faster. He must also move from position 0 to 1 in 11 seconds. This is absolutely true for every folding position.

So you have to consider, how fast your simulation moves the flaps. This value is the measure of things, how quickly - or slowly - your stepper moves.

With my PMDG 737NGX it takes about 43 seconds from position 0 to 40 (full flaps) and about 25 seconds from 0 to 10. the intermediate stages need in the middle about 5-7 seconds to reach the next value. A stepper can not be faster!

You see, purely theoretically, a stepper for a complete rotation can take less than 1 second, but if the control needs however on the simulation 43 seconds, the stepper needs 43 seconds.

Outside of the simulation, the stepper can move at a speed that is physically defined, that is, subject to the specifications or the physical limits. In simulation, on the other hand, he can only move, if he is also driven.

I hope I have expressed it comprehensibly.
Grüße,
Stephan (Time: UTC+2)
2017-09-17 09:59
Avatar
smoothchat
Posts: 41
Supporter
Yes, I think I understand you, but I don't think you understand me :)

When I load a saved scenario, the physical flaps gauge needs to update to match the value in the FSX.

If my physical flaps gauge is at 0, but the gauge in the loaded scenario is at 40, the physical gauge gets a SINGLE command to move from 0 to 40.

During this large single move, the stepper reaches maximum speed and overdrives and sticks until the speed reduces (acceleration/deceleration)

The stepper is now miss-calibrated, and can only be fixed by resetting the zero point within Mobiflight.

iconQuote:

So the stepper can move only, if the control value also changes in the FSX. So the stepper depends on the FSX! The FSX requires e.g. 11 seconds to move the flaps from position 0 to 1. The stepper can not do this faster. He must also move from position 0 to 1 in 11 seconds. This is absolutely true for every folding position.



Yes, normal use of the stepper during flight works fine because it only gets small movements as the sim flaps move slowly.

It's at scenario load time that I get the issue when the physical guage has to spin a long way to match the value in FSX.

The only fix for this is to adjust the STEPPER_SPEED value.

The sim/stepper setting has no impact on the speed of the stepper when it has to move a long way, it only effects how many steps it takes.

iconQuote:

So your Stepper runs 3.6 times faster than mine.

With the greatest respect to you, I think this is incorrect. :)
[Last edited by smoothchat, 2017-09-17 11:04]
2017-09-17 10:53
Avatar
smoothchat
Posts: 41
Supporter
iconStephanHo:

Hi smoothchat,

You see, purely theoretically, a stepper for a complete rotation can take less than 1 second,



If my stepper completes a rotation any faster than 7 seconds, it freezes.
[Last edited by smoothchat, 2017-09-17 14:13]
2017-09-17 10:59
Avatar
StephanHo
From: EDDG, Germany
Posts: 1867
Supporter
You see me amazed.
My stepper turns at 3600/3600 in 3,8-4,0 sec (inaccuracy due to manual measurement). That are 90 degrees per second. I can repeat that so often I want. The stepper don't get hot (only a bit warm) and don't freeze. This is the same speed, the stepper runs from 0 to 40 degrees flaps in a specific situation you took as example.

The stepper moves at the same speed, regardless of whether the path to be traced is small or large. The speed would also be physically limited on a large scale. The speed is dependent on the control by the software, in so far it does not develop an individual life. The deceleration at the end of the path also abruptly occurs because the control current is missing. According to the datasheet, pulses up to 5% can be lost, but one over the target point is not described in the occurring forces.

Here I found a good Datasheet about the stepper: http://eeshop.unl.edu/pdf/Stepper+Driver.pdf

I can follow you that it is possible that the stepper is decalibrated after a longer time and when there have been lost steps on the data-way. So a recalibration is needed.

Is it right, that your stepper runs ok in the short steps but not when he has to move long ranges?
This behavior I can not confirm with me so.

What's about the current? With me the rest current is 250mA. When the stepper moves, the current drops to 160 mA. If I'm honest, I would not have expected that. The rest current should be at 5V and 50 Ohm DC resistance (Datasheet) at 100mA. For me the stepper runs so ok, without failures, also for longer periods. In this respect, your error is not understandable for me.
Grüße,
Stephan (Time: UTC+2)
2017-09-17 14:12
Avatar
smoothchat
Posts: 41
Supporter
iconQuote:

My stepper turns at 3600/3600 in 3,8-4,0 sec



That is logical. My stepper takes 7 seconds because I have reduced the speed by 50%.

Perhaps my steppers are not good quality. The gears may not be good quality.

I have many from the same supplier and they all have the problem.

So I will continue to use my own version of 7.3.1 which reduces the problem.

Thankyou for your help.
2017-09-17 14:21
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Hi Again

At First... Sorry for confusing.... I Thought in video was a LIVE Situation. If this was just a "Test" Run then your config is not wrong as i thought !

To Problem:

About Overspeed in case of Wrong Setting.... Here Smooth is right i think..... A Stepper got a fixed Number of Steps for a Full Turn ( e.g. 2048)
The Vallue you use in STEPPER Field is needed to define this.... If you use for example 4096 it will make 2 Full Turns.... If you use 1024 it will make only a Half turn.
The Value you use in SIM field define only the Input Value that is need for a Full Turn
BUT Both not change the Speed of the stepper i think...... This is just a Math Calculation like "how many Input occures for how many Steps"
If you Use 2048/2048 then simply every +1 Input is summular +1 Stepp. If you use extremly 10/2048 then every +1 Input occures in 204 or 205 Stepps. Or Otherwise a setting of 8192//2048 let the stepper only move by 1 stepp if Input Value increase by 4 .

Solution:
Hardware:
I already think you steppers are the Problem.... Sebastian said he had a stepper in the past with same issue..... If you just use different stepeprs but all of same sort and charge then maby all are broke.... If Possible i would recommend to test simply another sort of Steppers... as We all say here... We have no Problems finaly!

Software:
I not know how you get your own modificated Mobiflight File.... Do You make the change youreself ??
If Yes..... Why not simply change this lines with Copy and Paste in 7.4 ?
If i understand right it´s only one value in one file.... So Install 7.4 and simply change again this value !

At Last....
I understand your problem that issue occures when you load a State Up.... But please note... 99% of Cockpitbuilders NOT do that. In all Cockpits i already visit there was a simple rule.... Starting at cold and Dark.... and Leaving in cold and dark.... So Simply every Switch... every Button... Every Motor ... All is in a Basic State when Software is starting !
There was never a "LOAD" done.... Shure we use a "Position change" to do for example a Landing 4 times in a row ( Move back ti IAF for example) BUT..... there would be NEVER load a state.... means after removing All Systems ( like Gear, Flaps, Engine Rmp Airspeed and so on ) was in same Status like before the "move"

If you for example make a full stop Landing.... and like to do another one then this can´t work cause after the "moving position" you will spawn on IAF but with a speed of 0,0 knts. You will fall from Heaven like a stone :-)

Summary.... A Professional Homecockpit or training Simulator is NOT Build to load a situation.... Its basicly used to make a Full Flight with a defined Pre State that is always the same !


Adios !
Good Luck !
2017-09-17 16:36
Avatar
smoothchat
Posts: 41
Supporter
Thanks Pizman82,
iconpizman82:


Software:
I not know how you get your own modificated Mobiflight File.... Do You make the change youreself ??
If Yes..... Why not simply change this lines with Copy and Paste in 7.4 ?
If i understand right it´s only one value in one file.... So Install 7.4 and simply change again this value !



Yes, that is what I can do. But there are more steps than just cutting and pasting. I then have to recompile to *.hex and upload to the mega again, and another version of the software that I need to store. All doable, but I'd rather be flying ;)

I could also disassemble my device and install another (and hopefully better) stepper motor.

I assumed that if I had the problem, then other people would too and I hoped that the software could provide an adjustment to compensate, but if I am the only one, then I will deal with it myself.

I thank Sebastian for an excellent program.

Thanks for your assistance.
[Last edited by smoothchat, 2017-09-17 20:28]
2017-09-17 20:08
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
iconsmoothchat:


Actually, I believe that in most commercial situations, the aircraft is never "cold and dark" when each pilot changes ;) But I understand your message.



Yeah.. Thats Right !
I must say it with other words...
In simulators this is mostly used cause it´s simply FUN !. i don´t know your experience... Bot for me the Flight itself is realy boring.... If you do it like in real then after "positive Climb" and "Gear Up" the VNAV LNAV is set and 2 Hours later nearby the Beginning of a STAR i touch next time a button in the cockpit.
So the Startup and Shoutdown are much more exciting as the flight itself.

BUT:
My Argument is still the same..... You can use for example a already Powered Up Plane as prestate... IRS already Online.... APU Still running.
All i want to say is.... Most Homecockpits work with a PreState that is always used to set the Hardware same way all the time. But i think you already know what i mean finaly.

*********
Last thing...
I not think about you have to compile the Code... Yeah. Thats sucks ! I´m sorry about that !
I Hope Sebastian will find a solution for you in the future !
Good Luck !
2017-09-18 01:15
Avatar
smoothchat
Posts: 41
Supporter
:)
I often like to just load a flight ready to take off. CDU is already set for an ILS flight.

I take off, and then go to another PC while the flight continues on my flightsim machine.

The plane auto flies to the destination while i do other things, then I return to do final approach and land.

We all have different ways of enjoying simulated flight ;)
2017-09-18 08:32
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 6010
Supporter
Here finaly i can recommend to a "Checklist" System .... ( I Know lots of HomeCockpit Builders work with)

If you like it you can use lots of different StartUp States..... Like you for example explane a state you stand with running engines and a full set FMC Lineup on the Runway....
The Trick is..... You got a "Checklist" for every State you want to use..... and you prepare the Homecockpit to this state,

Example.... You land your plane in New York and make a full stop on the runway..... Now you want to load a Savegame where you in 36000 ft maby 40 Minutes before Landing.
The Trick is to know.... HOW are all Settings in this loaded Situation !
At the moment (After Landing) Your Flapps are 40° ... But in Save they are 0° . So Simply Set Flaps to Zero BEFORE you Load the Save File .... or your Gear is pretty shure UP in the Save but currently Down... So Simply push the GEAR Leaver UP ( Whatever you stay on ground at the moment) .Simply prepare Your Cockpit to the same State like it should have AFTER the Loading Procedure.

As i said.... Professional Cockpitbuilders have a list for EVERY single Switch ( Non Momentary) in the Cockpit to SET them exactly how they should be for the loaded situation !
Good Luck !
2017-09-18 15:42
Go to page 1Go to page 112Go to page 3Go to page 2