Wet Compass and Stepper Motor

Support for Arduino in combination with Air Manager and Air Player

Moderators: russ, Ralph

Message
Author
User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Wet Compass and Stepper Motor

#31 Post by Keith Baxter »

@Blue_Wings

Hi, It would be nice to know your name. Most of us here or on first name level.

If you are using the instrument that Ralph indicated, I want to make sure that you have connected the hardware correct. So please read this thread.

viewtopic.php?f=35&t=3893

In there is a script from Wendy. We will try that one later if Ralph's one does not work.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Wet Compass and Stepper Motor

#32 Post by Keith Baxter »

Hi,

Where you go bud? You will soon find out my humor, Smile with us.

Be sure to let us know how you are progressing. We will get you sorted and your instrument working.

https://youtu.be/bV1Z05f6BRw

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

Blue_Wings
Posts: 14
Joined: Sat Nov 28, 2020 2:11 pm

Re: Wet Compass and Stepper Motor

#33 Post by Blue_Wings »

Keith Baxter wrote: Thu Dec 03, 2020 5:24 pm @Blue_Wings

Hi, It would be nice to know your name. Most of us here or on first name level.

If you are using the instrument that Ralph indicated, I want to make sure that you have connected the hardware correct. So please read this thread.

viewtopic.php?f=35&t=3893

In there is a script from Wendy. We will try that one later if Ralph's one does not work.

Keith
Hi Keith

You can call me Sal.

The link you have provided has been useful and you were right to think my wiring was not correct. I have followed the correct wiring that should work with AM but that was enough to change the outcome. The stepper continues to turn endlessly. I have tried to add a pushbutton on D2 but nothing seems to happen when I press it. The stepper likes to continue turning.

I have purchased a couple of sensors but gotta get the button work first.

Thanks for your help

User avatar
Keith Baxter
Posts: 4674
Joined: Wed Dec 20, 2017 11:00 am
Location: Botswana

Re: Wet Compass and Stepper Motor

#34 Post by Keith Baxter »

Blue_Wings wrote: Fri Dec 04, 2020 6:30 pm

Hi Keith

You can call me Sal.

The link you have provided has been useful and you were right to think my wiring was not correct. I have followed the correct wiring that should work with AM but that was enough to change the outcome. The stepper continues to turn endlessly. I have tried to add a pushbutton on D2 but nothing seems to happen when I press it. The stepper likes to continue turning.

I have purchased a couple of sensors but gotta get the button work first.

Thanks for your help
Hi Sal,

Great that we are on first name level and that your are persisting.
You will get loads of help and assisted with this, I promise.
Keep us updated.

Keith
AMD RYZEN 9 5950X CPU, Corsair H80I cooler, ASUS TUF GAMING B550-PLUS AMD Ryzen Mother Board,  32Gb ram Corsair Vengeance 3000Mh, MSI GTX960 4G graphics card 

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Wet Compass and Stepper Motor

#35 Post by Ralph »

A simple test would be with a jump wire between the button pin and ground. As soon as it starts to spin you can put the wire in and pull it out, it should stop spinning and then it is calibrated. That's how it should work in theory :) I've tested it here, so I assume that it works, but nothing is for sure.

As I mentioned before, I can also make a similar construction as Mobiflight has. But please be a little patient this time. I'm just doing my best to help.

Blue_Wings
Posts: 14
Joined: Sat Nov 28, 2020 2:11 pm

Re: Wet Compass and Stepper Motor

#36 Post by Blue_Wings »

Keith Baxter wrote: Sat Dec 05, 2020 11:33 am
Blue_Wings wrote: Fri Dec 04, 2020 6:30 pm

Hi Keith

You can call me Sal.

The link you have provided has been useful and you were right to think my wiring was not correct. I have followed the correct wiring that should work with AM but that was enough to change the outcome. The stepper continues to turn endlessly. I have tried to add a pushbutton on D2 but nothing seems to happen when I press it. The stepper likes to continue turning.

I have purchased a couple of sensors but gotta get the button work first.

Thanks for your help
Hi Sal,

Great that we are on first name level and that your are persisting.
You will get loads of help and assisted with this, I promise.
Keep us updated.

Keith
thanks man

Blue_Wings
Posts: 14
Joined: Sat Nov 28, 2020 2:11 pm

Re: Wet Compass and Stepper Motor

#37 Post by Blue_Wings »

Ralph wrote: Sat Dec 05, 2020 12:08 pm A simple test would be with a jump wire between the button pin and ground. As soon as it starts to spin you can put the wire in and pull it out, it should stop spinning and then it is calibrated. That's how it should work in theory :) I've tested it here, so I assume that it works, but nothing is for sure.

As I mentioned before, I can also make a similar construction as Mobiflight has. But please be a little patient this time. I'm just doing my best to help.
it worked. Thanks for the tip.

There seems to be an issue though. The stepper seems turning half what it should. So if the plane finishes a complete 360 turn, the stepper indicates a 180 turn. After the second turn, both stepper and x-plane compass will be in the same position. Im using a 28BYJ-48 stepper with ULN2003 board that is powered by the arduino nano which is powered by USB. I wonder if this a symptom that the stepper is underpowered though it does not stutter when it keeps turning without the calibration.

Mike Horsten
Posts: 79
Joined: Tue Dec 01, 2020 8:50 am

Re: Wet Compass and Stepper Motor

#38 Post by Mike Horsten »

HI,

I have been playing with this (Wet Compass) in 3.7 not 4.0 but i know that there needs to be a zero point to calibrate, if im not mistaken. I would like to know if i can replace the button function, Ralph, with a reed sensor or a IR light sensor. I presume this would be the better solution for the wet compass.
I have the 3D print done, but i still need to understand the code in 3.7 before going 4.0. I discussed the wet compass some time ago but we never moved forward.

But thanks guys for the support.
Building a home Cessna 172SP Steam. X-plane/MFS2020
(ex Name on Airmanager forum Polarair)

User avatar
Sling
Posts: 5237
Joined: Mon Sep 11, 2017 2:37 pm
Contact:

Re: Wet Compass and Stepper Motor

#39 Post by Sling »

Yes the button is just simulating a sensor for test purposes anyhow. The idea with the code is it starts to rotate endlessly from wherever it was last powered off and when the sensor is reached it triggers the calibration function and tells the code this is now the zero reference point. Any move code issued after this will be relative to this calibrated zero point. Having a fixed sensor will mean the zero point is always at the same point on the compass.

I hope this helps explain.

Tony

User avatar
Ralph
Posts: 7878
Joined: Tue Oct 27, 2015 7:02 pm
Location: De Steeg
Contact:

Re: Wet Compass and Stepper Motor

#40 Post by Ralph »

It is called a button in the script, but that doesn't necessarily say that it has to be a physical button. As long as it gives a pulse it is fine.

Post Reply