Pages

Friday, January 25, 2019

Pypilot Open-Source Marine Autopilot for Hydraulic Steering

With our Raspberry Pi (RPi) navigational computer up and running, it was time to turn our attention to compiling and installing a new autopilot.

Phoenix has hydraulic steering, specifically an older Wagner system. It has a large volume ram (33 cu. in; ~ 540 cc), which we rebuilt and installed new seals a few years back. We had all of the components of a rebuilt Wood-Freeman autopilot that matched what was originally on Phoenix ready to install, but decided we wanted to go in a different direction.

The Wood-Freeman systems are certainly powerful (they're still used on many commercial fishing boats in the Pacific Northwest, shrimp boats in Texas, etc.), but they are clunky, take up a ton of space (think bowling ball-sized compass versus quarter-sized 9-axis IMU chip in modern systems), and are power hungry. Fine for a fishing boat that's motoring all the time, but not ideal for a sailboat watching electrical power consumption. To top things off, we learned that they no longer made the seals for the specific Wood-Freeman hydraulic pump that came with Phoenix, and our decision was made for us!

Our friend Sean D'Epagnier developed an autopilot system that he tested on several ocean crossings -- pypilot --  and we began talking to him about how to scale up his design to work with our hydraulic system.

Pypilot is an open-source, RPi-based marine autopilot for tiller- and wheel-driven boats up to 40 feet.  The software is included in OpenPlotter, and was designed to work specifically with OpenCPN. The system is modular, has extremely low power consumption, and can be built and customized by the end user. Alternatively, you can purchase a tested system directly from the pypilot store if you don't want to do it yourself.

Like most autopilots, pypilot consists of an autopilot computer (brain) and a motor controller.
  • The tinypilot computer is a WiFi enabled mini computer (RPi Zero) programmed with Sean's open-source pypilot software and with a 9-axis IMU chip or hat (3 axes of accelerometer data, 3 axes gyroscopic, and 3 axes magnetic (compass)). 
  •  The motor controller is an arduino-based unit that connects to the pilot and controls the tiller, wheel, etc. It has over-temperature, over-current (stall) detection, fuse and reverse polarity protection, voltage, current, temperature and optional rudder feedback, and optional port/starboard end of travel input switches (rudder sensor) to prevent the tiller or wheel from going hard over.

The tinypilot would be at the core of our design; however his current motor controller design can only work with rudder drive units drawing 2-3 amps and stall up to 15 amp. We knew our system would draw more juice than that, so we needed a more powerful motor controller for our system. Before Sean could develop the new motor controller, we had to pick a hydraulic autopilot pump and figure out what our power draw would be.

Our 33 cu. in. Wagner ram is on the larger end for recreational boats, and we were surprised to learn that we had only two hydraulic reversing autopilot pumps to choose from -- the Simrad RPU300 and the Accu-Steer (Kobelt) HRP35 (sold under the Accu-Steer brand or private labeled by Furuno). From what we've read, the Simrad pump is quite loud, and some people said it sounded like copulating cats! The pump was going to be under the floorboards in the aft cabin and I'm a light sleeper so that was a deal breaker! The Accu-Steer, on the other hand, was touted as being "whisper quiet" and over-sized for our ram, so it was the clear winner. [Note: we found that searching online for Furuno HRP-35 proved significantly cheaper than searching for Accu-Steer HRP-35 even though they are the same part. The site we ordered from listed it as a Furuno pump and it was drop-shipped directly from Kobelt USA.]

Once the hydraulic pump arrived, Bill made a custom aluminum bracket to mount it under the floor boards in the aft cabin. I was thrilled with the new location since the old Wood-Freeman pump took out an entire large cabinet in the aft vanity -- more storage space freed up!

The pump is through-bolted through the bracket using four neoprene compression mounts (pillow blocks) to help dampen any vibration and make the "whisper quiet" pump even quieter. We went to a local hydraulic store for custom length hydraulic hoses with Aeroquip fittings to plumb the pump into our Wagner steering system and self-bleeding expansion/reservoir tank that Bill previously designed and installed. It was a messy job cracking open the hydraulic fluid-filled copper tubing and removing the old, clunky Wood-Freeman pump that was also full. We had to take be very careful since we didn't want to get hydraulic oil on our beloved cabin sole or screw up our tung oil finish! Once everything was apart, we took the opportunity to install a few more ball valves to help isolate the pump for any future maintenance or repairs.

Accu-Steer HRP-35 reversing hydraulic autopilot pump connected to pypilot aboard Phoenix
According to the manufacturers, the 12v HRP-35 could draw 10 amps continuous and 30 amps when the cylinder hit its end stops (hard over). To make sure that the new motor controller could easily handle the load, Sean designed our controller to handle up to 60 amps (momentarily) and built the arduino-based digital controller in an aluminum box with plenty of heat sinks. It is similar to his original motor controller in that drives the hydraulic motor while also monitoring voltage and current; however it is significantly more powerful and can handle a greater power load. We also added a temperature sensor to the hydraulic pump so we can monitor both the pump and motor controller temperatures.

Pypilot motor controller for larger boats like Phoenix
Our hydraulic pump is wired to the pypilot motor controller, which is also wired directly to the batteries (see bus bar in picture above). The white waterproof connector goes to the pypilot computer. In our case, it is a RPi Zero W with a 8 GB microSD card loaded with Sean's pypilot software, along with an AltIMU-10 v4 9-axis IMU chip in a waterproof box with a 12v power supply. We added a 30 amp inline fuse as both a circuit breaker and power supply switch.

30 amp waterproof inline fuse

Pypilot Marine Autopilot on Phoenix. The white box at top houses the computer and IMU chip, which is wired to the motor controller. A 30 amp inline fuse controls the power. The motor controller drives the hydraulic autopilot pump plumbed into a Wagner hydraulic system

Pypilot uses electric currents to determine the rudder angle, so in many cases a rudder angle indicator is optional. This is fine for a tiller or possibly cable-driven steering, but with hydraulic steering we felt the rudder angle indicator was required -- both to set appropriate end stops to prevent the ram from going hard over (possibly damaging the seals) and to offer rudder feedback information. We purchased a 12/24v rudder angle indicator sensor, which is essentially a stainless steel arm attached to a potentiometer. We also needed a pair of 6-32 ball links to attach the indicator to the rudder post.

Rudder angle sensor

The rudder angle indicator attaches to the rudder post parallel to the ram. Since our ram is particularly long, Bill had to thread a long aluminum rod to go between the indicator and rudder post. The indicator is then wired from the indicator to the pypilot computer.



With all of the hardware in place, it was time to fire up the pypilot along with our navigational computer running OpenPlotter and OpenCPN. We'll call it the NavPi. As I mentioned in our previous post, we wanted to be able to see and control the autopilot and view all of our data at the nav station as well as in the cockpit using a Windows-based touchscreen tablet.

Pypilot functions as a WiFi access point (AP), and OpenPlotter can function as either an AP or as a client. In order to accomplish our goals, we have the pypilot set up as the AP and OpenPlotter set up as the client. When both are powered on, NavPi connects to the pypilot over the wireless connection. It receives rudder feedback information and controls the autopilot. The pypilot receives the wind, GPS, and other NMEA sentences transmitted from the NavPi. We can engage or disengage the autopilot, steer via compass, GPS, or wind (true or apparent) by clicking buttons in an OpenCPN plugin or app from the nav station.

When we boot up the tablet, it also connects to the pypilot over the wireless connection. Once we open OpenCPN on the tablet, it receives depth, speed, wind, GPS, AIS, rudder angle, pitch, heel, barometric pressure, temperatures, etc. from the two RPi computers down below and can also control the autopilot.

Once fired up, we had to calibrate the IMU and the rudder indicator. When the boat is level, go to the calibration page and set the pitch/heel angle by telling the software the boat is level.

Pypilot -- calibrating pitch and heel
The compass will calibrate while the boat is moving. For initial calibration, steer the boat in a 360 to allow it to collect enough data points for calibration (for us, we had enough points backing out of our slip, then turning to point into the wind to raise the main).

Pypilot compass calibration needs to be done

Pypilot compass calibration is complete and data points are located on the sphere

We also had to calibrate the rudder indicator and set the end stops. We centered the rudder and established 0 degrees, and also the end stops to prevent the rudder from going hard over. You can also establish fail safes to turn the autopilot off if the motor gets to a certain temperature, max current, etc.

Sample screenshot of pypilot plugin in OpenCPN -- from OpenPlotter Manual.

We went on a few test sails with Sean while he was visiting to test the system and work out any bugs. Sean made a video of one of our test sails.

Sean D'Epagnier remotely steering Phoenix using his pypilot marine autopilot
Since then, we spent a considerable amount of time sailing the Chesapeake and testing the autopilot on our own. The most impressive aspect that we can report to date is how efficient the autopilot is and how little power it consumes while steering true.

In our first trip out, we ran the pypilot for nearly 3 hours and used a miserly 1.2 amp hours! By comparison, most commercial autopilots will use 6+ amps per hour.

Pypilot uses remarkably little power when sailing upwind or on a beam reach, and we can run it for 10-12 hours in GPS mode and use 6 amp hours or less.

As expected, the power consumption varies with different sailing conditions, as well as with how well your sails are trimmed. We found we used the most power to date sailing on a deep broad reach (120-150 degrees), jib and jigger with a 4' following sea. Over an 8 hour run it used 9 amp hours. As soon as the waves subsided the power consumption decreased, and neither the motor controller nor the pump showed signs of overheating.

On a similar broad reach using the main and genoa, we used 6 amp hours over a 10 hour period.

Thus far, pypilot holds course very well in GPS and compass modes. Steering to wind is not the systems strong suit, though playing with the gains and sail trim does help somewhat. Sean is continually updating the software and is very responsive to questions people may have about his system. He is also continually updating information in his his online wiki "manual".

The biggest challenge in using the pypilot to date is getting used to the variety of gain settings to maximize efficiency, which we are still learning. There are almost too many parameters to play with! But the more we play with the pypilot the more we love having our new 3rd crew member on board!

Bill kicking back and letting the pypilot autopilot do all the work!

The pypilot was particularly helpful when we were trolling while sailing on a beam reach at 7 knots and had two fish on at once! The autopilot definitely did its part in filling the fridge (and our bellies) that day!

Catching Spanish Mackerel aboard Phoenix
If you are looking for a new autopilot, or to reduce the power consumption you use while running the autopilot, I would seriously consider looking into the pypilot. It does everything a commercial autopilot can do at a small fraction of the price and energy load.

Sean is very passionate about creating open source software that people can use and customize to their specifications. We had the opportunity to see Sean build, program, and make improvements to the pypilot system while he was working on ours and were impressed with the amount of time, attention to detail, and quality control he puts into each one. Although you could certainly build a pypilot from source yourself, purchasing a system built and tested by the creator at a low cost is a bargain and made a lot of sense to us. Plus, you get to help a fellow sailor continue to make cutting edge technology for all of us to use!




7 comments:

  1. The article is much informative which i was searching for .Nice intro good explanation thanks for sharing.
    Enrgtech LTD

    ReplyDelete
  2. Congratulation for the great post. Those who come to read your Information will find lots of helpful and informative tips. Boating Navigation App

    ReplyDelete
  3. Nice article! I am thinking to renew my 20years old raymarine autopilot and will consider the pypylot open solution!

    ReplyDelete
  4. Very nice article. I'm looking to upgrade my 25yo Robertson AP200 so I (at least) have a tack function, and may be remote control ability. Very interested in this solution.

    ReplyDelete
  5. Thank you for the article. I would like you to tell more on how to connect all the electrical ends of the pypilot together, I mean the computer, the "hat", the motor controller, and finally a motor, plus all the end-stop sensors.

    ReplyDelete
  6. Very informative and useful information. Will be using PyPilot soon on a customers vessel, where we also installed our Wallis&Gill wind sensor. Cheers!

    ReplyDelete
  7. Will definitely be using PyPilot on a customer's boat soon. Cheers!

    ReplyDelete