A relay's pin cannot be used, or two relays share one pin
What ArduPilot says:
- …=N invalid
- …=N, set SERVON_FUNCTION=-1
- pin conflict RELAYN_PIN = RELAYN_PIN
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
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_FUNCTIONto -1 (GPIO) and reboot: outputs become GPIO pins only at start-up. Nothing else (a motor, a servo) may be wired to that output.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_FUNCTIONto 0 for every relay you do not use.The pin number belongs to another board.
FixSet
RELAYn_PINto a GPIO number from your own board's ArduPilot documentation page.Two relays were given the same pin.
CheckThe message names the two relays; compare their
RELAYn_PINvalues.FixGive each relay its own pin, or set the extra relay's
RELAYn_FUNCTIONto 0.
Parameters to look at
| Parameter | What it is |
|---|---|
RELAY1_FUNCTION | Relay function |
RELAY1_PIN | Relay pin |
RELAY2_FUNCTION | Relay function |
RELAY2_PIN | Relay pin |
RELAY3_FUNCTION | Relay function |
RELAY3_PIN | Relay pin |
SERVO9_FUNCTION | Servo output function |
SERVO10_FUNCTION | Servo output function |
Where to do it:Board & Wiring PlannerParameter Compare & Migrate
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