gPilot


Introduction

Introduced from Autohelmet may years ago, an self-steering gear (also called auto pilot) is still something handy for all those owning a (sailing) boat.  Depending its make or model it may yaw in heavy wind or waves or just in favor of mobility.  An self-steering gear compensates for such deviations automatically, releasing you from this task.
I was infected by this idea during a sailing trip in Sweden.  Since my boat is self made, building my own auto pilot is not more than a logical step.

Project aims

Such an auto pilot consist of a compass module, some driving and data processing circuit and a actuator. Both, compass module and actuator can be purchased where as data processing requires some skills to implement it correctly. For the sensor, a magnetic compass is foreseen. It is not intended to implement a GPS interface but would be possible. At the end a robust remote controlled self-steering gear should be the result.

Hardware

All hardware has be built and adapted to a small motor boat for testing. Figure 1a shows the actuator and the electronics connected to the motor. The usage of a commercially available linear motor has the advantage of a robust device and nice looking housing, as depicted in Figure 1b.

Test setting
Picture 1a: Test setup with actuator, control unit, battery and a sonar Picture 1b: Linear actuators from Hiwin




main unit
Picture 2a: Main unit: A PIC microcontroller with the compass module, some
power electronics and RF receiver for the remote control.
Picture 2b: Remote control PCB layout in original size
 
Circuit drawing (improved version), Xcircuit source file Circuit drawing
PCB Layout preview and the-all-you-need-zip PCB Layout preview and the-all-you-need-zip
Firmware (beta) Firmware (stable)


Test results

The system has been tested with the setup in figure 1a and the course recorded with a GPS receiver. Then the values have been plotted on the map in figure 3. First of all the system works and the controller is stable. The discontinuities in Picture 3 are manual interactions around obstacles. (which is still needed!)
The test has also shown some possibilities for improvements. As the transfer function is not exactly known, the regulator is certainly not optimal. Also the clearance between the actuator and motor has been neglected but has a certain influence. Therefore firmware is considered as beta. Karte
Picture 3: Test run on Lake Konstanze, dimensions according to SwissGrid in meters


Next Step

An 'external' mode will be added to the firmware, where the actual angel is sent and listened for commands to turn via serial interface. This allows to capture real data and to determine the transfer function, which allows to optimize the controlling loop.




License

Copyright (C) 2007-2008 Adjan Kretz <kretza@bluewin.ch>

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA