Go Down

Topic: Auto Pilot for Tiny Yacht (Read 6039 times) previous topic - next topic

michinyon

My feeling is that using the GPS to determine which way you are going,  is bound to fail.

If you take a GPS and walk around with,   it will calculate it's position from time to time and calculate an apparent direction you are moving based on those points.    If you plot them on a map ( Google earth is the easy way ),   you will see a zig-zagging series of straight lines.    This would be useless for steering a yacht.

Secondly,  I think it would be futile to try steering a boat without knowing which way the boat is facing.  A GPS cannot tell you which way the boat is facing.  A digital compass which costs about $4 will tell you which way the boat is facing.  In simple terms,  the boat needs to be pointing in the direction that you want to go.   You can then adjust this for leeward sideways drift,  currents or whatever else you like.   In the short term,  to control the tiller to keep the boat pointing in the direction you want to go,  you need a digital compass chip,  not the GPS.   Then,  in the medium term,   you use the GPS position to compare where you are,  to where you want to go,   and adjust the course reference that the compass is using.   I wouldn't use the GPS course heading information for anything,  because it is basically useless IMHO.




Microyacht

Thanks for that wildbill. I have found that with many microcontrollers, even with internal pull-up R's, with un-avoidable long leads on pins, it can be a problem, cured only by the lowest value resistor that will still permit a valid difference between 0 and 1! I've been involved in electronics all my life but NOT programming!

Steve
http://www.calvertonweather.co.uk
http://www.aroundinten.org
Steve
http://www.calvertonweather.co.uk
http://www.aroundinten.org

Microyacht

Thanks michinyon. Before I started this, I did take the GPS from my car for a walk (Internal battery now only lasts 5 mins!). I walked down the pavement (sidewalk) for almost 1/4 mile before a bend. In compass mode, It displayed 271º almost constantly! On my return, it displayed  89º. As the battery warning light came on, I quickly completed my tests by rocking the unit to simulate waves but still trying to point the GPS forward. At worst I saw only a degree error.

My small, chubby boat won't sail much closer to the wind than 40º. Progress will be slow. A few degree error on each tack won't make a whole hell of difference. If I can get a few hours sleep from time to time, it'll be a bonus. I can make overall route error steering manually while I'm awake!
Steve
http://www.calvertonweather.co.uk
http://www.aroundinten.org

michinyon

You are misunderstanding what the GPS actually does.    The GPS device does not know which way you are holding it (  unless it also has some kind of compass device inside it,   some do.

A GPS device inherently calculated its position.  Thats all.  It estimates its position roughly once a second,    with an uncertainly of 2 or 3 metres.

Any estimate of the direction in which you are going,  is based on the difference between successive position estimates,   and GPS does this quite poorly.   Often much worse than you could do for yourself by plotting successive position estimates on a piece of graph paper and then drawing a line through them.

Here's why.  If you are driving in a car,  or you are Usain Bolt,   then each position estimate is going to be 10 or 15 metres apart.  Even if your latest position estimate  and the one before that,    are off by 2 or 3 metres (  and often much more ),   it is still fairly clear which direction you are going.

But if you are walking down the street at normal speed,   or in a very small boat,  the successive position estimates are closer together  than the uncertainty of each estimate.   Suppose a particular GPS reading estimates your position to be 2 metres in front of your actual position.   Suppose you walk 1 metre forward in 1 second.   The next GPS reading estimates your position to be 2 metres behind your actual new position.    The GPS will conclude that you are walking at 3 metres per second,  backwards.   This sort of nonsense would be absolutely useless for tiller control.  Worse than random.

The second reason your plan will fail,   is that GPS has no idea about the orientation of the boat.    You could take the sails down,    and the boat could be drifting sideways in the direction that the wind or current is taking it,    and your GPS course would have no idea.    Controlling the tiller of a yacht is about controlling the orientation of the yacht,  it is not actually controlling the direction in which you are going.



Microyacht

. . . I'm tied-up with storm damage after monday's battering. Back soon.

Steve


Sent from a Blackberry
Steve
http://www.calvertonweather.co.uk
http://www.aroundinten.org

Steve and others interested in Arduino based full size boat autopilots. I have been working on a marine autopilot for a 40 foot sailboat for a couple of years.  Last summer the autopilot steered my boat 500 miles up the inside NW passage from Seattle to the north end of Vancouver Island and back.  I have just finished putting together a YouTube video showing the boat under sail and being steered by the autopilot.  The video also does a brief walk through of the hardware and operating modes.

Here is the link to the video.  If anyone wants to adapt this project to their needs I'll  be glad to help.

http://www.youtube.com/watch?v=-nA6wo9PXls

Jack Edwards

sbright33

GPS can be used to adjust the tiller on a sailboat short term.  As long as it's moving about 1 knot or more.  The compass heading is constantly changing with each swell, where GPS does not as much.  With the appropriate feedback constants and timing you can steer up and down with each swell just like a human navigator would.  When the speed is less than 1 knot, this is the best solution.  When the seas are more flat, and speed >1 knot, only GPS is needed.  I have been sailing and designing my own autopilots for 20 years.  Sometimes out in the middle of the Pacific!

When you're cruising for weeks at a time with limited battery power you would not want to use the autopilot to steer up and down each swell.  Mechanical wear becomes an issue.  With light winds and smooth seas it is difficult to see a consistent heading with GPS, because of the slow speed.  You are correct.  But then you wouldn't need an update every 1 second.  You can write your own code to calculate the heading every 10 seconds instead.  There are only a few conditions where GPS alone without a compass is not appropriate, rough sea state with little wind.  A compass is needed.  But there are also many conditions where an electronic auto pilot fails to work efficiently, regardless of the sensor.  During a storm I'd prefer a Windvane.

http://www.selfsteer.com/windvaneVAutopilot/

The absolute error can be 10m.  But from one second to the next the error changes by only inches.  So even when you're moving slowly, the line is straight when you plot it.  Data can be obtained 10x per second with a modern GPS.
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

sbright33

No comments?  I guess we're all in agreement then!  :-)
If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

bobmor99


Steve and others interested in Arduino based full size boat autopilots. I have been working on a marine autopilot for a 40 foot sailboat for a couple of years.  Last summer the autopilot steered my boat 500 miles up the inside NW passage from Seattle to the north end of Vancouver Island and back.  I have just finished putting together a YouTube video showing the boat under sail and being steered by the autopilot.  The video also does a brief walk through of the hardware and operating modes.

Here is the link to the video.  If anyone wants to adapt this project to their needs I'll  be glad to help.

http://www.youtube.com/watch?v=-nA6wo9PXls

Jack Edwards

Many thanks for your work. It has inspired me to start on an autopilot for my old C&C-33-1.
One question about the Pololu:

From github:   https://github.com/pololu/minimu-9-ahrs-arduino
"When the AHRS program first starts running, it takes some readings to establish a baseline orientation, during which it expects both the roll and the pitch of the sensors to be zero. Therefore, it is important to keep the MinIMU-9 level for a few seconds after powering on or resetting the Arduino or connecting to it from a computer."

Won't this be problematic if you power up or reset the autopilot after you're already underway?

--Bob M



Go Up