← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A relay's pin cannot be used, or two relays share one pin

Stops itRangefinder, optical flow, camera, OSD and other devices

What ArduPilot says:

A relay is a pin ArduPilot switches on and off (a camera shutter, a parachute, lights). Each enabled relay (RELAYn_FUNCTION not 0) with a pin is checked. “RELAY2_PIN=54 invalid”: this board has no GPIO (a general-purpose pin) with that number. “set SERVOn_FUNCTION=-1”: the pin is a servo/motor output that still works as an output. “pin conflict RELAY1_PIN = RELAY3_PIN”: two enabled relays name the same pin.

What to do, most likely first

  1. The pin is one of the servo/motor outputs and has not been turned into a GPIO.

    CheckThe message names the output: “set SERVO9_FUNCTION=-1” is output 9.

    FixSet that SERVOn_FUNCTION to -1 (GPIO) and reboot: outputs become GPIO pins only at start-up. Nothing else (a motor, a servo) may be wired to that output.

  2. No relay is used: an old relay pin was turned into an enabled relay by the upgrade to 4.5 or later, or the setting came from another aircraft's file.

    FixSet RELAYn_FUNCTION to 0 for every relay you do not use.

  3. The pin number belongs to another board.

    FixSet RELAYn_PIN to a GPIO number from your own board's ArduPilot documentation page.

  4. Two relays were given the same pin.

    CheckThe message names the two relays; compare their RELAYn_PIN values.

    FixGive each relay its own pin, or set the extra relay's RELAYn_FUNCTION to 0.

Parameters to look at

ParameterWhat it is
RELAY1_FUNCTIONRelay function
RELAY1_PINRelay pin
RELAY2_FUNCTIONRelay function
RELAY2_PINRelay pin
RELAY3_FUNCTIONRelay function
RELAY3_PINRelay pin
SERVO9_FUNCTIONServo output function
SERVO10_FUNCTIONServo output function
The code that sends it

…=N invalid

libraries/AP_Relay/AP_Relay.cpp AP_Relay::arming_checks() · Open in ArduPilot Copter-4.7.1

…=N, set SERVON_FUNCTION=-1

libraries/AP_Relay/AP_Relay.cpp AP_Relay::arming_checks() · Open in ArduPilot Copter-4.7.1

pin conflict RELAYN_PIN = RELAYN_PIN

libraries/AP_Relay/AP_Relay.cpp AP_Relay::arming_checks() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer