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
Ryan27679
Posts: 52
Hi, sorry I'm back with my problems :( :(

The above stepper arrived today so I began setting it up for use as a whiskey compass.

Wiring is usual 5v and gnd, +
IN1: 33
IN2: 34
IN3: 35
IN4: 36

Offset is 0x02CC, Float, 8 bytes, 0xFFFFFFF++ Mask, BCD mode, no transform.
No compare, no precondition.
Display is set to use the stepper, Sim/Stepper = 360,2044, Test value 180, compass mode enabled.

What happens is, the manual calibration steps are generally inconsistent, and 50 steps moves it about as much as 10 steps does. It will only move in negative steps.

Regardless, I get it to point North on the crude indicator I've attached, and 'set zero'.

Mobiflight is reading the compass heading from P3D accurately on the offset. As I look at it just now, the FSUIPC value is 359, Output value is 359.

Stepper is quite warm.

I turn the aircraft to around 270 degrees magnetic. FSUIPC and Output agrees, but but the stepper has only rotated to 300-310ish. If I now turn back to north, it doesnt budge an inch.

LEDs C and D on the ULN2003 board stay lit at the moment. If I move it with manual calibration =/- 10/50 steps LEDs A, C and D blink. This time of course, positive and negative calibration movements both result in clockwise rotation. Sometimes positive calibration doesn't move it at all. Nothing makes it rotate anticlockwise and LED B never blinks in any case as far as I can see..
Minus 1 degree illuminates A and D, plus 1 degree illuminates C (or switches off D as C and D are always on).

I've checked the pin configuration several times to confirm they are correct.

It may be that this stepper or the pcb are a little too 'cheap', or I'm maybe missing something extremely obvious..

Grateful for any info, and sorry again for the new guy questions!
2018-08-11 13:56
Avatar
Ryan27679
Posts: 52
From the ebay ad, the power supply is 5v, stepping angle 5.625 x 1/64, reduction ratio 1/64
2018-08-11 14:02
Avatar
thatchi
Posts: 166
Check out this website. The owner did the whole c172 radio stack and gps and compass with MF. Very impressive. There details about the compass even with 3D printed parts. Also there custom files for prefab circuit boards for gps and radio stack. Good luck.
2018-08-11 15:02
Avatar
thatchi
Posts: 166
The website is http://flyingforfun.weebly.com/cessna-172-cockpit.html :thumbup:
2018-08-11 15:04
Avatar
thatchi
Posts: 166

That is his wiring.
2018-08-11 15:22
Avatar
thatchi
Posts: 166
I see he set sim/steppper at 360/2040.
2018-08-11 15:29
Avatar
thatchi
Posts: 166
And check these



2018-08-11 15:36
Avatar
Ryan27679
Posts: 52
Yes the weebly site is the one that inspired me to start this operation!

I followed that one to the letter initially, then started reading that different steppers are geared differently and so on.

Certainly it seemed to work, to a degree (haha!) in one direction but only 2/3rds as far as it should have moved. Still can't get it to turn the other way. :(
2018-08-11 20:49
Avatar
thatchi
Posts: 166
Could be hardware, wiring. I would down load a sample IDE from arduino website for ULN2003 driver and test to make sure it turn in both direction. Some of the Chinese made items has faulty wires.
2018-08-11 22:17
Avatar
Ryan27679
Posts: 52
Thanks, is there a reliable place I could buy another servo from to see if I get the same result?
2018-08-13 15:34
Avatar
StephanHo
From: EDDG, Germany
Posts: 1719
Supporter
Hi Ryan,

maybe that it is a power problem. What is running else on this MEGA?
Note: a stepper needs nearly 180-200mA when moving and after 1st move the quiescent current is also ~200mA. That is the reason why the stepper gets warm.

If you have other item with a lot of current you quickly reach the 500mA limit and the ULN will not work correct if the power went down...

Do you have a chance to measure that? Please do that.
Grüße,
Stephan
2018-08-13 17:04
Avatar
Ryan27679
Posts: 52
Hi Stephan, and thanks as always for answering my questions!

I have 2 16x2 displays and a few buttons. The screens dulled slightly when the stepper moved, but I'd have thought if it could move one way, it should be able to move the other :(

Wondering if it's just faulty/damaged hardware.
2018-08-13 17:09
Avatar
StephanHo
From: EDDG, Germany
Posts: 1719
Supporter
Ryan,

as I said, if possible, measure current and voltage.

Another option would be to provide the stepper with an external 5V power supply. Do not forget GND of the external power supply to the MEGA. The 5V only to the stepper.

The LCDs need hardly any power, the buttons almost no. But if the LCDs flicker, then it will probably be a power problem. Ultimately, a defect on the controller / stepper can not be excluded. But before a new purchase, the conventional test methods should exclude everything else.
Grüße,
Stephan
2018-08-13 18:09
Avatar
Ryan27679
Posts: 52
Thanks Stephan, I'll see what I can do!
2018-08-14 10:15
Avatar
DocMoebiuz
Moderator
From: NW of KPWK, United States
Posts: 1470
If the stepper moves only in one direction I recommend to check the configuration and wiring of the four wires that are connected to the ULN2003. If they are not in the same order as the pins that you configure, the stepper might move, but not correctly.
It is definitely strange that one LED never lights up.

As thatchy pointed out: Always a good way to troubleshoot is to download a simple sketch and upload it with the Arduino IDE. That’s an easy way to verify your hardware and your setup is working.
Have a great day!
Sebastian

MobiFlight - Simply build your own home cockpit for your favorite flight sim - MSFS2020, FSX, Prepar3D (FSUIPC), X-Plane (XPUIPC)
2018-08-14 12:18
Go to page 1Go to page 012Go to page 2Go to page 2