6th September 2025. Chiapas Marina, Puerto Madero.
So it’s early September 2025, I’m coming to the end of my tenth year, of mostly living aboard Sister Midnight. I have to say she’s lasted well, but ten years is a long time for things to survive in the marine environment, excluding me, I’m still loving it. But many boat bits I still think of, as having just been bought, like the dinghy, or the AIS unit, the standing rigging or the safety gear, are all looking a bit tired.
I have just a few more days here, then I fly back to the UK to sit out the end of the hurricane season, visit family and friends and make a short trip to Milan to visit Kathy’s family there. When I return it’s full steam ahead, in a generally northerly direction to escape some of this heat and prepare the boat for Kathy’s arrival to have another joyous Christmas onboard.
But before I can go anywhere, there’s the small matter of the autopilot (Captain Mainwaring) not working. It’s not possible for me to make any passages of more than a few hours without it. Hand steering is very tiring, and on my own, its just not possible, especially if an overnight passage was required. If there’s wind, and I can sail, the monitor wind steering (uncle Arthur) would work great, but that’s never a guarantee. So I must find the problem.

At first inspection it was apparent that the fluxgate compass was not outputting the correct bearing, it was stuck on 225 degrees. I had never been able to find where the compass was located on the boat before, but did find it under the v-berth, hidden under the drawers there. I unscrewed it and moved it around and the compass display still showed 225, I remade all the connections, and kicked it around a bit but still 225. Suddenly at one point it started working and I could see the output of the compass change as I moved it and the display changed to match. Then just as suddenly it stopped working and never worked again.
This seemed to clinch it to me, so I started to investigate purchasing a replacement.

They stopped making this model a long time ago, and people wanted $300 for a secondhand one on eBay. I made an offer of $50 to one seller and was rebuffed. I can’t see anyone actually buying at that price. Raymarine want about £1000 for their current basic model which wouldn’t work anyway, I need a sin/cos output and most stuff is digital now.

The above boat is just waiting for a new owner to give it some TLC, it’s a real pirate boat and if I was half my age I’d be making enquiries.
So after a lot of lateral thinking, I remembered I had always planned to build my own autopilot, I had met a couple of engineers on my travels who did just that. It should be a lot of fun, apparently it’s a classic math/computing problem and there is a recognised algorithm to use to apply the course changes to the correction outputs. However I think the bulk of my existing autopilot is working, it tried very hard to keep to keep me on course, and would be fine if I only ever wanted to steer 225 (obviously it’s more complicated than that).
But replacing the fluxgate with my own design would be step 1 on this project.
I had brought a big bag of microprocessors and sensors with me to play with should I get bored.

One of the sensors was a decent compass module.

I think I bought this a while ago with this project in mind and had forgotten I had it. So I had a chat with Fosbot, my AI friend, told it which parts I had and what would make a replacement fluxgate compass, and as if it did this for a living, it produced a range of options and recommendations for a solution. I chose to go with a Raspberry pico W microcontroller and the cmps12 module and AI generated the circuit diagrams, and software for the project. The only thing I didn’t have was a dual channel DAC (Digital to Analog) converter, to convert the digital compass bearing into a voltage for the autopilot controller.
I couldn’t source this chip in Mexico, so I ordered two single channel chips on amazon.mx which AI said would work fine. They would take a week to get here.

Connecting the compass to the micro allowed me to test the software, the micro also streams the bearing over wifi as a NMEA signal, so I can display that on other devices and use it to get the true wind direction when I’m stationary.


Finally the DAC chips arrived, they came as small modules which made the wiring up simple

MCP4775 DAC

I put all the bits together into a box and fired it up.
It drove the autopilot just fine, and behaved exactly as the fluxgate did when it briefly worked. Things looked good. A trip out was required to test the system.
I had Ronnie, one of the workers here, dive on the boat and give it a really good clean, he told me the propellor was just a globe of growth, which makes me think the previous cleaning missed it and that would explain my speed issues.
Carlotta and Mehdi came along, their boat has been on the hard for nearly a year since they sailed over a whale and ripped their keel away from the hull. They had forgotten what sailing is like and were delighted to be bobbing around on the waves again.

We headed out, and the autopilot worked great, on a course of 270, which is the heading west to leave the harbour. Sadly that was the only bearing it seemed reliable on, and couldn’t hold course on other bearings. I was somewhat gutted by this, and what’s worse didnt take some measurements that would have helped me diagnose the problem.

Back in port I had to work out what might be wrong. The dual channel chip I should have used arrived from the states, I had ordered it as a backup, this allowed me to use a reference voltage from the main controller and make sure both DACs worked in sync, I also hadn’t put any damping on the compass readings, so I introduced a Low Pass filter, basically averaging the last ten readings, which happens every tenth of a second to give me a smoother reading.

Here I plotted the raw and smoothed outputs from me trying to simulate being at sea by shaking and turning the compass in a rolly force 6 kind of way.
There’s just a chance the software running in the Autopilot doesn’t like too many changes coming in.
All in all I haven’t found a great problem with the old system, but I need to go back out to sea with the MK2 version. I will also be able to collect more diagnostics this time if it doesn’t work.
On other matters:

There’s lots of varnishing and de-moulding to be done.

And just like that !!!



I try to get out on the Kayak most nights, it’s such a peaceful place, and the wildlife is wonderful, this tree is home to a load of small white birds that look like baby Storks or maybe Herons.

I feel like someone ought to have a chat with this boat’s skipper, I’m sure they selected the wrong icon at the transfer shop.


This guy hangs out by the shower block at night, he’s massive, I think it’s a Cane Toad

Meet Liliana who runs the swimming pool bar, with her new puppy. Carlotta rescued a street dog heavily pregnant and now has zillions of puppies she’s trying to home.
Monday 8th September.
Just 4 days before I fly to Mexico so I took the boat out this morning to check out Compass MK2.
Jake and Grace fro Mya, the boat on the other side of the finger joined me. They haven’t been out to sea in many long months since they arrived here with their broken engine. Soon they will head back to Colorado where they plan to buy some lumber and build a couple of houses, with the profits, they plan to return to the oceans with a bigger boat.

I turned the compass on, and besides it struggling to log onto my wifi network, it started to drive the auto pilot quite well. we headed out to sea, all going well, then set a course to the west, after 5 minutes it lost the plot again. I fixed the wifi issue by rebooting my mikroTik router, then capturing the debug information from the compass. Back on auto pilot things were good for 5 minutes then it went off course, looking at the magnetic compass at the helm, I could see we were turning to starboard, and the course was increasing 220,225,230 etc, but my lovely CMPS12 module was saying 210,205,200 etc, i.e. decreasing, as if we were turning to port. I felt like shouting at the compass, “You had one Job, just one job and you screwed it up”.
This behaviour from the compass would explain the problems I’ve been having. There’s very little I can do about this, so I need to investigate more. The compass should have already been calibrated, but no amount of being out of calibration could cause it to work backwards could it? I have some research to do there.

I decided to do a couple of loops of 360 degrees that would re-calibrate the compass. I did one clockwise, then one anti-clockwise. Possible two clockwise might have been better.

This seemed to make a difference in as much as the compass behaved well after this and the boat kept it course pretty well.

You can see the lines on the left are all fairly straight and that was without any intervention.
So we headed back to the dock and tied up. I’m going to do some research, and possibly build a second compass while back in Liverpool with a different sensor module.
Now it’s time to start packing up the boat. There’s a hurricane brewing just south of me and it has me wondering if I should take the headsails down or not. If I take them down, then you can bet this will be the calmest hurricane season here ever. So perhaps I should, just to be neighbourly.
I have a day to kill in Mexico City on Thursday, so I need to do some research on where to visit. I fly back to Manchester on Friday via Atlanta, that should be fun.
Paul Collister
8th September 2025