Marine electronics

Boat Raspberry Pi: Isolated CAN Bus and 12V Safe Shutdown

Compare isolated NMEA 2000 CAN and 12 V safe-shutdown options for a boat Raspberry Pi, check sustained power limits, and verify CAN reception.

Illustrated title card for the guide: Boat Raspberry Pi: Isolated CAN Bus and 12V Safe Shutdown

For a Raspberry Pi 4 Model B you already own, pair the Hat Labs Sailor Hat v2 with the Waveshare 2-Channel Isolated CAN HAT built around the MCP2515. The Sailor Hat accepts a nominal 12 V supply. The Waveshare board handles NMEA 2000 data, and the Sailor Hat’s supercapacitors keep the Pi powered while Raspberry Pi OS shuts down with the Sailor Hat service installed. Sailor Hat setup, CAN HAT setup, Sailor Hat hardware.

Choose the hardware

What you needWhat to chooseWhat to check
Add both features to a Pi 4 Model BSailor Hat for Raspberry Pi v2 plus Waveshare 2-Channel Isolated CAN HAT (MCP2515)Allow room for the stacked boards in a waterproof enclosure. The Waveshare board provides the isolated CAN interface. Sailor Hat setup, CAN HAT setup.
Buy a complete boat computerHat Labs HALPI2 with Raspberry Pi Compute Module 5It has a dedicated E7T power input and an isolated NMEA 2000 interface with a Micro-C port. The preinstalled HaLOS image handles shutdown during a sustained loss of input power and starts the computer again when power returns. HALPI2 guide, HALPI2 interfaces, HALPI2 operation.

If you already have a Sailor Hat v1, it has its own isolated CAN interface. Use the v1 instructions for that board. Sailor Hat v1 hardware.

Skip the MacArthur HAT v1.2 if galvanic isolation is a requirement. Its NMEA 2000 circuit lacks electrical isolation. Its optional power module supports orderly shutdown of OpenPlotter in OpenMarine’s documented power configurations. MacArthur HAT v1.2 wiring.

Check the sustained power budget

At the Sailor Hat v2’s default 0.8 A input limit, the maximum sustained output is about 1.4 A. At the 2.8 A input setting, the maximum average 5 V output is at least 3 A in open air at room temperature. Account for ambient temperature in the enclosure when budgeting for sustained output. The 5 A specification is a peak. Sailor Hat power limits.

Check the interfaces and power limits

The Sailor Hat v2 has a pass-through GPIO header and a stack-through connector. Hat Labs documents compatibility with the Waveshare 2-Channel Isolated CAN HAT. Sailor Hat hardware, CAN HAT guide.

EquipmentPublished interfaces and limits
Sailor Hat v2 powerThe power input accepts a nominal 12 V supply. The board has a separate 5 V output. Applying 12 V to the 5 V output can permanently damage the Raspberry Pi and Sailor Hat. Sailor Hat setup, Sailor Hat hardware.
Waveshare CAN HATThe board exposes CAN0 and CAN1, offers a 3V3 logic setting for Raspberry Pi, and has jumper-selectable onboard termination. Hat Labs documents a single NMEA 2000 interface on this board to meet isolation requirements. CAN HAT guide.
HALPI2 NMEA 2000The Micro-C port accepts a standard NMEA 2000 drop cable. HALPI2 interfaces.

Feeding the Pi through USB-C with the Sailor Hat attached can backfeed discharged supercapacitors and damage the hardware. Hat Labs USB-C power guidance.

For hardware installation, follow the maker’s manual and local rules.

Enable shutdown and check for CAN traffic

Hat Labs documents this installer for a fresh Raspberry Pi OS installation. This command downloads the installer and runs it with sudo. In the CAN dialog, select Enable for the installed Waveshare board. Reboot when the installation finishes. Hat Labs installation procedure, Hat Labs installer prompts.

curl -L \
    https://raw.githubusercontent.com/hatlabs/SH-RPi-daemon/main/install-online.sh \
    | sudo bash
  • Shutdown. During a loss of input power, the LEDs scroll left while the supercapacitors are depleting. Two brief dark pulses with a one-second pause indicate that the daemon has started shutdown. The Pi starts again automatically when input power returns. Sailor Hat power and LED states, Sailor Hat power loss and restart.
  • CAN reception. The Sailor Hat installer’s CAN configuration specifies 250 kbit/s on can0. Once the CAN hardware is connected and configured, run candump can0 from the can-utils package. Incoming frames should scroll in the terminal when devices are sending. Press Ctrl+C to exit. Hat Labs CAN interface configuration, Signal K connection checks.

Evidence and limits. Checked on 2026-11-27 against Hat Labs’ SH-RPi v1, v2.0.0 and HALPI2 guides, OpenMarine’s MacArthur HAT v1.2 documentation, and Signal K’s connection guide. The installation and checks were not carried out for this article.

Sources

  1. Hat Labs: Sailor Hat v2 setup and software
  2. Hat Labs: Waveshare isolated CAN HAT setup
  3. Hat Labs: Sailor Hat v2 hardware and power limits
  4. Hat Labs: Sailor Hat v2 power loss and restart
  5. Hat Labs: Sailor Hat v1 hardware
  6. Hat Labs: Sailor Hat USB-C power guidance
  7. Hat Labs: Sailor Hat installer configuration prompts
  8. Hat Labs: Sailor Hat CAN interface configuration
  9. Hat Labs: HALPI2 boat computer
  10. Hat Labs: HALPI2 connections and isolation
  11. Hat Labs: HALPI2 shutdown and restart
  12. OpenMarine: MacArthur HAT v1.2 NMEA 2000 and power module
  13. Signal K: NMEA connection checks

Related