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
John-Alex-Warren
Posts: 18
Hello

Firstly, a huge thank you to Sebastian for Mobiflight, it's amazing and almost eveything I've done with it works flawlessly so far!

However, I'm having a problem configuring my stepper to simulate the APU temp gauge on the NGX's overhead.

I've used StephanHo's excellent tutorial to set up the flap indicator using the same hardware, and that works perfectly (many thanks to him for that thread!). I've also used mobiflight to configure a number of LEDs, switches and rotary encoders which all work fine aswell.

I've have had some luck with the APU gauge, but it's not working consistently. I'm using the same 28BYJ-48 stepper motor with ULN2003 driver that I used for the flap indicator. Here are some screenshots of the mobiflight configuration and the gauge that I have made. There are no comparison, interpolation or precondition settings selected.







I'm still not clear on exactly what values need to be in the "sim/stepper boxes". The "sim" is set to 1000 because that was the default value, and after some trial and error, a "stepper" value of -1750 gives me the right amount of movement. Basically, it does work, but there are a couple of issues:

1) The needle on the gauge (attached to the stepper motor) follows the needle on the simulation when the APU is switched on - clockwise to 7 and then anticlockwise to 4. However, when the APU is switched off and the needle moves back, it moves past the point on the gauge where it started and ends up resting in the wrong place. If the APU is switched on and off again, the same thing happens and the needle stops even more out of position.

2) The manual calibration will not work. Clicking on the "move" button just makes the motor move around erratically and it's impossible to get the needle back into the correct position.

Please can somebody help me to fix these problems? It's very frustrating, especially when eveything else is working so well! I'd appreciate some guidance regarding what values and options need to be selected and why the manual calibration is working for the flaps gauge but not for this.

Many thanks!
[Last edited by John-Alex-Warren, 2018-05-20 02:50]
2018-05-20 02:39
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Hello John-Alex,

I think the main problem is the basic settings in the Config Wizard.
I do not know exactly what values ​​you will get from the simulator for displaying the needle, but please take the following:

1. if the values ​​are e.g. <1000, they should be brought to a value that exceeds the 1000. Thus, under FSUIPC, in addition to TRANSFORM, a formula should be entered which guarantees these values.

2. For SIM / STEPPER other values ​​should be entered. A negative value would be questionable!

One turn of the needle would mean she is backing a 360 degree path. That's a complete circle. For better processing, I would set this value (SIM) to 3600. Likewise, I would first leave the value 2040 at STEPPER. Now comes the value for TEST VALUE. Your scale goes from 0 to just over 8, going back about 260 degrees. Multiply this value by 10, as with SIM, so enter 2600. You can readjust this value later.

3. Now the manual calibration is done in the wizard. If the needle is to the left of the 0, you can set -50 in the wizard and press MOVE until the needle stops near 0. Now reduce the steps until the needle is exactly at 0. Now press the button SETZE 0-POINT. This is the basic position saved.

If you can not perform this manual calibration, it may be due to your negative value specifications. If it is not, you should consider a defective hardware. Just swap the ULN or the stepper or both, do the manual calibration again and see what happens. If it still does not work, check the connections and cabling. As long as this does not work satisfactorily, it makes no sense to work with the simulation itself!

If everything is satisfactory, it is very likely that you have to interpolate the SIM values. This is done in the COMPARE tab. 0 should also have the SIM value 0. With the manual calibration function, you can now move to the numbers 1 - 8 and then get the corresponding values ​​of the stepper position. These must now be equated to the transformed values ​​of the SIM in a table and entered in MF. It will probably not work without it.

Try everything first and then you will report again with the results.
Grüße,
Stephan (Time: UTC+1)
2018-05-20 09:58
Avatar
John-Alex-Warren
Posts: 18
Hi Stephen

Thanks for your reply, you obviously have a deep understanding of how Mobiflight works. I've taken your advice on board. The negative value was the only way I could get the stepper to rotate in the correct direction, but I'll experiment with your suggestions and will let you know if I have any more success.

Thanks again!

Regards,

John
:)
2018-05-20 13:35
Avatar
Apeshaft
Posts: 51
Supporter
I have mine working fine with the same hardware, there is a thread on this forum with the correct settings in Mobiflight. If you don't find it I can check the values tomorrow.

How did you attach the shaft to the motor?
And where did you get in hold of the pointer?
Please elaborate how you built the gauge.

Best regards
Oskar

EDIT: Found the thread. This works 100 %.

https://www.mobiflight.com/forum/message/4136.html
[Last edited by Apeshaft, 2018-05-21 14:49]
2018-05-20 22:46
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5566
Supporter
iconJohn-Alex-Warren:

The negative value was the only way I could get the stepper to rotate in the correct direction,



I think a negative value is not correct here.... the "Step" field should simply include the number of Steps ( 2048 or 4096 in your case)
To Change direction we normaly use interpolation like on Servos .... For Example 0=100 --->100=0

I´m not good in electrical stuff... But "maby" this will work for you.

I think (not tryout myself) that a simple rewire will change direction, too.
Tryout the follow....

Methode A ) Swap IN 2 and IN 3 on Arduino to ULN Side ( Simply swap the two wires together... If IN2 is Pin 10 dan IN3 is Pin 11 then simply connect the In2 in Pin 11 and the other now in Pin 10. Make a Test !

Methode B ) Swap the In2 and In3 from ULN to BY Motor.... Cut both wires ( or open conncetor if possible) Then swap it like explane above so the IN2 Line from ULN now go to IN3 Port of Motor and same for the IN3 Line to IN2 Connector.

I´m not shure but THIS should simply reverse direction.

Please report if this is working for you !
Good Luck !
2018-05-21 16:22
Avatar
John-Alex-Warren
Posts: 18
iconApeshaft:

I have mine working fine with the same hardware, there is a thread on this forum with the correct settings in Mobiflight. If you don't find it I can check the values tomorrow.

How did you attach the shaft to the motor?
And where did you get in hold of the pointer?
Please elaborate how you built the gauge.

Best regards
Oskar

EDIT: Found the thread. This works 100 %.

https://www.mobiflight.com/forum/message/4136.html



Ah this looks good, thank you. I'll try it after I have posted this.

The panel, annunciators, knob and needle I have designed in TinkerCAD, and 3D printed. The panel is white PLA, which lets the light though so it illuminates the graphics, which are simply printed on paper and glued on to the panel.

The shaft of the stepper fits through a hole in the panel, and the needle just slots onto it and will be held in place with a spot of hot melt glue.









I will probably reprint the front on some better quality paper but so far I'm happy with it. I think it looks OK considering the whole thing including components cost around £3! The ultimate in cheap DIY cockpit!
2018-05-21 23:32
Avatar
Apeshaft
Posts: 51
Supporter
Looks good :thumbup:

I see you have PSI written on it, the EGT gauge does not measure pressure but exhaust temperature from the APU
in terms of x100 degrees.
If you want a gauge that's more like the real one you can use Peter's:

https://buildaboeing.com/overhead/

Also, how are you planning on doing the back lighting?
Will not the stepper motor itself block the light?
2018-05-22 14:25
Avatar
John-Alex-Warren
Posts: 18
Thanks, and thank you all for your amazing efforts to help me get this stepper working properly. I finally settled on Apeshaft's configuration which works beautifully. Who'd have thought it was that simple!

What a great little community this is :) :)

About the panel...

I did notice the PSI label, but this is just a prototype panel. I'll have a look at Peter's or I can just edit it out of the JPEG.

I haven't made a firm decision about the backlighting. I'm thinking along the line of superbright LEDs control by a circuit/potentiometer to make them dimmable (with the control on the lighting panel of course!)

The print on the panel is grey on the front, and there is a reverse image exactly in line on the back of the paper which is black. This blocks the light and only allows it through where the white text and graphics are. Initial tests using the LED on my iPhone (!!) look great. The graphics light up but the light doesn't appear to bleed through the rest of the panel. Even if it does a bit I'm willing to put up with it considering I'm looking at eventually having a (mostly) fully functional overhead panel for very little money!

Fortunately the shaft of the stepper is offset from the centre, so the stepper sits in just the right position not to block the light :)
[Last edited by John-Alex-Warren, 2018-05-22 22:25]
2018-05-22 21:39
Avatar
pizman82
Moderator
From: ETSI, Germany
Posts: 5566
Supporter
By the way....
Just see this old topic.... https://www.mobiflight.com/forum/message/8615.html

Thats a other solution for a wrong direction..... Simply make a Cogwheel 1 by 1 solution. That will invert direction.
Good Luck !
2018-05-23 08:25
Avatar
John-Alex-Warren
Posts: 18
Thanks but I went against advice and changed the "stepper" number to a negative value so the needle is moving in the correct direction, and it's workig perfectly :)

That gauge does look good though!
2018-05-23 19:55
Avatar
StephanHo
From: EDDG, Germany
Posts: 1819
Supporter
Great John!

If everything runs satisfactorily, it should be fine. However, the negative values are new to me. You never stop learning.
Grüße,
Stephan (Time: UTC+1)
2018-05-23 20:52
Avatar
Apeshaft
Posts: 51
Supporter
Just another quick question John - where did you find the Dzus-screws?
2018-05-24 12:02
Avatar
John-Alex-Warren
Posts: 18
iconApeshaft:

Just another quick question John - where did you find the Dzus-screws?



Hi

They are not real, they are just M4 machine screws through a 3D printed "collar". They will screw into fasteners which will be embedded in the wooden frame.

2018-05-29 01:31
icon