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! 

icon
Avatar
OmniAtlas
Posts: 40
Hello,

I've setup a servo with MobiFlight using interpolation values for the IAS - it works fine, however the needle does not move smoothly.

I am using FSUIPC offset 02BC and transforming by $/128

I have also tried larger transforming values, but the needle movement is still the same.

Is there a way to smooth out motion?

Thank you,

Ben
2018-05-27 16:00
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4844
Supporter
Hi

1. What settings are you use in the Servo Tab ....

2. What Servo do you use ( 180° is not enough for a IAS Display i think)

3. You talk about "interpolation values" .... But you only explane a transform !
Do you use Interpolation in that config .... If yes what values do you work with there.. (By the way... is your planed Gauge scale linear or non-linear?? )
Good Luck !
2018-05-29 07:11
Avatar
OmniAtlas
Posts: 40
Hi Pizman -

I've email you the video - it shows the jittering of the servo

In the servo tab I am using a max rotation of 84% - the scale is non-linear so I have been using the interpolation values

This works fine, the rotation of the needle with the acceleration of the aircraft is just not smooth, like it should be.

I will need to get back to you on the servo type.

Kind regards,

Ben
2018-05-29 10:50
Avatar
OmniAtlas
Posts: 40
Servo is the Hitec HS-5055MG
2018-05-29 12:31
Avatar
OmniAtlas
Posts: 40
Hi Pizman - I also believe it is a Arduino, or Mobiflight issue as my ASI was tested with a Polulu board and seems to work fine --

https://youtu.be/JFXZyIhZ8fs?t=1m18s (movement is smooth)
2018-05-29 13:30
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4844
Supporter
Hi again.

That looks like a wrong setting to me OR it is a problem with this Servo.

@ Stephan. Please check the Datasheet of this servo. I can´t find information for Rotation in Degrees I´m not professional here... What means "Digital Servo" .....
Maby you can confirm for us if you think THIS Servo is working fine with Mobiflight !

@ OmniAtlas
I get your mail and Vid.... But i have not enough information about your settings.
If possible please tell me ( or send screenshots)
a) What exact transform ? ( Only $/128 ??)
b) How does the Value after transform look like .... Full Number like 128 for 128 knots .... or is it a decimal like 128,234239373729 ??? ( Servos see only full numbers !!!)
c) How does your Interpolation look like ? What Range do you use for the output ??? ( Here i recommend always to work with 0-3600 for a full circle So 1° on Gauge means a value of 10 !) ..... So please show me your interpolation tab.
d) Confirm this is a 360° Servo
e) Tell me your inputs for MIn/MAX Fields in servo Tab. ( With my technic this is also MIn 0 MAX 3600 ) This must be simmular with your used Value range in Interpolation Tab !
f) confirm the servo runs smoothe in Mobiflight when you use the TEST Button in Servo Tab .
Good Luck !
2018-05-29 23:33
Avatar
OmniAtlas
Posts: 40
Hi pizman82

a) Yes, I am using a transform value of $/128 - this provides an output of the exact IAS speed because the offset 02BC multiplies it by 128.
b) The transform numbers are full integer numbers with no decimals; so 128 knots will output 128
C) For the output range, I thought this will depend on your transform values? So my maximum range has been set to 450 as this is the largest value the IAS should output to - I will take a screen shot of the interpolation tab and attach it for you this evening
d) The specs don't seem to say online, but I believe this is a 180 degree servo.
e) The values in my range are similar to the interpolation tab
f) Servo runs smoothly with test button

Thank you,

Ben
2018-05-30 02:16
Avatar
OmniAtlas
Posts: 40
Pizman,

Please find attached my settings for interpolation and display settings --


2018-05-30 13:37
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4844
Supporter
OK.

1..

iconOmniAtlas:


d) The specs don't seem to say online, but I believe this is a 180 degree servo.



How should this work ?? Maby i missunderstand you but the gauge in Vid got nearly 360° Range ( maby 330-340 if we not use the area between 450 and 60.
So a 180° Servo can NOT Work all the range.... Only if you use a 1:2 Cogweel / Gear System.... So a move of 180° is turning the needle 360°

You simply can check your rotation range with the TEST Button in the Display Tab.... A Klick should turn the Servo from Zero to Full and Back. Thats the Range it got !


2. Values.
iconOmniAtlas:


I have also tried larger transforming values, but the needle movement is still the same.



To get more Values and a smoother run you need "sometimes" this trick....
BUT with FULL Integer Numbers this can´t help.
Whatever you change the Input for example $*100 ..... Then a Jump from 128 to 129 Knots will be now a jump of 100 from 12800 to 12900
That will result in the same moving of Servo. Also a Change of the interpolated output Values and a other MAX Value in Display Tab Like 4500 Max and all Interpolated Values *10 will not help i think..... Same result... The Values are higher but the number of moves are the same.

THIS Technic only work with Decimal Values!!
If a Vlaue for example increase by 0,01 ( Like PMDG Flaps) it will have basicly 100 Steps between 0 and 1 .... But Mobiflight see only 0 and 1 and ignore the decimalpart.
Here a Multiply by 100 will change Input from 0-1 into 0-100 and now a increase of 0,01 is shown as +1.
Without Multiply the Stepper jump 1 step from 0-1 With Multiply it make 100 small steps instead.
BUT AGAIN.... This will not help here i think !



3. Do you have correct FSUIPC Polling Rate ??
If this problem is on other gauges too please recheck the polling ( In Mobiflight settings)
It should be maby 200ms . If you use a high value here like 1000ms then only every second the needle will be updatet.... With Low Value the update is maby 5-10 time per second.[/b] Please confirm you got this ... And if not if this solve the Problem.!

**
Last Note.
I Personlay test lots of hours with servos..... But i not get happy with it. Stepper Motors are much smoother. More easy to handle (i think) and have no problems with ranges or with backward turning. If you have a stepper maby you will try out if this is not the better soluton for you, too.
Good Luck !
2018-05-31 03:58
Avatar
OmniAtlas
Posts: 40
Hi Pizman,

1. This is my mistake, it seems to be a 360 degree servo. By going to a maximum of 84% the servo will go to the maximum IAS indicator speed of 450 knots.

2. Yes, you are right, larger values do not seem to help.

3. I am already using the most frequent polling; am I out of luck? As shown on the youtube video it seems to be working fine on a polulu (unfortunately Jeehell FMGS does not support the hardware); is there anymore tweaking we can do with mobiflight to make the servo work smoothly?

Thank you,

Ben


iconpizman82:

OK.


1..

How should this work ?? Maby i missunderstand you but the gauge in Vid got nearly 360° Range ( maby 330-340 if we not use the area between 450 and 60.
So a 180° Servo can NOT Work all the range.... Only if you use a 1:2 Cogweel / Gear System.... So a move of 180° is turning the needle 360°

You simply can check your rotation range with the TEST Button in the Display Tab.... A Klick should turn the Servo from Zero to Full and Back. Thats the Range it got !



2. Values.

iconOmniAtlas:


I have also tried larger transforming values, but the needle movement is still the same.



To get more Values and a smoother run you need "sometimes" this trick....
BUT with FULL Integer Numbers this can´t help.
Whatever you change the Input for example $*100 ..... Then a Jump from 128 to 129 Knots will be now a jump of 100 from 12800 to 12900
That will result in the same moving of Servo. Also a Change of the interpolated output Values and a other MAX Value in Display Tab Like 4500 Max and all Interpolated Values *10 will not help i think..... Same result... The Values are higher but the number of moves are the same.

THIS Technic only work with Decimal Values!!
If a Vlaue for example increase by 0,01 ( Like PMDG Flaps) it will have basicly 100 Steps between 0 and 1 .... But Mobiflight see only 0 and 1 and ignore the decimalpart.
Here a Multiply by 100 will change Input from 0-1 into 0-100 and now a increase of 0,01 is shown as +1.
Without Multiply the Stepper jump 1 step from 0-1 With Multiply it make 100 small steps instead.
BUT AGAIN.... This will not help here i think !



3. Do you have correct FSUIPC Polling Rate ??
If this problem is on other gauges too please recheck the polling ( In Mobiflight settings)
It should be maby 200ms . If you use a high value here like 1000ms then only every second the needle will be updatet.... With Low Value the update is maby 5-10 time per second.[/b] Please confirm you got this ... And if not if this solve the Problem.!

**
Last Note.
I Personlay test lots of hours with servos..... But i not get happy with it. Stepper Motors are much smoother. More easy to handle (i think) and have no problems with ranges or with backward turning. If you have a stepper maby you will try out if this is not the better soluton for you, too.

2018-05-31 14:07
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4844
Supporter
Tweaking :P

About Polulu...
I not understand what you mean with " It workes on Polulu"
The Servo workes smooth in Arduino ( And with Mobiflight), too..... When you use test Mode. Only with Data from Sim it is problematic.
Do you make your Polulu Testing with SAME Offset of IAS ..... What Programm do you use to get Data from Sim to Polulu board ?
If you just test with a offline script the servo there and not readout sim.... Then the Testing was not presentable.


What you can do on Software side.

You can Activte or better deactivate the "Logging Mode" to increase speed.
You can "play" with the polling rate.... Maby you to high and that confuse the system.... Try one step slower if it occure in better experience.

Another tests.
I not work with Servos finaly.... So my experience is a bit lower here.
While my testings i got "smooth problems", too . So i try Steppers and never get back to servos again.
The follow are just things i think about.... Not must be correct finaly.

In your Situation i would try....

1. A other Aircraft... Maby Jeehell is to problematic for the system. try the same with a standard cessna.... Use no highlevel scenerey. ( Change Value first to get a range for a cessna .... Not scale to 450 knt for example)

2. Test what happen if you NOT use Interpolation..... Shure the gauge then is not correct cause its not linear.... BUT we want to know.... Is it Smoothe without interpolation ?

3. Maby the reducing of range is a Problem....
You limit to 84% and Max Value is 450.
450 / 84 * 100 = ~~536
So use for testing... Max Rotation 100% Values: Min 0 Max 536
Now the servo turns again only to 450 ( Cause your interpolated value can not be bigger then this) BUt the servo not must work with that limitation.

Please again report experience..... If you got another Servo ( other model or manifactur) then test this.
Good Luck !
2018-05-31 17:20
Avatar
StephanHo
From: EDDG, Germany
Posts: 1761
Supporter
iconpizman82:


@ Stephan. Please check the Datasheet of this servo. I can´t find information for Rotation in Degrees I´m not professional here... What means "Digital Servo" .....
Maby you can confirm for us if you think THIS Servo is working fine with Mobiflight !



The data sheet is very sparse, even on the side of the manufacturer can not find out how many degrees of rotation is.
"Digital Servo" means that it is driven digitally and not with an analog voltage (e.g., 0 .... 6V). However, this servo has the option to define / program the end point or speed.
Since Mobiflight drives the servos analog, a digital servo might not be suitable here. What the digital signal looks like was not known.
Grüße,
Stephan
2018-06-01 12:29
Avatar
OmniAtlas
Posts: 40
Hi pizman and Stephen,

I attempted all your suggestions with no such luck unfortunately.

I do not have a polulu card - Mick developed the IAS for me and did a fantastic job; it was tested with Prosim737 and seems to work fine.

Perhaps Stephen is correct, and it is not working well because it is a digital sevo.

I will see if there are other offsets I can test with, otherwise it seems i am out of options (besides changing the sevo).

Thank you,

Ben
2018-06-02 09:41
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 4844
Supporter
Ok guys... Here im basicly out of thematic :D

As i told i not think a lot about servos.....

I just google and find some hits... So they told there is no difference between analog and digital for the Input.... Just the internal technic in servo is different.
If that is correct then both systems should work with Mobiflight.

But another question. ( My experience is poor... PLEASE Correct me and tell me whats correct Stephan)

If i´m Correct then a Servo ( Whatever Analog or Digital) work with PPM ....
This PPM is mostly explaned with a range of 1-2 ms 1ms = Lower position, 1,5 ms is middle position 2ms is upper position.

Now the qestion.... How many "steps" are between 1 and 2 ms. 1000 ?? So...How many positions can a Servo directily set ?
Second question.... How is the Servo "internal" geared ?? Output of a standard Servo is 180° BUT is the Motor itself turn 180°, too or is this in case of some gear inside ?
So are the gears just for Increasing power torque OR does it change rotation range, too ?

Summary.... When your 360° Servo is basicly the same like a 180° Servo ( Just with a additional 1:2 gear) then the number of possible "steps" is the SAME but the range is double.... SO the way of needle between 2 Steps is double, too.

For Example .... If a 180° Servo get 90 Steps .... Then the 360° Servo get 90 Steps too ( In this theory) .... So Number of possible Needlepositions is same like a 180° Gauge.
Means in a 180° gauge you got 2° Steps.... in a 360° gauge you got 4° Steps

This mean you can not see a moving of Needle on every kn Speed cause you have only 90 "Steps" for the hole 360° Gauge....
In this Example with 90 "Steps" you show maby 400kn ( 60-450 with a little dead zone) .... With 90 Steps this mean only a increase of 3-5 knots will move the needle 1 position.

Is that correct ?

If YES then you should finaly use Steppers.... Cause a Stepper have 2048 "Steps" per circle. I just "think" that a Servo got much less "Steps" here.
Good Luck !
2018-06-02 23:59
Avatar
OmniAtlas
Posts: 40
Hi Pizman,

Thank you for the suggestion -- here are the internals of the servo



Yes, I could switch over to a stepper, but I don't want to do undo Mick's good work :)

I will test with a pololu board first and see if I can achieve desired results.

Thank you,

Ben
2018-06-03 01:13
icon