Ardupilot relay output setup @iforce2d
Ardupilot relay output setup  @iforce2d
Uploaded July 2026 | Updated November 2026, 6 days ago
Patreon: patreon.com/iforce2d
The docs for GPIO setup are here but the info is not on a single page and omits key details like at one point you need to reboot before extra params will appear.
ardupilot.org/copter/docs/common-gpios.html
ardupilot.org/copter/docs/common-relay.html

Let's say you want to use channel 6 on your radio to toggle the servo pin 5 between high and low. This will use an internal status value called Relay 1.

Set RC6_OPTION to 28 (Relay 1 on/off)
Set SERVO5_FUNCTION to -1 (GPIO)
Set RELAY1_FUNCTION to 1 (Relay)

At this point I think you need to reboot before some extra RELAY1_xxx parameters become available.

Set RELAY1_PIN to the appropriate pin number for servo pin 5 on your board. This will require looking up the 'hwdef.dat' file from here: github.com/ArduPilot/ardupilot/tree/master/libraries/AP_HAL_ChibiOS/hwdef

You're looking for the GPIO(xx) number that corresponds to the PWM(x) of your servo pin. In this example with an Omnibus F4 pro it would be 54, so RELAY1_PIN = 54
Ardupilot relay output setupLittle delta sloper (fail)Sunrise and birdsong in New ZealandEndurance little boy part 1 - buildSMT pick and place, part 5 (building 10 weenyPRU boards)What exactly is iomixer ?Another DIY CNC router, part 12 (limit switches, machining XPS foam)Palm-top LinuxCNC (weenyPRU)Befriending a feral kittenEndurance UAV part 2 (maiden flight)Follow-me with Ardupilot, GPS onlyHomeslice 3 part 6 (waffling intensifies, how can it be part 6 and not flying yet)
iforce2d |

Ardupilot relay output setup

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER