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! 

Go to page 1Go to page 012Go to page 2Go to page 2
Avatar
herly
Posts: 67
Dear colleagues,

Mu computer was hank and I have to program my lovely homecockpit again. I try to set flap coding using ULN2013 stepper and I use PMDG 737. Can anybody assist me how? I have read from the forum and googling as well, but the anser is still confusing me. Plese assist. Thank you..
2017-08-09 12:39
Avatar
StephanHo
From: EDDG, Germany
Posts: 1518
Supporter
Hi herly,

I will try to help you with your Stepper.

The Stepper with the ULN2003 you do already have. So take it and lay him beside the MEGA.
I assume that you have the Arduino-IDE installed and you know where it is on your Hard-Disk.

On the Screenshots you see the German Menuitems but it should be easy to find the same in English.

First you have to create a device.
Open MobiFlight. You will see the Main-Menu. Then you got to Extras and then to Settings.



In the Window of the connected Modules you should find your MEGA with the created Firmware.



Klick on this entry on this assigned MEGA, klick the right Mousebutton and then on Create Device and choose Stepper



There will pop up a window with the Pin Settings Motor. Use the pull down for the pins and choose the connectors (Pins)
of the MEGA you want to connect the Stepper each in Sequence.

After you have done this you have to upload your Config to the MEGA.

Note that you have filled in the Path to your Arduino-IDE at the bottom of this window.

Then look to the Icons a bit above and click on the one with the green arrow (left most one). After this has finished
you will see a little Requester with the hint that the upload has been done succesfully.
Now go to the Disk-Icon and save your Config-file on Disk.
Now you can leave this Window with ok and you got the Main-Menu back again.



Now double-klick the first entry and insert a description i.e. Stepper Flaps and activate this item left with setting a hook.
Then go to the end of the line and klick on the field with the "..."

A new window will pop up. Choose FSUIPC.



Aside from Offset insert the Offset for the Flaps-Position of the FSX: 0x6568
The Offset has is from Type Float and a Size of 4 Bytes.
The Mask value appears automaticly.
Set a hook left of Transform and insert right of Transform $*1000

Change to the Tab Display



Choose your MEGA-Modul in Modul.
As Type you choose the Stepper.
In Steps per revolution you insert aside Sim/Stepper 3600 and right 2040
Aside Test-Value you insert 2730
Now you can connect your Stepper to the MEGA at the Pins you defined earlier.

If you have done so you can press the Test-Button. Your Stepper should now run into the max-Position. After pressing Stop the
Stepper will return to his Start-Position.
If this has been successfull you are nearly ready.

So your flaps won't work correctly because you have the PMDG 737NGX. Here you have 9 Detents with the Flaps: 0 (Flaps up),
1, 2, 5, 10, 15, 25, 30 and 40 (down)

This is no Problem for MobiFlight.
Go to the Compare-Tab and look to the last section, named Interpolation-Settings



Set the hook so that MobiFlight knows to use these settings.
Then insert the following values in sequence into each row:

Input Output
0 0
1000 360
2000 750
5000 1140
10000 1500
15000 1790
25000 2070
30000 2380
40000 2690

What does this mean?
The FSX-value is a 4 Byte Float and starts at 0. If the Flaps go to Position 1 the value also is 1. If you don't transform the value $*1000 you won't see any movement between 0 and 1. Same between 1 and 2, bit mor between 2 and 5 and so on.

Remember, a full circle has 360 degrees. You guess what is coming: We temporayly make a circle with 3600 "degrees". That has been
the input at Sim/Stepper - you know? It works as follows:

At Flap position 1 the FSX value is also 1 but Mobiflight knows that it has to transform the value *1000, so the output is 1000
before leaving Mobiflight. Mobiflight now knows , that a value of 1000 at the input he has to send 360 Steps to the stepper (output).
3600 Stepper-Pulse are for one Revolution but we only need for nearly 270 degrees for Position 40 - nearly 2700 steps.
Therefore the table above. These values are for my Stepper and my Skale.
To find your own values you have this as hint.
To define your values you can do this:

Go to the Display-Tab
If you have your own scale for the Flaps make a pointer and glue him on the steppers axix. Put him on the middle of the up-marker of the scale and press
Set-0-Point.
This is now the reference-point of the Stepper where he runs to if the FSX-value is 0.

Now you can calibrate your own skale and change the values in the comparision-list.

In Example you set the Test-value in the Display-Tab to 360 and press the Test-Button. The pointer now runs to the position 1.
If he stops in the middle of the marker you can keep this value. Otherwise press stop - the Stepper runs to the 0 Position.
Now you take the "manuell Calibration" an set the slider to the +50 position. Then press "move" and count, how often you press
"move" to reach the 1 position. If he is not in the middle, put the slider on the +10 position and press "move" again.
Same with the +1 Position until the pointer is in the middle. This is your value for Position 1.
Do this for the other Positions until you have all values complete and transfer these values in the compare-tab and there into
your interpolation-List. The old values may be overwritten.

Now you start your FSX with the PMDG. After the PMDG is initialised you start Mobiflight. Begin to set your Flaps to a value of your choice
and look, what your Stepper is doing. Contented? Fine. That's it. Have fun!
[Last edited by StephanHo, 2017-08-10 08:41]
Grüße,
Stephan
2017-08-09 19:56
Avatar
herly
Posts: 67
Hallo Stephan,

Thank you so much for the detail explanation. I really appreciate it. Noch mals vielen Dank für deine Unterstützung.

Warm regards,
Herly
2017-08-10 00:17
Avatar
StephanHo
From: EDDG, Germany
Posts: 1518
Supporter
You are welcome :)
Grüße,
Stephan
2017-08-10 19:07
Avatar
herly
Posts: 67
Hallo Stephan,

I have a problem to find out Offset mapping PMDG 737 for MFD eng and sys. And another coding for flap load relief. Could Ouind to inform me where I can find the codes..

Thank you and best regards,
Herly
2017-08-17 17:06
Avatar
herly
Posts: 67
Ok
iconherly:

Hallo Stephan,

I have a problem to find out offset mapping PMDG 737 for MFD eng and sys. And another coding for flap load relief. Could you mind to inform me where I can find the codes..

Thank you and best regards,
Herly

2017-08-17 17:07
Avatar
StephanHo
From: EDDG, Germany
Posts: 1518
Supporter
Try
EVT_MPM_MFD_SYS_BUTTON 70094
EVT_MPM_MFD_ENG_BUTTON 70095

Have a look into PMDG 737 NGX CUSTOM EVENT ID's.pdf
This Document you can download here: http://myhomecockpit.de/PMDG_737NGX_EVENT_IDs_SP1d.pdf
Grüße,
Stephan
2017-08-17 20:01
Avatar
herly
Posts: 67
Thank you Stephan,

For the button it is ok, only for the light illuminate on MFD SYS and ENG,,,

What is the offset mapping codes for both ENG and SYS?

Thank you and warm regards,
Herly
2017-08-18 02:00
Avatar
StephanHo
From: EDDG, Germany
Posts: 1518
Supporter
Hi Herly,

these Buttons (ENG & SYS) are not individual illuminated. They are backlighted and therefore you need no Offset.
Thus there are no annunicators but "action buttons".
Grüße,
Stephan
2017-08-18 06:37
Avatar
herly
Posts: 67
Ok I will try. Thank you for your assistance and schönest wochenende.

Regards,
Herly
2017-08-19 03:15
Avatar
herly
Posts: 67
Dear friends,

I have problem when installed new update. Some of function i.e. brake switch, doors announce light, etc. do not function properly. Any idea what happen and how to resolve it?

Thank you and best regards,
Herly
2017-09-04 01:35
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3508
Supporter
More Information, please :confused: :confused:

What Update (PMDG or Mobiflight)

If Mobiflight... Do you Reset your Arduinos after firmware upload ?. As i explaned multiple time.... If you make a firmware Update specialy when you use PMDG there can be Problems. Disconnect the Arduinos from USB for some seconds or use the RESET Function on the Arduinos.
Restart Mobiflight, too ( Not 100% needed but i do always just to get shure. )

If this not helps please tell us what you do exactly.... What are the Problems ( Missing Commands... Leds not light ??? )
Good Luck !
2017-09-04 01:53
Avatar
herly
Posts: 67
Hi Pizman,

After mobiflight update, and I use pmdg 737...

Warm regards,
Herly
2017-09-04 02:58
Avatar
herly
Posts: 67
iconherly:

Hi Pizman,

After mobiflight update, and I use pmdg 737...some lights missing and the switches as well..

I just got the note update and up dated it without reset button on arduino.

Warm regards,
Herly

2017-09-04 03:01
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 3508
Supporter
Sorry Herly.... I not understand already......

1. You say you updated it WITHOUT Reset.... So please do what i recoomend and RESET the Board.... "Normaly" after a firmware and/or a Device Upload this is needed and help to solve the issue.

2. If NOT ... What do you mean with "missing" Lights and switches...

A) Are the Config Entrys gone and not longer in your Mobiflight Setup....
B) Are the devices away ( Not longer on the Board ? ) so the Configs have no Hardware selected now
C) Are devices and Configs already active but simply not work ? Any Bug Reports in the Debug String ?
D) Is this a problem on ONE Arduino ? If you have multible Arduinos in your Project does all switches and light that not working set on a specific board ?

I´m shure we can help..... But you have to do more investigations for us.

Please Reply if you have more infos or if you solve it.
Good Luck !
2017-09-04 08:43
Go to page 1Go to page 012Go to page 2Go to page 2