MAVLINKHUD

Overview

The LEAK parameter group configures the Leak Detection system for ArduSub (ROVs).

Water ingress is the primary failure mode for underwater vehicles. This system monitors up to 3 physical leak sensors and triggers a failsafe alert (and optionally an autonomous surfacing maneuver) if water is detected.

Key Concepts

1. Sensor Logic

  • LEAKn_TYPE: 1=Digital (Pin high/low).
  • LEAKn_LOGIC: Defines if "Wet" is High (3.3V) or Low (0V).
  • LEAKn_PIN: The GPIO pin on the flight controller connected to the sensor.

Integration Guide

  1. Hardware: Place leak probes at the lowest point of the electronics enclosure.
  2. Config: Set the pin and logic based on your sensor (e.g., BlueRobotics SOS probe).
  3. Failsafe: Configure the GCS to alert the pilot immediately on a leak trigger.

Developer Notes

  • Library: libraries/AP_LeakDetector.
  • Context: Only relevant for ArduSub.

LEAK1_LOGIC

Default 0
Range 0 1

Leak Sensor Logic (LEAK1_LOGIC)

Description

LEAK1_LOGIC calibrates the autopilot for your specific leak sensor hardware.

  • 0: Low when dry (Default). The sensor reports a logical 0 when no water is present.
  • 1: High when dry. The sensor reports a logical 1 when dry.

Tuning & Behavior

  • Calibration: If your GCS reports a "LEAK" error even when the ROV is completely dry, try toggling this parameter.
  • Safety: Always test your leak sensor manually (e.g. by bridging the contacts with a damp cloth) before diving to ensure the autopilot correctly detects the alarm state.

LEAK1_PIN

Default -1
Range -1 103

Leak Detector Pin (LEAK1_PIN)

Description

LEAK1_PIN sets the physical pin on the flight controller where the leak sensor's signal is connected.

  • -1: Not used.
  • 0-9: Analog Pin Number.
  • 50-55: AUX Out Pins.

Tuning & Behavior

  • Default: -1.
  • Action: Ensure the pin matches your hardware wiring.

LEAK1_TYPE

Default 0
Range 0 1

Leak Detector Type (LEAK1_TYPE)

Description

LEAK1_TYPE enables the first leak detection sensor. This is a critical safety feature for ROVs (ArduSub) and boats to detect water ingress before it causes a short circuit or catastrophic failure.

  • 0: Disabled.
  • 1: Analog. For sensors that output a varying voltage (common for simple resistive probes).
  • 2: Digital. For sensors that output a simple HIGH/LOW signal.

Tuning & Behavior

  • Reboot Required: Yes.
  • Integration: Once enabled, you must also set the physical pin number using LEAK1_PIN.
  • Safety: When a leak is detected, ArduPilot will trigger a GCS warning and can be configured to perform a failsafe action (like surfacing or stopping).

LEAK2_LOGIC

Default 0
Range null

Default reading of leak detector when dry

Note: This parameter functions identically to LEAK1_LOGIC.

LEAK2_PIN

Default -1
Range null

Pin that leak detector is connected to

Note: This parameter functions identically to LEAK1_PIN.

LEAK2_TYPE

Default DISABLED
Range null

Leak detector pin type (analog/digital)

Note: This parameter functions identically to LEAK1_TYPE.

LEAK3_LOGIC

Default 0
Range null

Default reading of leak detector when dry

Note: This parameter functions identically to LEAK1_LOGIC.

LEAK3_PIN

Default -1
Range null

Pin that leak detector is connected to

Note: This parameter functions identically to LEAK1_PIN.

LEAK3_TYPE

Default DISABLED
Range null

Leak detector pin type (analog/digital)

Note: This parameter functions identically to LEAK1_TYPE.