Monday 29 July 2019

Magnetic Compass Errors Revisited - Wingsail Angle Sensor/Magnetic Disk

Magnetic Compass Errors Revisited - Wingsail Angle Sensor/Magnetic Disk

The Wingsail Angle Sensor incorporates a magnetic disk. Its located around 300mm from the Magnetic Compass. I thought this was a reasonable distance, but perhaps its interfering with compass.


Wingsail Angle Sensor Magnetic Disk

I set up a test to measure compass error versus wingsail angle and plotted the results.
They were bad.
The plotted results below, show that the wingsail angle is responsible for large errors of around 25 to 35 degrees  with a wingsail angle of 45 degrees.
Negative wingsail angle represents port tack.



The image below shows a successful completion of a course of waypoints, with a northerly wind
The reaching leg across the top of the course shows the vessel heading about 30 degrees to port of the desired course. It is pointing higher than necessary by about 30 degrees, due to compass error.

This is consistent with the measurements recorded in the graph above.
On the port tack the error is about +30 degrees.
Hence the vessel must reduce the heading angle by about 30 degrees to maintain the desired magnetic course.
Hence, in this case,  on the reaching leg, it is steering about 30 degrees to port.

Course Demonstrating Compass Error


Conclusions: 

It will be difficult to increase the separation between the magnetic compass and the magnetic disk on the wingsail on a vessel of this size (1.2m LOA).
It is likely that the wingsail magnetic disk is unnecessarily large and strong. So it will be necessary to test a smaller disk with a reduced number of magnets, to reduce the field strength, yet still maintain reliable operation of the wingsail angle sensor.



Note: This is part of the ongoing development of a low cost autonomous oceangoing sailing drones, utilising a self-trimming wingsail. This is the Voyager series of sailing drones.

Sunday 28 July 2019

Waterproof Steering Coupling - Magnetic Coupling

Waterproof Steering Coupling - Magnetic Coupling

A magnetic coupling is used to transmit the Steering Servo movement out of the water tight compartment to the rudder pushrod.

This has been successful.
In the correct configuration, all six magnet pairs are engaged.
It can suffer the problem that the outside disk can be forced to detent in the wrong place, one sector in either direction.
In this position, two magnet pairs are attracting and four are repelling. 
It is a semi-stable state, but it can easily be pushed back to the corrected alignment.

The pattern of magnetic orientation has an effect on behaviour, and more study is required to determine the best arrangement and quantity of the magnets.
Perhaps less magnet pairs are better, because the angle to next detent point would be greater with a reduced number of magnets.
This would need to be balanced against the reduced magnetic coupling with the reduced number of a magnets.


Lower Magnetic Coupling Disk fitted to the Rudder Servo




Complete Magnetic Coupling Assembly


Thursday 25 July 2019

Wingsail Angle Sensor

Wingsail Angle Sensor 

The vessel does not have any explicit wind sensors for measuring wind speed or wind direction.
All sailing navigation decisions rely on knowing the angle of the self-trimming wingsail against the hull.
The wingsail angle is measured using the MPU9250 IMU as a magnetic sensor, and magnetic disk attached to the wingsail.
The MPU9250 may be an overkill for a magnetic sensor, however they do have benefits:
  • I2C bus, so it easily interfaces to the Arduino microprocessor.
  • Sensitive as a magnetic sensor, allowing good separation distance to the magnetic disk
  • The MPU9250 was difficult to use as an actual magnetic compass because it was difficult calibrate and use. They are easy to use as a magnetic angle sensor however. They are not expensive and I have a few to spare.

Wingsail Angle Sensor with Wingsail Magnetic Disk

 The housing for the Wingsail angle sensor is a 3D printed shape that is integrated with the Mast Tube deck plate. 
Magnetic Sensor Housing fixed in place. 
The magnetic disk is attached to the wingsail, so that the magnetic field created by the disk rotates with the sail The disk consists of a 3D printed holder for an array of about 60 cylindrical magnets 2mm diameter, 10mm long. Its obviously important that all of the magnets have the same orientation.

3D model of the Wingsail Magnetic Disk 

Future design changes:
  •  Integrate the Magnetic Disk more tightly with the Wingsail, possibly by incorporating it with the bottom foil section.
  • Add a duplicate MPU9250 Wingsail angle sensor for redundancy. 

Note: This is part of the ongoing development of a low cost autonomous oceangoing sailing drones, utilising a self-trimming wingsail. This is the Voyager series of sailing drones.

Thursday 18 July 2019

Compass Heading Error Correction using GPS

Compass Heading Error Correction using GPS

(or GPS/Magnetic Compass Fusion)


Magnetic compass calibration is constant problem, but if we assume the GPS Course of Ground (COG) represents the actual heading of the vessel, then we can establish a difference between the two sensors, and apply a correction to the compass.
Of course, we can only assume the GPS COG is correct if we assume there is no movement of the water. That is, no tidal flow or currents.

The GPS COG is only valid when the GPS is moving. The COG provided by a stationary GPS device tends to point in all directions is has little meaning.
Hence, the COG can only be used to establish a Compass heading error if the GPS Speed of the Ground (SOG) is above a reasonable level.

The procedure below is currently in use, and forms Compass error value based on the GPS COG, when the SOG is greater than 0.2 m/s.
The resulting error is passed through a low pass filter to dampen its movement and then applied to the measured Compass Heading.


void NavigationUpdate_FastData(void)
{
 // Calculate True Heading From Magnetic Heading.
 // This is expected to be called from a fast loop .
 // about 50ms
 // V1.0 31/10/2016 John Semmens
 // V1.1 6/4/2019 added CompassOffsetAngle for handling mounting orientation
 // V1.2 11/7/2019 added Heading Error calculation and correction.


NavData.HDG_Mag = int(wrap_360(myIMU.heading + Configuration.MagnetVariation + Configuration.CompassOffsetAngle));

 // calculate and error value from the GPS and dampen it using low pass filter
 int RawHeadingError;
 if (NavData.SOG_mps > 0.2) // if the SOG is reasonable then assume the
 {
  RawHeadingError = wrap_180(NavData.HDG_Mag - NavData.COG);
 }
 else
 {
  RawHeadingError = 0;
 }

 // apply a low pass filter
 NavData.HDG_Err = HeadingErrorFilter.Filter(RawHeadingError);


 NavData.HDG = int(wrap_360(NavData.HDG_Mag - NavData.HDG_Err));

}



The GPS based compass correction has made a noticeable difference on the water.
The image below depicts the longest mission to date for the vessel. The wind is from the NNW.
The image clearly shows that the vessel has steered accurately to the waypoints on the downwind legs.
The longest course so far, incorporating GPS Based Compass Correction

The image below shows a similar, but shorter course, that was completed prior to the GPS based compass compensation.
The image shows that the vessel is steering significantly to the left as it approaches each waypoint that it can sail to without tacking.
A previous course successfully completed, without GPS compensation for the Compass 


And of course a photo from today's sailing...

Note: This is part of the ongoing development of a low cost autonomous oceangoing sailing drones, utilising a self-trimming wingsail. This is the Voyager series of sailing drones.

Sunday 14 July 2019

Wingsail in Strong Winds - Photos

Strong Wind, Flat Water Sailing - Photos 

These are just some photos from testing today in gusty winds up to about 20 knots.

Consideration will be given to using an average roll angle (heel angle) as a control over the Wingsail Trim Tab angle as a means to de-power the sail in strong winds, in future updates.

Beating off a lee shore



Laid flat by a bullet


Well behaved while beating with a constant wind direction

This sailing trial included the new Wingsail Bluetooth controller built using the dedicated PCB. The new Bluetooth controller behaved well.


This is part of the ongoing development of a low cost autonomous oceangoing sailing drones, utilising a self-trimming wingsail. This is the Voyager series of sailing drones.

New PCB for Bluetooth Sail Controller

New PCB for Bluetooth Sail Controller


The sailing trials continue in fresh water, but the aim is to put to sea.
The electronic systems need a lot of hardening to survive a saltwater environment.

One step in the process is the development of a dedicated PCB for the Wingsail controller.
The new PCB incorporates:
  •  On-board ATMega328p with the Arduino Pro Mini bootloader, rather than a separate Arduino module.
  •  Support for a Dual Servo Outputs, although only one is populated.
  • Support for switching an auxiliary 5Vdc load. I'm thinking of an LED Strobe or lights to aid night time operations.
  • Solar Charging circuitry using the LTC3105, also currently not populated.
The justification for adding solar charging to the Wingsail Controller is not great.
Testing suggests that the Wingsail Controller cells can operate for about 8 days on a single charge. The current Voyager Controller for can only operate for a couple of days in the current configuration. There will be more discussion on that in future posts as efforts are made to improve battery life, prior to engaging solar charging for the vessel.

The competed PCB operated faultlessly There were no errors in the PCB design, which is what is was worried about of course. For some reason, the Arduino takes an extra second or two to boot up when compared the prototype design using the Arduino Pro Mini module. It doesn't really matter, but I'd like to understand the reason, when I have time to investigate.

The competed PCB was sprayed with about a dozen coats of Conformal Coating to provide some protection from the environment.


 The new production Bluetooth Sail Controller PCB with conformal coating and mounted ready for installation in the wingsail.

































Note: This is part of the ongoing development of a low cost autonomous oceangoing sailing drones, utilising a self-trimming wingsail. This is the Voyager series of sailing drones.