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
Japmaco
Posts: 48
Just starting out now to play with stepper motors to see if i can make a gauge of some sort. Alt f.eks.

Any ideas what stepper motors to use and if mobi flight is in any way supporting this?
2016-11-29 02:06
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
28byj-48 with ULN 2003 bridge are tested and work great!
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-11-30 07:03
Avatar
rodrigo_c
Posts: 9
the same 28BYJ-48 and ULN 2003

works fine

PS: They warm up a bit when connecting them but it is normal .

regards from Chile
2016-11-30 23:06
Avatar
Japmaco
Posts: 48
does anyone have schematic how to connect this to mega? I have tried to find any tutorial about this to make own gauge. But its hard to find. Any ideas where to start?
[Last edited by Japmaco, 2016-12-01 17:28]
2016-12-01 17:17
Avatar
DocMoebiuz
Moderator
From: EDSH, Germany
Posts: 1516
Just use 4 pins of any of the digital pins and connect them to the ULN2003.
To start use 5V power supply pin from the Arduino. 5V and GND have a connector on the ULN2003 too.
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-01 17:36
Avatar
masawee
Posts: 64
and how setting pins ?
mean how make stepper move gauge needle to somethink simulator gauge ?
expet, RPM gauge ?
2016-12-02 00:16
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
@ masawee

I can´t give you a step by step cause i never used a stepper motor before....

But looking google and youtube helps....

Like sebastian explanes... Use 4 Datapins on Arduino (for example 20-21-22-23 ) And wire +5v and GND to this arduino.

In "Setting" of the Mobiflight connector create a new device on this Board. Type is "stepper" and set Motor Pins 1,2,3,4 to your used pins (in Example 20-12-22-23)

After that you can create a Output in the config für a Stepper and take this one from the list.
Now you need an Offset you want to display with youre gauge.... Use FSUIPC Doccumentation or Offsetmapping for AddOn Aircraft of youre choice.

At last you have to tell the Stepper how it should use the offset. Without a chance to testing i can´t tell you how to use interpolation and setting Centerposition.....
But i think there are not much Input sections.... Maby a Try and Error testing of 20 Minutes will help you to understand how to use interpolation and expressions.

(BY THE WAY.... A short Step by Step Turtorial for "MF Stepper Settings" from Somebody who got this already working will be nice.... Maby with a Standard Offset like Flaps Position. ))

Good Luck !
Good Luck !
2016-12-02 13:47
Avatar
masawee
Posts: 64
thanks, ihas orden steppper and uln and wait now when come to home post. then can try test.
2016-12-03 20:38
Avatar
tommy1332
Posts: 26
You might also want to order an endstop because unlike a servo, a stepper motor doesn't know its position.
I have ordered a TCST2103 but haven't tried it yet. Maybe someone else has experience with using stepper motors and could write a small tutorial how to set this up?
2016-12-04 02:03
Avatar
masawee
Posts: 64
today come at post my stepper whit uln2003 chip board, must be try test lot now :)
first need RPM gauge test.
arduino uno(not whit mobiflight)
i test first have good parts and stepper sweep good clockwise/counterclockwise. :)
4096 step/rev, have basic set.uno board test.
gear ratio 1/64
speed about good 200
pin 8,9,10,11
example found instructable site.
2016-12-17 15:41
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Last week my Steppers arrived, too. I´v done a lots of testing !

The procedure is realy easy and self explanatory ( Thanks to Sebastian for greate GUI solution)

Basicly....
Set the Stepper like explaned before to the Board and into Mobiflight.....
In the Config Tab you can set a Zero Position ( by the +1+50 .... Buttons) and SET this Position.
Additional you can limitied the Range of the Display by reducing the "Steps". If you only need a 180° Display take the Half Steps ....
At Least tell Mobiflight what Offsetrange is a Full circle for the Stepper.... For example 360 for a Compass or 1000 for a Altimeter.

In the Compare and Interpolation Tab now you need to set the Raw Offset Data into a Value you like to shown an the Display.... Some Data is allready right to use like the Compass (Value is 0-359 as we need) Other Things like the Flaps need to be changed and interpolated so the gauge looks like we want to.
If youre Stepper is working , then use some time and test a Offset with lots of different Interpolations.... Maby take 30 Minutes and you understand how it workes and then you can set every gauge you like.... The System is the same everytime.
Good Luck !
2016-12-19 09:01
Avatar
masawee
Posts: 64
but were i found and add cessna 175, RPM gauge and how add ?
i try test manytime but no understand ,not working any test ?
i try looking fsuip sdk site but no found motor rpm anywere.
and were i add addrrs rpm ?
and setting 0-180* or what need ?
and what is comparisor and interpolarity ? i no found this anywere ?
2016-12-20 09:57
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Dear Masawee....

Thats all written down in the FSUIPC Offset Mapping.....

Offset 0898 ... Quote from FSUIPC SDK
iconQuote:

or Prop RPM (derive
RPM by multiplying this value by the RPM Scaler (see 08C8)
and dividing by 65536). .



So we need to MULTIPLY the Value of Offset 0898 WITH the Value of Offset 08C8 AND DIVIDE the Result by 65536


Mobiflight is a little problem here cause we´r not able to multiply Value with another offset BUT we can use a roundet value.... 08c8 is normaly 10800 +/- a little bit.....
So we can use 0898 and transform : ($*10800)/65536
The calculated result is a value from 0 - until maby 4000 and can be used for youre stepper.....
(( If you want a absolute correct value you need to write a lua script but i think this compromise workes exactly enough))


Stepper is must be set to youre wishes.... Maby you want the same Display like in FSX Cessna you need to reduce Steps to 70% (gauge is not complete round). Starting Point is maby in 7 o clock Position. Use the Highest Skale in youre gauge for Sim/Stepper setting.... Maby 4000 is good. (I don´t know youre design) .

Good Luck !

EDIT !!!!!
Got found maby a better Offset for you..... Try Offset 2400 (Float64) Looks like that Offset is already calculated (0898 * 08C8 / 65536)... Exactly what we need.... Pls try out this one !
[Last edited by pizman82, 2016-12-20 16:17]
Good Luck !
2016-12-20 13:45
Avatar
masawee
Posts: 64
i try manytime ,have stepper, 0x0898,float,4 byte,transformed $*10800/35536
at FSUIP
and display have
mega,stepper,stepper1,sim/step=1000/4000
test 500
and button TEST no do anything.
i no know what must do working ???????
i try too second, offset 2400,float, 64 ???? i no found and understand what and were have ? and $*0898*089C8/65536
but not working no move, no do anythinkg.
2016-12-22 13:37
Avatar
pizman82
From: ETSI, Germany
Posts: 6010
Supporter
Dear Masawee

You did some mistakes....

iconQuote:

i try manytime ,have stepper, 0x0898,float,4 byte,transformed $*10800/35536



First you got wrong dividing ! When use Offset 0898 i told you divide 65536 ... you use 35536 as you suscribe.
Second THIS is a 2 Byte Integer (See in FSUIPC Mapping) NOT a 4 Byte Float

BUT Not important... The other Offset (2400) is much better cause its more exact and easyer.....


So forget 0898 and USE Offset 2400.
(You do NOT need to transform... This offset already calculates the function i told in other Posting (0898*089C/65536) )
And if youre confused about FLT64.... A FLT64 bit is the same like a 8 Byte Float. (8bit * 8 Byte = 64 bit) So Use Type: FLOAT and Size in Byte: 8


Now while setting youre Motor in Config theres another mistake...

The Sim/Step entry gots TWO Areas....
- The Left one (SIM) means.... How is The Value for a Full Turning of the Stepper..... In a Compass it´s 360 In a Altimeter its 1000ft .... In Our RMP Gauge it´s for Example 3500 (The Original Gauge in FSX is scaled from Left 0 to Right 3500. SO Use 3500 in this Area ( I got 4000 but thats not important)

- The Right Entry (Stepper) means how many Steps are Used for our gauge.... My Stepper gots 2048 Steps (Maby yourse too ....you need to know ).
If we want to use the Full Circle (For Displays that turn more times like altimeter) we use this maximum of steps (2048 on my stepper). In the RPM Gauge like in the FSX Cessna there is only used 3/4 of the Circle.... So i decide to reduce this Value to 1500 ( So i only use 75% of the full Circle) But this is just Optical.

the "Test Value " is just to try out the Config.... It´s not Important for our instrument.

In Calibration Area you can "move" the Needle manualy to Left and right (-/+) and take the instrument to ZERO Point. (The Beginning of our scale in RPM gauge). Confirm this calibration wit "Set 0 Pos" Button. ( The Motor need to know WHERE youre scale is beginning)

Finish !

That must be work normaly.

Good Luck !
[Last edited by pizman82, 2016-12-22 17:16]
Good Luck !
2016-12-22 16:00
Go to page 1Go to page 012Go to page 2Go to page 2