Skip to content
Dave Cole edited this page Jan 27, 2019 · 4 revisions

Welcome to the PC_Marine_Autopilot wiki!

The C# version of the PC_AutoPilot is going on hold... Please refer to the Node.js Javascript version.

The goal of this project will be to create a PC based Marine Autopilot. I have developed an auto pilot based on an Automation Direct Click PLC and it worked in certain conditions but was based on a PID routine which is fine for heavy sailboats and most power boats, but doesn’t work well for lighter, more high performance sailboats with fin keels.

A traditional PID control will work with heavy displacement boats to an "ok" level under many conditions. This autopilot control will have a PID component, and also a Fuzzy Logic control component as well for pilot control. I believe that a Fuzzy logic controller can exceed the performance of a PID controller in difficult conditions.

My intention is to be able to use standard PC hardware. A lower power, dual core laptop running Windows 10 should be more than adequate. The same common PC could also be used for navigation software, playing music, etc. You likely already have a laptop for your boat, if not you know you need one! ;-)

So you are saying that using a PC is a huge overkill for a Marine autopilot and you would be right. It is an overkill. However PCs and PC programmers are pretty common these days. People have already done Arduino Autopilots but they usually require chips, soldering, etc and that chases off a number of software folks. Not everyone wants to be a hardware engineer. Most just want to buy the hardware, plug it together, load software and go. If you need to tie some wires to the hardware, a real terminal strip might be really handy, right? You probably don't keep wire wrap tools on board?
Now from a purely practical standpoint, if the software runs on your PC and you are using your autopilot and you think you really need to alter a control to make things more convenient, how can you beat going into the cabin, pulling up Visual Studio and making some tweaks on the spot!
Beyond the ease of development, you have a full blown PC for your control... want to add voice command to your autopilot? How about saying "Autopilot, tack right when coming about? You won't be doing that with Arduino hardware! Lets get the hardware out of the way and make this a software solution.

Current plans: I'm going to use a fluxgate compass that I already have. It has an RS232 interface. Eventually it makes sense to setup an inexpensive Arduino Uno or similar with an attached compass chip for mass consumption. Put it in a plastic box and mount it where-ever so it is not tied to any other hardware devices.

The Rudder controller will consist of a low cost PLC communicating via Modbus TCP. An Automation Direct Click PLC equipped with an Ethernet port. The PLC will have no, or minimal programming. Basically it will act as a $179 I/O block. It will be able to monitor rudder position via its analog inputs, switch a motor on and off for rudder movement and handle digital inputs and outputs for manual control functions - overrides and on/off functions. The software will not be tied to one and only one PLC. Modbus TCP is a cross platform protocol. There are other PLCs that could be used for the same purpose, such as the Siemens S7-1200.

The goal is to use COTS items for the controls - Common, Off The Shelf items that don’t require soldering, etc. Plug it together, wire it up and it should work. If a part breaks, order another one. Everything should be able to run off 12 volts. A 12 to 24 volt converter will be used to power the 24 volt PLC. Modbus TCP via Ethernet will be used to connect the devices via a low cost switch. Cables will be standard Ethernet cords (do they get any cheaper or more common?). I’m not going to use WiFi. Its tempting, but not nearly as reliable as hardwired Ethernet. This needs to work, all of the time.

The rudder motor can be a reversible hydraulic pump, windshield wiper motor ( I understand the Dodge Ram pickup truck units work well), or an off the shelf electric actuator. Keep in mind you need to rig things up so you can remove the autopilot from service when not wanted. I’ll include a clutch enable output in the software. A hydraulic valve can switch out a hydraulic pump, de-tensioning a V belt can disconnect a wiper motor, disconnecting the linkage can remove an electric actuator.

I’m going to use standard software tools for the development. Microsoft Visual Studio Community (free) 2015 for right now with C# and Windows Forms. Very, very common, standard software that can run on the target platform (the laptop). Visual Studio 2017 apparently has some serious bugs at the moment. However that will likely be fixed in the next year.

My hope is that there are a lot of other C# programmers (its very much like Javascript, Java, etc) who will take this and create pull requests so this software can be further refined. I’m going to try and separate the control engine from the electrical interfaces so it will be easy to experiment with Fuzzy logic vs PID vs Enhanced PID vs AI pilot control routines.

If you want to add NMEA interfaces to things like OpenCPN, that should be easy to do. I see an autopilot as a stand alone device. However if you want to run OpenCPN or some other Nav program on the same laptop, then why not.

All of this will be open source…​ I’m not trying to hide anything. I think we should be able to create an open source autopilot that can work under a variety of conditions and basically negate the need for any proprietary systems.

Dave

Clone this wiki locally