MAVLINKHUD

Overview

The ICE parameter group configures the management of Internal Combustion Engines (Gas/Nitro). This library automates the starting sequence, idle control, and health monitoring of liquid-fueled engines.

In ArduPilot, an engine is managed via a dedicated "Starter" output and an "Ignition/Throttle" output.

Key Concepts

1. Automated Starting

The autopilot can manage the electric starter motor to crank the engine until a sustained RPM is detected.

  • ICE_STARTER_TIME: How long to run the starter motor per attempt.
  • ICE_STRT_MX_RTRY: Number of attempts before giving up.
  • ICE_START_PCT: Throttle percentage applied during cranking.

2. Idle Management

Once started, the engine must maintain an "Idle" state without stalling.

  • ICE_IDLE_RPM: The target RPM for idling on the ground.
  • ICE_IDLE_PCT: The baseline throttle percentage to maintain idle.

3. RPM Monitoring

Requires an RPM sensor (Hall Effect or Optical) to be configured.

  • ICE_RPM_CHAN: Maps which RPM sensor instance (1 or 2) corresponds to the engine.

Parameter Breakdown

  • ICE_ENABLE: Master switch.
  • ICE_START_DELAY: Delay between enabling ignition and cranking the starter.
  • ICE_REDLINE_RPM: Maximum safe RPM (used for warnings/governor).

Integration Guide

  1. Outputs: Map a servo to Ignition (Function 67) and Starter (Function 68).
  2. Sensors: Ensure RPM_TYPE is set and providing a valid signal.
  3. Tuning: Adjust ICE_IDLE_PCT so the engine stays running reliably but the drone/plane doesn't creep forward on the ground.

Developer Notes

  • Library: libraries/AP_ICEngine.
  • State Machine: Transitions through IDLE, STARTING, RUNNING, and STOPPING.

ICE_ENABLE

Default 0
Range 0 1

ICEngine Enable (ICE_ENABLE)

Description

ICE_ENABLE activates the dedicated control logic for gas and nitro engines.

When enabled, ArduPilot moves beyond simple throttle control and activates a formal state machine to manage the Ignition and Starter sequences. It allows the autopilot to autonomously start the engine for a mission, maintain a steady idle on the ground, and monitor for "uncommanded stops" (flame-outs) using an RPM sensor.

Tuning & Behavior

  • Default Value: 0 (Disabled).
  • Reboot Required: Yes.
  • Integration: Once enabled, you must assign servo functions to your ignition (k_ignition) and starter (k_starter) channels.

ICE_IDLE_DB

RPM
Default 50
Range 0 1000

ICE_IDLE_DB: Deadband for Idle Governor

Description

This configures the deadband that is tolerated before adjusting the idle setpoint.

Values

  • Range: 0 to 1000
  • Units: RPM
  • Default: 50

Description

This parameter stabilizes the automatic idle control for internal combustion engines.

  • Function: If the engine RPM is within +/- ICE_IDLE_DB of the target idle speed, the governor will not make any adjustments to the throttle servo.
  • Benefit: Prevents the throttle servo from "hunting" or jittering constantly in response to minor, natural RPM fluctuations of a gas engine.

ICE_IDLE_PCT

%
Default 0
Range 0 100

Throttle Percentage for Engine Idle (ICE_IDLE_PCT)

Description

ICE_IDLE_PCT sets the "Floor" for the throttle command.

Once the engine is running, the autopilot will never drop the throttle below this value, even if the mission commands 0% thrust. This prevents the engine from stalling (dying) during low-power segments of a flight, such as a steep descent or landing approach.

Tuning & Behavior

  • Default Value: 0%.
  • Recommendation: Set this to the lowest throttle percentage that results in a reliable, steady idle.
  • Interaction: If ICE_IDLE_RPM is also set, the autopilot will use the governor to dynamically adjust this floor.

ICE_IDLE_RPM

RPM
Default -1
Range -1 10000

RPM Setpoint for Idle Governor (ICE_IDLE_RPM)

Description

ICE_IDLE_RPM enables the automated "Idle Governor."

Without this parameter (-1), the drone just holds a fixed throttle percentage (ICE_IDLE_PCT) when idle. With it enabled, the autopilot monitors the real-time RPM and dynamically adjusts the throttle to maintain this exact speed. This compensates for changes in air temperature, altitude, and engine warm-up.

Tuning & Behavior

  • Default Value: -1 (Disabled).
  • Requirement: Requires a functional RPM sensor (RPM_CHAN must be set).
  • Note: Use ICE_IDLE_SLEW to control how quickly the governor reacts to RPM changes.

ICE_IDLE_SLEW

%/s
Default 1
Range 1 100

ICE_IDLE_SLEW: Slew Rate for idle control

Description

This configures the slewrate used to adjust the idle setpoint in percentage points per second.

Values

  • Range: 1 to 100
  • Units: %/s
  • Default: 1

Description

This parameter controls how quickly the engine governor can change the idle throttle position.

  • Function: It limits the rate of change of the throttle servo output when the governor is active.
  • Safety: Prevents the servo from slamming open or closed too quickly, which could cause the engine to stall or surge unexpectedly.
  • Tuning: Increase this value if the governor is too slow to catch a dropping RPM (e.g., when disengaging a load).

ICE_OPTIONS

Default 0
Range 0 31

ICE Options (ICE_OPTIONS)

Description

ICE_OPTIONS provides a set of "Safety Toggles" for engine operation.

  • Bit 0 (1): Disable ignition in RC failsafe.
    If you lose radio link, the autopilot instantly cuts the ignition. Safer for large vehicles.
  • Bit 2 (4): Throttle control in MANUAL while disarmed.
    Allows the pilot to test throttle movement and adjust the carburetor even when the motors are "disarmed."
  • Bit 3 (8): Disable while disarmed.
    Prevents the engine from starting unless the flight controller is fully armed.
  • Bit 4 (16): Crank direction Reverse.
    Reverses the direction of the starter motor (requires hardware support, e.g., TCA9554).

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Enable Bit 0 for high-risk operations to ensure the engine stops if the controller is no longer in command.

ICE_REDLINE_RPM

RPM
Default 0
Range 0 2000000

RPM Redline Limit (ICE_REDLINE_RPM)

Description

ICE_REDLINE_RPM is a safety governor that prevents engine destruction.

If the engine RPM exceeds this limit (e.g., during a steep dive or if the propeller detaches), ArduPilot will override the mission throttle and force it lower to bring the RPM back into a safe range.

Tuning & Behavior

  • Default Value: 0 (Disabled).
  • Recommendation: Set to the manufacturer's recommended maximum continuous RPM.
  • Action: When active, the autopilot reduces the effective throttle output until the RPM falls below the limit.

ICE_RPM_CHAN

Default 0
Range 0 4

ICE_RPM_CHAN: RPM instance channel to use

Description

This is which of the RPM instances to use for detecting the RPM of the engine.

Values

  • Range: 0 to 4
  • Default: 0

Description

This parameter links the Internal Combustion Engine (ICE) controller to a specific RPM sensor.

  • 0: Use the first detected RPM sensor instance.
  • 1: Use RPM1.
  • 2: Use RPM2.
  • Setup: You must have an RPM sensor configured (using the RPM_ parameters) before the ICE controller can see any data.

ICE_RPM_THRESH

RPM
Default 100
Range 100 100000

RPM threshold (ICE_RPM_THRESH)

Description

ICE_RPM_THRESH is the "Run Signal" for the autopilot.

When the RPM sensor reports a speed higher than this value, ArduPilot transitions from the STARTING state to the RUNNING state and immediately turns off the starter motor. If the RPM falls below this value while the engine is supposed to be running, a "Uncommanded Stop" error is triggered, and the autopilot may attempt an in-flight restart.

Tuning & Behavior

  • Default Value: 100 RPM.
  • Recommendation: Set to a value roughly 50% of your idle RPM. If your engine idles at 1200 RPM, set this to 600. This ensures the starter stays engaged until the engine has truly fired and stabilized.

ICE_STARTCHN_MIN

PWM
Default 0
Range 0 1300

ICE_STARTCHN_MIN: Input channel for engine start minimum PWM

Description

This is a minimum PWM value for engine start channel for an engine stop to be commanded.

Values

  • Range: 0 to 1300
  • Units: PWM (Microseconds)
  • Default: 0

Description

This parameter sets a noise floor for the Engine Start switch.

  • Function: If you have assigned an RC Channel to ICE_START_CHAN, the autopilot monitors it.
  • Logic: To command an engine stop (Kill), the PWM value must be Low (below 1300) but High enough to be valid (above ICE_STARTCHN_MIN).
  • Use Case: Prevents a failsafe event or a glitch (where PWM might drop momentarily to 0 or 800) from accidentally killing the engine in flight.

ICE_STARTER_TIME

s
Default 3
Range 0.1 5.0

Time to run starter (ICE_STARTER_TIME)

Description

ICE_STARTER_TIME sets the "Cranking Duration."

It defines how long the starter motor remains powered during a start attempt. If the engine reaches the ICE_RPM_THRESH before this timer expires, the starter is immediately disengaged. If the timer expires and the engine is not running, the system will wait (ICE_START_DELAY) and then try again.

Tuning & Behavior

  • Default Value: 3 seconds.
  • Recommendation: Set to the minimum time required for your engine to fire and reach a self-sustaining RPM. Cranking for too long can overheat the starter motor or drain the battery.

ICE_START_DELAY

s
Default 2
Range 1 10

Time to wait between starts (ICE_START_DELAY)

Description

ICE_START_DELAY is a cooldown and recovery timer for the engine start sequence.

After a failed start attempt, the autopilot waits for this duration before trying again. This delay protects the starter motor from over-working and allows the fuel system to re-prime if necessary.

Tuning & Behavior

  • Default Value: 2 seconds.
  • Recommendation: Set high enough to allow the starter motor to stop spinning completely before the next engagement.

ICE_START_PCT

%
Default 5
Range 0 100

Throttle Percentage for Engine Start (ICE_START_PCT)

Description

ICE_START_PCT defines the "Start Throttle" – the position the carburetor or butterfly valve moves to when the starter motor is spinning.

Most gas engines require a small amount of throttle opening to draw in enough air and fuel to fire. If this value is too low, the engine will crank but never catch. If it is too high, the engine might "Scream" or surge immediately upon starting, which can be dangerous on the ground.

Tuning & Behavior

  • Default Value: 5%.
  • Tuning: Increase this in 2% increments if the engine fails to start while cranking.
  • Safety: Ensure the drone is secured or the propeller is clear, as the engine will immediately move to this power level during the start sequence.

ICE_STRT_MX_RTRY

Default 0
Range 0 127

Maximum Number of Retries (ICE_STRT_MX_RTRY)

Description

ICE_STRT_MX_RTRY prevents the drone from burning out its starter motor or draining its battery on a stubborn engine.

If the engine fails to start after a series of attempts, this parameter sets the limit. Once reached, the autopilot stops trying and sends a "Critical: Engine failed to start" message to the GCS.

  • 0 (Default): Infinite retries.
  • 3: The system will try to start 3 times, then give up.

Tuning & Behavior

  • Recommendation: Set to 3 or 5 for autonomous missions to ensure a mechanical issue doesn't lead to a total electrical failure.