Social Icons

Pages

Showing posts with label autopilot. Show all posts
Showing posts with label autopilot. Show all posts

Saturday, 16 August 2014

Installing the Simrad SGO5 steer by wire autopilot and playing with the Sea Station


Most of my autopilot installs I just grind out. Do the plumbing and contain the oily mess. Punch holes in the dash for control displays. Add NMEA network pieces, hang black boxes, and connect a bunch of wires. At the end of the job I smell like I've showered in hydraulic fluid, and dried off with a sweat soaked rag. It's very close to the truth. This autopilot system install is different, and different is good. No plumbing, no greasy fluids, few parts and it was easy-ish. This boat also has some very new Sea Star tech I had the opportunity to play with and really liked.


This is a new center console boat with a nice factory installed Simrad system. Twin 16" NSS displays, CHIRP sonar and Halo radar. The boat is also equipped with a SeaStar Optimus 360 joystick steering system, and hence why we need a steer by wire autopilot.

To do this install we only need two major pieces. The first is the Simrad SG05 you see above. There are several flavors of this unit seen above with the primary difference being cabling and interfacing for other steer by wire systems like Volvo's EVC/IPS and others.
.
The other important part is we need a compass, and in this case it's the new Simrad Precision 9. It's simple to mount, and even easier to adjust. There is just one cable that connects it to the NMEA 2000 network.

Before we get started take a look at the diagram. The SG05 is a gateway that translates NMEA 2000 into CANbus that the Optimus system understands. NMEA in, CANbus out and vice versa. So one cable (SimNet) goes to the NMEA 2000 network, and the other (the permanently installed one) goes to the CANbus network. Don't mix these two up.

We are also using the NSS display in place of an autopilot head. This saves another hole in the dash and the cost of the autopilot stand alone control head.

It's not in the installation instructions, but is covered in a Navico service bulletin. We have to isolate the power to the Optimus system. In other words we can't let the N2K network power connect to the Optimus CANbus system. A small inline isolator takes care of this. I made sure you can read the Simrad part number for the little thingy.

The connections are very simple. The SG05 connects to the NMEA 2000 network with a SimNet to device net (regular N2K tee) cable. The permanently installed cable connects to the Optimus CANbus network. In my case I pulled a termination resistor and moved it to what will be the end of the network. The photo shows the result. Add tie wraps and the physical installation is done. My elapsed time is about four hours and it's time to set it up on the briny.

Set up is generally straight forward. You start by calibrating the compass. Look to the left at the vertical sliding menu. Click on Network, then Device list, and then Precision 9 compass. Now click Calibrate.

Like any compass set up you want low wind and fairly calm water conditions. Press Calibrate and start a turn in either direction with the goal being a full 360 rotation in about 1.5 to 2 minutes. It's not rocket science and the system will grumble at you if you're too slow or fast. Keep turning until it says it's done. My calibration only needed two turns. The Precision 9 compass was on the money when it was first installed, and retained it's correct heading after calibration. It's within a degree of a steady COG and that's as good as it gets.

The autopilot setup is a bit more nuanced. Locate on the vertical sliding menu and click on the Autopilot followed by Commissioning.

This is not the page I actually used. I lifted this screen grab from a Simrad demo boat at the NMEA conference. The software display is somewhat generic and this page is tweaked depending on the gear attached to it. In my case Sailboat was grayed out and the only two available boat types were displacement and outboard. Follow the screen instructions and fill in any blanks. Transition speed for a power boat is the lowest speed needed to maintain a comfortable plane.

Point the boat in a direction that gives you about a mile forward of maneuverability. Set the throttle to the recommended speed, press Autotune and let go of the helm. The best speed for a planing vessel is the highest speed you can go with no notable bow rise. This is around 7 or 8kts up to around 10 to 12kts tops. Bow rise will affect the tuning and make sure your seat back table is secure and trim tabs are in their fully upright position.

This is the part I like the best. In days of yore it would a tedious hour or two manually tuning the autopilot while plowing back and forth in the bay. Tweak the counter rudder and do it again, add some gain, oops not good reduce the gain. What happens now during an autotune at a very macro level is the pilot commands a turn of say 5 degrees. It uses its sensors to measure what actually happened and makes some algorithm changes to optimize. Repeat and with large and small turns and you can tell you're near the end when the boat straightens out and steers straight and it's done.

The autopilot works perfectly. Minimal cross track error and a clean dead straight wake. In fact the Optimus is doing the steering and is being told what to do by the Simrad pilot. Total time to do the install was six hours, and I could easily slash two hours off the next time I do it now that I have read all of the docs and lived the installation dream.

So is it suitable for DIY install. I think the answer is yes if you have some familiarity with NMEA and CANbus  networks. The tricky part you might need some help with is identifying the CANbus network and where to do the interface. If you're not sure then get professional help. I have seen what happens if you wire it incorrectly and it is not pretty or predictable.

This boat as you now know has a SeaStar Optimus 360 joystick steering system. It also has the new "Sea Station" option which I believe was formally introduced at the IBEX show this week while I was there. Not to step on others terminology who in turn stole it from many others this is a sky hook system. Translated, the boat has the ability to hold a stopped position with a further option to hold the position with a specific heading.

To pull this off they have dual GPS's in a housing and uses them to calculate both position and the heading without the need for a compass. The Sea Station also has a small display for set up and advising what mode the system is currently using.

It works really well but what impressed me even more is how well and gracefully the joystick steering works. I have been on many boats with joystick steering and in general they all worked well and did their job. But to be honest the shifting of the engines on most of these boats have all seemed to have a sense of violence about it. The clanking and banging and jumping of the engines makes me wince and at the same time wondering it they are using shaped charge explosives to shift the engines. Well it's not that bad, but it makes me think the transmission life will likely be shortened. The Telefex Optimus 360 is devoid of most of this. They have some secret sauce software and interfaces that hugely reduces the number of times it needs to shift the engines in the first place, and when it shifts it does it smoothly. It's the best Joystick system I have used to date and the Sea Station option functions smoothly and quietly even in fairly strong winds.

Read More..

Friday, 24 January 2014

The Arduino autopilot that Jack built


Autopilot kit for sale. Only $350, some assembly required. Jack Edwards, a mechanical, engineer, loom builder (yes as in weaving), and many other things in his professional career has built a functioning Ardunio based sail boat auto pilot system. The little Ardunios have piloted his aptly named boat the Wile E. Coyote over 400 miles this summer using both heading, and GPS track mode with cross track error correction. There are some chores left to complete such as wind instrument integration, but it's an impressive success with such a tiny capital outlay. 


Jack's boat is a 1983 Robert Perry designed 40 Nordic Yachts sloop with a vintage (1986) Wagner compass steer autopilot. So why build an Ardunio based system?

In Jack's words, "I always wanted to have an autopilot with modern capabilities and thought about building one using PC based programming but couldn't figure out how to handle the interfaces with inputs and outputs. About three years ago my son showed me an Ardunio a friend had loaned him. Wow, that was exciting and now I have it to a point where it is a working system."

Although functioning, parts of it are still packaged in a prototypical way. From small cardboard encased electronic prototype acorns, mighty oak autopilots grow. You can watch this video of Jack showing it operating and discussing it here.


The elements in Jack's autopilot, are the same as found in any autopilot. We have a computer processor. In this case he is using two Ardunio Megas. One for the GPS processing, and the second one for everything else.

There is a display to view data, and a DC motor drive system for the hydraulic pump. A nine degree of freedom IMU (Inertial Measurement Unit) with a magnetometer, gyro, and accelerometer along with a rudder position sensor.


The block diagram shows the primary components and their basic connections. The left side Ardunio has the GPS interfaced to one of its four serial ports.

The other Arduino is handling the data from the IMU, rudder reference, DC hydraulic motor drive, and the data display. The two Ardunios communicate with each other using serial data ports, and a fast software routine called "Easy Transfer".


The Ardunios are 2560 Megas. The one I purchased from Sparkfun cost me $62.10 with shipping.

Don't let the small 4" x 2" size fool you. There is considerable computing horse power in this little board. 16 analog inputs, 54 digital input and output pins, 14 of which can be used as PWM (Pulsed Width Modulated) outputs. Add to this 4 serial ports USB port, and a 16 MHz clock, all driven by an Amtel AT2560 RISC (Reduced Instruction Set Computer) processor.

The quarter sized Pololu IMU is the heading compass. It has a retail price of about $40.00. Like any digital heading compass on a boat it needs to be located about a meter away from any ferrous metals, and requires initial calibration.

Jack used a Honeywell hall effect sensor to build the rudder reference. As the rudder turns, the shaft in the sensor rotates, and the voltage changes. The voltage output varies from .5VDC to 4.5 VDC.

This voltage range covers up to ninety degrees of rudder movement (+-45 degrees). So a reading of 2.5 volts would mean the rudder is centered. The rudder sensor voltage readings are read by the analog inputs on the Ardunio. The rudder centered is at 2.5 volts.

For $18.00 you can have a data display from Adafruit. It's 20 characters wide, by 4 rows, and you can create up to 8 special symbols. This is available for a couple of dollars more in a variety of LED colors. It has PWM adjustable dimming capability, and contrast control.



Jack's boat has a Wagner heading steer only autopilot. Translated this means the autopilot will keep the bow pointed to a compass heading but can't compensate for currents, winds, or waves that are all shoving on the boat. The existing Wagner hydraulic pump on the boat, is being used in the system. The Wagner pump is a 12VDC (PV100-12-TR) and draws 11 amps. This is not unlike a Raymarine Type 1 hydraulic autopilot pump.

The difference in this system is the solenoid valve that when open allows manual steering, and when closed the pump does the steering. The pump is managed with a Pololu Qik 2s12v10 serial DC motor controller.

"Its only possible because I'm standing on the shoulders of giants." Robert Huiteme.

Jack, like Robert is also standing on the shoulders of giants. Ardunio software is open source and is licensed under Creative Commons. This means a vast array of software is available for free use with attribution. For example in Jack's software module A_GPS routine that is parsing the NMEA sentence RMC (position, speed, track) you see the line "GPS Reading based on code by Igor Gonzalez Martin. 05-04-2007." Instead of having to start from scratch, there was existing software that could be just tweaked, if needed at all to use. This is the miracle of the open source community. In the case of a marine autopilot there was a lot of existing usable code, but a good chunk Jack had to write himself.

Looking at the diagram above you will recognize a lot of the acronyms such as COG (Course Over Ground). There are a couple that your chart plotter doesn't typically show you. They are BOD (Bearing Origin to Destination) and CTS (course to steer).

BOD is a NMEA 0183 sentence that has the origin and destination waypoints, and the bearing between them to the destination. CTS is the direction you need to steer to get back on your original course line.

Rule one! Your autopilot is not allowed to just make up a new bearing to get to the waypoint. It's supposed to keep you on your original course line (BOD). CTS is not the direction the bow is pointing, but the direction you want to travel in. As an example, a sailboat may have to crab upwind to maintain the desired course.

This is done by calculating a XTE (Cross Track Error) correction factor that is added or subtracted from the existing bearing to waypoint. Using this correction a new heading can be derived to take you towards your original course. I've simplified this a lot, but this is a tricky bit of calculating software.

The system is operational. It steers by compass heading (Button 1), GPS steering to waypoint (Button 2), adjustable tack mode (button 3), and yet to be completed wind angle steer (Button 4). The system can also make incremental changes to the heading direction, has a helm data display, and control pendant. There is also gain and a form of response rate control (less pump usage). 

There are still some things not yet completed, and assorted minor software issues. Jack has Raymarine wind instruments that speak Seatalk. Rather than write a routine from scratch to parse Seatalk, I have a Raymarine Seatalk to NMEA converter lying around someplace that I'm going to send him. This will speed up development of this wind integration portion of the system.

When running a route, the vessel doesn't start the turn until you have arrived at the waypoint, and this can cause a overshoot on the next leg when turn angles are large. It corrects itself, but it would be better, if the turn started prior to waypoint arrival. There have also been some intermittent system freezes when a new route has been completed, and there are also some issues with the GPS's 1 second update speed. Some of this might be correctable with a faster 10Hz GPS. Have no doubts, that Jack is a persistent guy, and these warts will be found, and removed.

Jack has done an amazing job, and I think he is now one of the "Giants" others can stand on the shoulders of. The project continues on, and it proves it's feasible to do this with the same capabilities of mainstream commercial autopilots, at a fraction of the cost. Jack is also the only person I'm aware of who has gone this far in the development of a Ardunio based marine autopilot system. For those who are interested in pursing this type of activity, there is now a substantial library of software and hardware details  in his Dropbox site you can use to start with. I will provide the link below.

Jack is now so far along in his development his software, like all autopilot manufacturers he now has a disclaimer splash screen, and I think this speaks volumes about Jack's efforts.

"This software was developed as an experiment by the author to provide an auto pilot for his boat. It is made available to others who want to develop a Do It Yourself autopilot. The User accepts all responsibility for the safe operation of the boat recognizing that hardware and software errors can occur. The User also acknowledges that it is their responsibility to safely wire and install the autopilot components in accordance with appropriate codes and standards, and understand the system capabilities."

I now have an Ardunio Mega. I couldn't live without one after writing so much about them. It's huge fun to play with, for me at any rate. I think the first real project will be to make the "Digital Magic Eight Ball". This will give me some experience with writing to a display, and you can bet it will have some interesting prognostications. The second project is to make a sailboat wind instrument with a display for under $200 using the Peet Bros. anemometer. Robert Huiteme has written most of the code, and the balance I can figure out myself. It's good to have broad shoulders to stand on.

Jack Edwards Ardunio marine autopilot drop box link. You will also find his email link there.

The software requires Ardunio's IDE system to view. You can download it for free here. It is available for Windows, Mac OSx, and Linux 32/64 bit operating systems.

The wiring diagrams require Fritzing software to see, and it's free from here.

Product phot0s are from the Pololu and Sparkfun websites.

All other diagrams and photos are by Jack Edwards.

Read More..