The autopilot on Crazy Anna, our Vancouver 27 sailboat, is an Autohelm 800. It was probably made around the same year as Crazy Anna - 1985 - and was never really quite powerful enough to steer her in adverse conditions. While fine for motoring and sailing in light winds, I would like to have a more robust solution as well as a back-up, in case this old tiller pilot dies. This is even more important since we removed the mechanical wind vane steering system in order to fit our boat into the 30 foot slip available at our yacht club.
![]() |
| Pelagic's highly regarded autopilot |
The options out there to purchase range from a $1000 ST-2000 - a more powerful and modern version of our current tiller pilot made by the same people - to a several thousand dollar system with a separate computer, tiller actuator, and compass. In between are a number of options in the $1000 to $2000 range available from Scanmar (Pelagic) and a couple of manufacturers in Europe.
Rather than buy one, I felt like this kind of project would be a fun mix of electronics, mechanical engineering, and software development. So I decided to build my own autopilot and write my own software to do the automatic steering.
![]() |
| The linear actuator is what replaces the human arm and takes commands to push and pull the tiller |
While I was researching this, I started to use Google's artificial intelligence searches that are built into the Chrome browser. I realized quickly that I could make further use of AI to help me actually design the electronics and pick a suitable linear actuator (an electric motor driven ram that pushes and pulls the tiller), and even to design and write the software. This would be my first experience using AI for anything concrete and relatively important to me.
It took about 12 hours to select the hardware, design a prototype, and write the software using Google's AI. The AI actually did all the coding under my direction. I ordered a linear actuator from a supplier in Greater Vancouver area and had it shipped to my brother's house where I would work on the project while visiting family. I also ordered the electronic bits and pieces from Amazon. Everything arrived within a week, and four days later I had a working prototype that would steer to a compass course and allow manual override.
![]() |
| Linear actuactor can move the tiller 6 inches either side of centre using a powerful electric motor and is capable of exerting 100 lbs of force continuously |
In just over a seven days, we have written and tested three different approaches to steering a sailboat automatically that build on recent open source work and academic research papers. This included wiring up and bench testing on a prototype board with a real sensor and motor controller powered by a 12 volt battery (see photo above).
Our attempts to build an AI version of an autopilot were quite successful, but despite a few days of focused work, we were unable to make it steer better than a more traditional PID model (see below for an explanation of PID). This turns out to be what researchers had already discovered, as confirmed by Claude when I belatedly asked the AI to look into the literature. The only innovation we can claim here is that we created and trained to a high level of competence, a Reinforcement Learning autopilot controller that will run on a very simple $10 micro-controller with limited memory. It uses Q lookup tables to determine what is the best next steering action by consulting these tables whose values were gradually filled in by hundreds of hours of simulated sailing. We will try this Ai autopilot on our boat and perhaps it will be improved by real world training.
In case you are interested, A PID autopilot is as Wikipedia says: "a closed-loop control system that uses a Proportional–Integral–Derivative (PID) controller to automatically steer a vehicle—such as a boat, aircraft, or drone—toward a target heading, altitude, or path. It compares a desired target (setpoint) against real-time sensor readings and calculates actuator commands (like rudder or control-surface angles) to reduce the error." This type of autopilot is what all the commercial sailboat systems are based on, as far as I can tell.
The third type of autopilot we looked at attempts to move the rudder directly to a calculated angle. This approach is also what the AI version aims for but in this case it is done without a learning period using instead a set of rules and gain values. We started with ideas from a very simple open source version that was used experimentally, but not in its actual working code, by PyPilot. Modifying this using what we had learned in developing the PID version, we were able to make it steer very nearly as well and in some cases, e.g., with very light boats, better than the PID version.
![]() |
| Claude created the hardware layout so I can correctly and neatly wire up the sailboat ready version of the control board. |
I must say I am absolutely floored by how AI has changed the way I can develop a system like this. It has designed the hardware and with minimal guidance developed and coded all the software and tests - around 12,000 lines of embedded C++ code that would by some estimates have taken a senior programmer more than 6 months to achieve. It did all this in little over a week. It allowed me to refine my design and deal with dozens of issues in a careful, regression tested way so that every new idea or piece of code we added was an improvement. It generated excellent UML design documentation, clear descriptive source code comments, and guidebooks on how to use the system and how to maintain it. I now understand why so many software developers are either losing their jobs or learning to use AI to do on their own what would have taken a team of a dozen people a couple of years ago. One thing I should note is that Claude was not impressed by the initial code I had it review that Google's AI had created. Working with Claude, I would estimate that we rewrote 80 to 90% of that initial code.
The other thing working with an advanced AI allowed me to do was to go beyond what I could have done because of my limited training in physics and electrical engineering. I was able to put together a working circuit only with enormous assistance and to troubleshoot and fix mistakes or errors I found in the working prototype quickly and effectively. Claude automatically generated tests to reproduce each issue and determine when it was fixed. Early on, I asked Claude if there was some way that we could keep track of the tiller position without installing an external sensor that would tell us its actual position. Together we created and refined a method of deduced reckoning that after a few days of work is very accurate at least under simulated testing - accurate to around a degree or two of error per hour. The other innovation Claude developed at my suggestion was a way to estimate boat speed without a GPS by using the pressure of water on the rudder, which is correlated with velocity.
This is the first time I have programmed since I retired 8 years ago and I am both humbled and exhilarated by the experience. I was able to create something so far beyond what I could have done on my own in a fraction of the time. The quality of the code is much better than my hand coding and far easier to maintain using AI. It has removed the drudgery that is a large part of making changes to an established code base and has delighted me with its ability to let me rapidly explore ideas. Such exploration would have been prohibitively costly if I had to hire a team to help me or spend weeks of my own effort doing research and exploratory coding.
![]() |
| Part of one of the UML design documents created automatically at my request by Claude. |
All three approaches mentioned above will be available in a public github repository along with design documents and templates and instructions for future users who want a head start on making theor own autopilot. I plan to make this publicly available only after I have actually tested this work on my sailboat and made whatever changes required for safety and performance in the real world. Before I can do this, I need to make a more robust version of the hardware and figure out how to mount the actuator so it will push my tiller. I hope to have this completed by the end of next month.





















































