Jump to content

Boat Automation and Monitoring

From Media for Unladen Swallow
Revision as of 00:22, 12 September 2026 by Hutchinsel (talk | contribs) (Publish full Automation page over the old stub, with diagrams and Colin-confirm placeholders)

Part of the Refit - 2025/ 2026 series. Draft — Lee to review. Describes the system as it runs today (v1.0) and where it's headed (CAMS v2.0). Keep the register-level detail off this page; that lives in the engineering wiki on deepthought.

Most sailboats carry a chartplotter, an autopilot, a depth sounder and a bilge alarm, and none of them talk to each other. We wanted the opposite: a boat where the sensors, the power system, the alarms and the logging are one integrated environment, and where the boat can make a few decisions on its own — turn the water heater on when there's spare solar, sound an alarm before a bilge pump has been running too long, keep a per-cell history of every battery.

The hardware

  • A Windows ship's PC and a Raspberry Pi 5 at the nav station, both fed from the boat's data networks
  • The NMEA 2000 backbone — the modern instrument bus (engine, GPS, autopilot, wind, depth, AIS targets, Victron power data)
  • The older NMEA 0183 bus that the AIS transceiver speaks, bridged into the rest in software rather than with the two hardware boxes the previous boat needed
  • The Victron Cerbo GX, which gateways the whole power system
  • A Waveshare 8-channel Modbus relay module for physical alarm and control outputs
  • Eight RuuviTag wireless sensors — salon, berth, engine room, helm, both freezers, the fridge, and the Engel
  • The batteries' second data bus, tapped for per-cell logging (see Electrical)
The Raspberry Pi 5 with the RS485 CAN HAT — the physical hub for the N2K and Modbus sides.
RS485/Modbus architecture: the always-on 5 VDC chain feeding the Waveshare RS485 and relay modules, and where the alarm panel and Wakespeed regulator sit on it.

The master alarm panel

A 21-position panel at the helm, fed three ways:

  • directly from float switches and sensors — bow, salon and engine-room high water; engine-room heat and smoke; fire-extinguisher discharge; water-in-fuel; the dinghy-theft loop
  • from the NMEA 2000 network via the Cerbo and the Yacht Devices peripherals — autopilot faults, AIS status, anchor drag, inverter and charger alarms, refrigeration over-temp
  • from a bank of more than twenty discrete relays and the Waveshare module

Each primary bilge pump is watched for cycle rate and run time — if it cycles more than six times in a minute, or runs for more than sixty seconds, it alarms. The panel has a loud buzzer (we tested it by accident the first time we powered it up — two circuits were wired backwards — and yes, it is loud).

The master alarm panel layout — 21 positions, numbered terminal map.
The full v1.0 alarm topology: sensors and float switches through the relays and Modbus modules to the panel and the N2K/RS485 side.

The relays

Over twenty relays that do more than switch loads on and off. A few examples:

  • turn the 110 VAC water heater on from a 24 VDC automation signal — but only when the batteries are full and there's still solar coming in, with a manual override for when a motor is running anyway
  • trigger the generator's ignition power from generator RPM
  • the "OK to discharge" permissives for the starter-battery DC-DC chargers and the Battery Protect, so the house bank sheds those loads before it gets too low
  • raw-water-flow shutdowns for the engines

What's logged

Position, course and speed; wind and depth; engine and generator parameters; tank levels; battery bank and per-cell data; solar production; the RuuviTag temperatures; every alarm event; and a virtual logbook of failures, maintenance and observations. The data is stored on the Pi and surfaced through a set of dashboards.

The RuuviTag / refrigeration sensor map — both freezers, the fridge, the Engel, and the engine compartment.

Collaboration note: the automation stack on the Raspberry Pi (which we call deepthought) was built with Colin Bitterfield, who maintains the engineering side of it. Its detailed documentation lives on a separate wiki on the boat's own network.

CAMS v2.0 — where this is going

The system above is v1.0 — it alarms, it logs, and it does a handful of automated actions. The next build, CAMS v2.0, adds direct hardware sensing and safety automation:

  • two Waveshare digital-input modules so the safety loops (bilge floats, raw-water flow switches, engine-room smoke and heat, the Fire-Ext discharge, the dinghy-theft loop) come straight into the automation engine rather than only through the alarm panel
  • a custom automation engine that can act on multiple variables at once — for example, arm the raw-water-flow watchdog only when the engine is actually running, then shut the engine down on a confirmed loss of cooling flow
  • automated engine-room containment on a fire signal — kill both motors and the blowers to starve the fire of air
  • a software watchdog ("dead-man") relay that sounds a hardwired backup buzzer if the automation software ever stops responding
  • tighter integration with the boat's cameras and the maintenance-tracking system

This is Lee's design and it's a work in progress.

Still open (September 2026)

  • Final configuration of the last 2 relays
  • CAMS v2.0 hardware (digital-input modules) and engine
  • Autopilot + rudder-position-indicator calibration (needs sea time)
  • Confirm with Colin: which process drives the relay module, and how the cameras are recorded (see Systems_Cross-Check)

Diagrams attached above (from Electrical Layout - projected.pptx): v1.0 master-alarm topology, the RuuviTag/refrigeration map, the Raspberry Pi RS485 architecture. Still to attach: CAMS v2.0 architecture, from Alarm v2.0.docx (not yet exported — it's a document, not a slide deck).