```html Cheapest Linux Autopilot for Yamaha HARMO (NMEA 2000)

Linux Autopilot for Yamaha HARMO

Target: NMEA 2000 Control via Existing Linux Box + Starlink (Remote Managed)

💰 Total Cost: ~$55-$85 USD

This is the cheapest reliable setup that protects your marine electronics from ground loops and electrical noise.

Overview

Your Yamaha HARMO speaks NMEA 2000 (CAN bus). To control it from Linux autopilot software (PyPilot/OpenCPN), you need:

  1. A USB-CAN adapter with galvanic isolation (protects against marina galvanic corrosion)
  2. SignalK as the NMEA 2000 translation layer
  3. PyPilot or OpenCPN for autopilot logic
  4. Standard NMEA 2000 Micro-C cabling
⚠️ Critical Note on HARMO Compatibility:
Verify that your HARMO accepts standard NMEA 2000 autopilot command PGNs (specifically PGN 127237 Heading/Track Control and PGN 126208 Thruster Control). Most modern Yamaha marine equipment follows NMEA 2000 standards, but if HARMO uses proprietary Yamaha Command Link Plus protocol, you may need a Yamaha YDHC-20N gateway (~$400) instead of this cheap solution. Test with the CAN adapter first.

Required Hardware

Item Model Recommendation Price Why This One
USB-CAN Interface CANable Pro (CandleLight firmware) or Waveshare USB-CAN-FD $35-$45 Galvanic isolation (essentially required for boats), SocketCAN native Linux support, no proprietary drivers
NMEA 2000 Connector Micro-C Male Tee + 2m Drop Cable (Generic marine brand) $15-$25 T-piece to tap into your NMEA 2000 backbone
Termination Resistor 120Ω Micro-C Terminator (if not present on backbone) $8-$12 Required at each end of NMEA 2000 bus
Optional: IMU Sensor MPU-9250 or WT901B (USB) $15-$30 For PyPilot heading data if HARMO doesn't provide compass
🔴 Do NOT use: Cheap MCP2515 modules without isolation on a boat. They will eventually fail from galvanic corrosion or fry your laptop USB port when dock power differs from boat ground.

Software Stack

All free and open source:

Installation Steps

1. Connect the Hardware

# Wiring Diagram:
HARMO Motor Controller (NMEA 2000)
    |
    | [Backbone cable]
    |
   T-Piece (Micro-C)
    |
    |-- Drop Cable --> CANable Pro (USB) --> Your Linux Box
    |
   Terminator (120Ω)

2. Install CAN Interface (Linux)

The CANable Pro uses the gs_usb driver (built into modern kernels):

# Verify device detection
dmesg | grep -i can
# Should show: "gs_usb ... registered"

# Setup CAN interface (add to /etc/network/interfaces or systemd)
sudo ip link set can0 up type can bitrate 250000
sudo ifconfig can0 up

3. Install SignalK

# One-line installer
curl -sL https://raw.githubusercontent.com/SignalK/signalk-server/master/install_docker.sh | bash

# Or native install (Debian/Ubuntu):
wget https://raw.githubusercontent.com/SignalK/signalk-server/master/install.sh
chmod +x install.sh
./install.sh

4. Configure SignalK for NMEA 2000

  1. Open SignalK admin (http://boat-local-ip:3000)
  2. Go to Server > Plugin Config
  3. Enable canboat or canbus plugin
  4. Set interface to can0 (or your interface name)
  5. Enable Automatic Device Discovery

SignalK will now decode HARMO engine PGNs (RPM, voltage, temperature) and expose them as JSON.

5. Setup Autopilot Software

Option A: PyPilot (Recommended for heading hold)

# Install PyPilot
git clone https://github.com/pypilot/pypilot
cd pypilot && sudo python3 setup.py install

# Run with NMEA 2000 support
pypilot --slave  # Waits for commands from SignalK

Configure the PyPilot SignalK plugin to read heading from HARMO (if it has a compass) or from your IMU, and output rudder commands back to SignalK.

Option B: OpenCPN (Recommended for route following)

# Install OpenCPN
sudo apt install opencpn

# Install plugin: "Autopilot Route" or "NMEA 2000"
# Connect OpenCPN to SignalK via TCP localhost:3000

6. Command Translation (The Magic)

PyPilot/OpenCPN output NMEA 0183 sentences. SignalK converts these to NMEA 2000 PGNs the HARMO understands:

Remote Management (Your Setup)

Since you have Starlink + reverse SSH to a fixed IP:

# On your boat computer, ensure SignalK web interface is tunneled:
ssh -R 3001:localhost:3000 your-server-ip

# Now from anywhere:
http://your-server-ip:3001  # Access SignalK remotely

Troubleshooting HARMO Specifically

If HARMO doesn't respond to autopilot commands:

  1. Use candump can0 to verify HARMO is emitting PGNs (look for 0x09F801 engine data)
  2. Check if HARMO requires address claim (SignalK does this automatically)
  3. Yamaha may use proprietary PGNs (130000+ range). If so, you must capture these with candump and write a custom SignalK plugin to translate them.

Total Cost Breakdown

CANable Pro Interface$38
NMEA 2000 Cabling (T + Drop)$20
Terminator (if needed)$10
MPU9250 USB IMU (optional)$15
Grand Total $68 - $83

Next Steps

  1. Buy the CANable Pro first and verify you can see HARMO PGNs on the bus
  2. Install SignalK and confirm engine data appears in the web dashboard
  3. Test manual NMEA 2000 command injection to see if HARMO responds to steering commands
  4. Only then install PyPilot/OpenCPN for autopilot logic

Note: This setup assumes HARMO follows NMEA 2000 autopilot standards. If Yamaha requires proprietary Command Link Plus protocol, the cheapest solution becomes a Yacht Devices YDHC-20N gateway (~$400) instead of the CANable. Test with the $40 CANable first.

```