Error message "PreArm: RELAY_PIN=54, set SERVO13_FUNCTION=-1"

I want to operate 2 relays on AUXOUT5 and AUXOUT6 with TX-Channel 7 and 8.
I set RC7_OPTION to 28 Relay On/Off) and RC8_OPTION to 34 (Relay2 On/Off). After setting RELAY_PIN to 54 (AUXOUT5) I get the Error message in the Data screen: “PreArm: RELAY_PIN=54, set SERVO13_FUNCTION=-1”, arming is not possible and GPS is switched off.
Why Servo 13, I don’t understand the logical connection. SERVO13_FUNCTION is 0, switching it to -1 does not change anything.

Servo outputs 1-14 map to servo 1-8 and the aux channels1-6 = servo 9-14 so when you want to use them for GPIO you have to set them to -1 so its not used for pwm.

I wrote: “switching it to -1 does not change anything”. But I did not reboot the pixhawk. After rebooting it works correctly. Thank you!

1 Like

same here, setting to -1 doesn’t solve issue, relay still doesn’t work…

And I can’t save -1 value… it changes to 0 after writing parameter…

post a log so we can check your settings.

1 01.01.1980 2-00-00.bin (208 KB)

hmm, looks like android version of mission planner doesn’t support to set -1, same with QGroundControl
with PC by connection by wire helped =)

1 Like

good, is it working now?

Hi there,

I had the same message when I upgraded my copter from 4.0.7 to 4.2.2 and I believe the message appeared because BRD_PWM_COUNT parameter is not an option on the latest versions. In any case, the message does not appear when I downgraded the firmware to 4.0.7.

1 Like

I have upgraded to the Copter V4.2.3 and I am also seeing the same error message. I have tried to set SERVO13_FUNCTION - =1 but with no avail. Anyone have a solution to this issue yet?

I upgraded to Rover 4.2 and started getting this problem on both servo 14 and servo 13. I had to change them to -1 as stated and then write params. If you don’t press the write params button the change doesn’t get pushed back to the flight controller.

If you did that and are still experiencing the issue make sure the changes were saved by powering off the flight controller and killing mission planner. Restart both and then double check.

Otherwise there may be some differences between copter and rover for that issue because the -1 took care of my problems in rover.

Ahh I seem to have overlooked restarting the drone properly. I’m using Servo 12,13, &14 and changed all of them to -1. I did a full restart of the drone and It seems to have fixed the pre-arm error and everything is working as it should.
I am still getting an error for my MOT_PWM_MIN/MAX. Both of those values are set to 0 and I am not certain what the Max PWM value should be set to.

In that case I would:

  1. Go to Full Parameter Tree and save your file and give it a meaningful name.
  2. Then install a non-copter firmware (fully clears out everything).
  3. Then install your copter firmware.
  4. Then check MOT_PWM_MIN/MAX and jot them down.
  5. Then restore the file you saved and write it to the flight controller.
  6. Then put in the defaults you wrote down in step 1 and see if that takes care of the problem.
  7. If that causes more problems than it cures, restore the file you saved.