Jump to content

Boat Automation and Monitoring: Difference between revisions

From Media for Unladen Swallow
Publish full Automation page over the old stub, with diagrams and Colin-confirm placeholders
Add master-alarm-panel and relay reference tables from Electrical Circuits2.xlsx
Line 19: Line 19:
== The master alarm panel ==
== The master alarm panel ==


A 21-position panel at the helm, fed three ways:
A 21-position panel at the helm, fed three ways: directly from float switches and sensors, from the NMEA 2000 network via the Cerbo and the Yacht Devices peripherals, and from a bank of more than twenty discrete relays and the Waveshare module.


* 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
{| class="wikitable"
* 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
! Position !! Function !! Source
* from a bank of more than twenty discrete relays and the Waveshare module
|-
| AL-1 || Engine bilge pump || Relay (YD RTI)
|-
| AL-2 || High water — bow || Float switch
|-
| AL-3 || Salon bilge pump || Relay (YD RTI)
|-
| AL-4 || High water — salon || Float switch
|-
| AL-5 || Fresh water pump || Relay (YD RTI)
|-
| AL-6 || Main engine raw-water flow || Flow detector
|-
| AL-7 || Generator raw-water flow || Flow detector
|-
| AL-8 || Dinghy theft || Cockpit/helm arm-disarm loop
|-
| AL-9 || Bow bilge pump || Relay (YD RTI)
|-
| AL-10 || Autopilot CCU error || Relay
|-
| AL-11 || AIS || Relay (Signal K)
|-
| AL-12 || Anchor drag || Nav station
|-
| AL-13 || (spare) ||
|-
| AL-14 || MultiPlus alarm relay || Relay
|-
| AL-15 || Battery Protect alarm || Relay
|-
| AL-16 || Cerbo GX master alarm || Relay
|-
| AL-17 || Refrigeration over-temp || Relay (Cerbo/Ruuvi)
|-
| AL-18 || Water in fuel || Racor sensor
|-
| AL-19 || Engine room fire (heat) || Heat sensor
|-
| AL-20 || Engine room smoke || Relay
|-
| AL-21 || Balmar/Wakespeed alarm || Relay
|}
 
Plus dedicated feeds for main engine and generator ignition power, ground, and the always-on 24 V supply. About a third of the 21 positions were still pending final function-test as of the September break (mostly the flow-detector and alarm-relay positions) — see the box at the bottom.


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).
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).
Line 32: Line 76:
== The relays ==
== The relays ==


Over twenty relays that do more than switch loads on and off. A few examples:
Over twenty relays that do more than switch loads on and off — a relay closing a ground given a positive input, or turning the 110 VAC water heater on from a 24 VDC signal.
 
{| class="wikitable"
! ID !! Purpose !! Trigger
|-
| R1 || AIS alarm || Signal K (AIS status)
|-
| R2 || Wakespeed/alternator alarm || Signal K (Wakespeed via Cerbo)
|-
| R3 || (spare) ||
|-
| R4 || Water heater on || Signal K — batteries full + solar available
|-
| R5 || Generator ignition-power trigger || Signal K (generator RPM)
|-
| R6 || Generator shutdown — raw water || ''not yet wired''
|-
| R7 || "OK to discharge" 1 — starter-battery DC-DC chargers || Signal K (battery voltage)
|-
| R8 || "OK to discharge" 2 — Battery Protect || Signal K (battery voltage)
|-
| R9 || Generator ignition power (patch-panel side of R5) || R5
|-
| R10 || Main engine ignition power || Engine ignition feed
|-
| R11 || Engine-room smoke detector || Smoke detector
|-
| R12 || Fire-extinguisher discharge indicator || Fire-ext relay
|-
| R13 || Water heater 110 VAC switching || R6 + panel override switch
|-
| R19 || MultiPlus master alarm || MultiPlus error
|-
| R20 || Cerbo GX master alarm || Cerbo GX
|-
| R21 || Temperature alarm (refrigeration) || Cerbo GX / RuuviTag
|-
| R22 || Battery Protect alarm || Battery Protect
|-
| R23 || Dinghy-theft disarm || Helm arm/disarm switch
|-
| R24 || Autopilot alarm || Autopilot CCU
|-
| R25–R28 || Bilge/fresh-water pump alarms (E/R, salon, fresh water, bow) || Yacht Devices RTI
|}


* 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
R14–R18 (the three MPPTs and two MultiPlus positions) are reserved but not yet used. As of the September break several of these — R6, R7, R8, and the alarm-relay group R19/R22/R24 — were still open: either not wired yet or wired but not function-tested. The automated actions worth calling out: the water heater only fires when the batteries are full and there's still solar coming in (with a manual override for when a motor is running anyway), and the generator gets its ignition-power trigger straight from its own RPM signal.
* 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 ==
== What's logged ==
Line 61: Line 146:
<div style="border-left:4px solid #c9a227;padding:0.4em 1em;background:#fdf6e3">
<div style="border-left:4px solid #c9a227;padding:0.4em 1em;background:#fdf6e3">
'''Still open (September 2026)'''
'''Still open (September 2026)'''
* Final configuration of the last 2 relays
* Generator raw-water shutdown (R6) and the two "OK to discharge" permissives (R7/R8) not yet wired
* Several alarm relays wired but not function-tested: MultiPlus alarm (R19), Battery Protect alarm (R22), autopilot alarm (R24), plus the two engine raw-water-flow panel positions (AL-6/AL-7) and a handful of others on the panel table above
* CAMS v2.0 hardware (digital-input modules) and engine
* CAMS v2.0 hardware (digital-input modules) and engine
* Autopilot + rudder-position-indicator calibration (needs sea time)
* Autopilot + rudder-position-indicator calibration (needs sea time)

Revision as of 00:37, 12 September 2026

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, from the NMEA 2000 network via the Cerbo and the Yacht Devices peripherals, and from a bank of more than twenty discrete relays and the Waveshare module.

Position Function Source
AL-1 Engine bilge pump Relay (YD RTI)
AL-2 High water — bow Float switch
AL-3 Salon bilge pump Relay (YD RTI)
AL-4 High water — salon Float switch
AL-5 Fresh water pump Relay (YD RTI)
AL-6 Main engine raw-water flow Flow detector
AL-7 Generator raw-water flow Flow detector
AL-8 Dinghy theft Cockpit/helm arm-disarm loop
AL-9 Bow bilge pump Relay (YD RTI)
AL-10 Autopilot CCU error Relay
AL-11 AIS Relay (Signal K)
AL-12 Anchor drag Nav station
AL-13 (spare)
AL-14 MultiPlus alarm relay Relay
AL-15 Battery Protect alarm Relay
AL-16 Cerbo GX master alarm Relay
AL-17 Refrigeration over-temp Relay (Cerbo/Ruuvi)
AL-18 Water in fuel Racor sensor
AL-19 Engine room fire (heat) Heat sensor
AL-20 Engine room smoke Relay
AL-21 Balmar/Wakespeed alarm Relay

Plus dedicated feeds for main engine and generator ignition power, ground, and the always-on 24 V supply. About a third of the 21 positions were still pending final function-test as of the September break (mostly the flow-detector and alarm-relay positions) — see the box at the bottom.

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 relay closing a ground given a positive input, or turning the 110 VAC water heater on from a 24 VDC signal.

ID Purpose Trigger
R1 AIS alarm Signal K (AIS status)
R2 Wakespeed/alternator alarm Signal K (Wakespeed via Cerbo)
R3 (spare)
R4 Water heater on Signal K — batteries full + solar available
R5 Generator ignition-power trigger Signal K (generator RPM)
R6 Generator shutdown — raw water not yet wired
R7 "OK to discharge" 1 — starter-battery DC-DC chargers Signal K (battery voltage)
R8 "OK to discharge" 2 — Battery Protect Signal K (battery voltage)
R9 Generator ignition power (patch-panel side of R5) R5
R10 Main engine ignition power Engine ignition feed
R11 Engine-room smoke detector Smoke detector
R12 Fire-extinguisher discharge indicator Fire-ext relay
R13 Water heater 110 VAC switching R6 + panel override switch
R19 MultiPlus master alarm MultiPlus error
R20 Cerbo GX master alarm Cerbo GX
R21 Temperature alarm (refrigeration) Cerbo GX / RuuviTag
R22 Battery Protect alarm Battery Protect
R23 Dinghy-theft disarm Helm arm/disarm switch
R24 Autopilot alarm Autopilot CCU
R25–R28 Bilge/fresh-water pump alarms (E/R, salon, fresh water, bow) Yacht Devices RTI

R14–R18 (the three MPPTs and two MultiPlus positions) are reserved but not yet used. As of the September break several of these — R6, R7, R8, and the alarm-relay group R19/R22/R24 — were still open: either not wired yet or wired but not function-tested. The automated actions worth calling out: the water heater only fires when the batteries are full and there's still solar coming in (with a manual override for when a motor is running anyway), and the generator gets its ignition-power trigger straight from its own RPM signal.

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)

  • Generator raw-water shutdown (R6) and the two "OK to discharge" permissives (R7/R8) not yet wired
  • Several alarm relays wired but not function-tested: MultiPlus alarm (R19), Battery Protect alarm (R22), autopilot alarm (R24), plus the two engine raw-water-flow panel positions (AL-6/AL-7) and a handful of others on the panel table above
  • 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).