Ride, Captain, Ride Aboard Your Arduino-Controlled Autopiloted Sailboat

[Jack], a mechanical engineer, loom builder, and avid sailor wanted an autopilot system for his 1983 Robert Perry Nordic 40 sailboat with more modern capabilities than the one it came with. He knew a PC-based solution would work, but it was a bit out of reach. Once his son showed him an Arduino, though, he was on his way. He sallied forth and built this Arduino-based autopilot system for his sloop, the Wile E. Coyote.

He’s using two Arduino Megas. One is solely for the GPS, and the other controls everything else. [Jack]’s autopilot has three modes. In the one he calls knob steering, a potentiometer drives the existing hydraulic pump, which he controls with a Polulu Qik serial DC motor controller. In compass steering mode, a Pololu IMU locks in the heading to steer (HTS).  GPS mode uses a predetermined waypoint, and sets the course to steer (CTS) to the same bearing as the waypoint.

[Jack]’s system also uses cross track error (XTE) correction to calculate a new HTS when necessary. He has fantastic documentation and several Fritzing and Arduino files available on Dropbox.

Autopilot sailboat rigs must be all the rage right now. We just saw a different one back in November.


[Thanks Jeremy]

22 thoughts on “Ride, Captain, Ride Aboard Your Arduino-Controlled Autopiloted Sailboat

    1. I had a lead programmer once tell me after a week of beating my head against GUI issues I was having with Drupal, “make it work, make it work better, THEN make it pretty.”

  1. Why would a PC based solution be ‘out of reach’? I don’t think it’s a monetary problem, old PCs are so common someone might actually pay you to take it! Maybe the interface? Get one with a parallel port and it can’t be that much different than the GPIOs of an Arduino. The language? Arduino is basically C++, PCs use any language you prefer, including C++.

    I think the Arduino is a better choice but I am curious why a PC solution was “out of reach”.

    1. I built a similar system for controlling a trolling motor (very similar to Minnkota auto pilot). I had to use two arduinos because the serial interrupt while reading GPS data disruptive to the entire system.

    2. Chris is right about the two Megas. The GPS cycle time is 1 Hz whereas the IMU is operating at 50Hz. Once a second the Main mega recieves the GPS update in a few milli seconds. I am working to add a third Mega to provide a remote control over a single cable with serial data transfer.

  2. If you can afford a Nordic 40, you can afford a proper Raymarine autopilot IMHO. This would be great for those of us with smaller boats that don’t have 100G to blow through on a 40 footer though.

    1. Just because you could afford something once doesn’t mean you can continue to. Perhaps circumstances changed, perhaps he could barely afford it, or perhaps he has other financial obligations. I wouldn’t leap to conclusions

  3. Jack has done a great job. I am not sure whether I would have the inclination to embark on such a project. However, I am currently re-writing the AutoPilot code to obviate the mega which handles the GPS..
    I have a finite finite state machine handling the incoming GPS, and the GPS code no longer blocks the auto pilot code. In addition, the overhead to do the data transfer is now gone.
    The have re-used the majority of the current GPS code,
    In addition I am implementing alternative IMU components & optionsto work with the 9 DOF IMU that I have, so I have some work to do there still. I will attempt to keep the Polulu code.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.