Setting up Auxiliary Relay Switch

Hi!
I’m working on a Pixhawk 2.1 with APM:ROVER V3.2.3

I’m trying to get one of the aux pins, or any of the pins on the servo rail to control a relay.
I’d like to to be able to control the switch with my RC transmitter.

Currently On my RC transmitter, I have ch5 set up to go from 1000-2000ms
servo_5_function = 55 (rcin5)
RELAY_PIN3 = 53 (PXIHAWK AUXOUT 4)

My SERVO_5_FUNCTION needs to be set to control the on/off of RELAY_PIN3.
But I can’t seem to find the correct setting.

I’ve even tried setting it up through the camera trigger, but no luck.

Please help!

Hi,
You should control on/off relay in code and need to modify the firmware. camera use the first relay pin and set in AP_Camera library.( _apm_relay->on(0))

http://ardupilot.org/rover/docs/common-relay.html?highlight=relay

Ah right, we don’t have an aux switch function for the relay in Rover (we do have it in copter). We will add this shortly so it will go out with Rover-3.3 which should start beta testing very soon (within the next week).

The wiki page for the relay is here but it’s mostly copter spefic at the moment.

FYI,

I was able to make it work using a Turnigy RX switch plugged directly into the rc transmitter.

Thanks!

1 Like

@rmackay9 I need to control a couple of relays as well in Ardurover. I have installed 3.3.1-rc1. I do not see the relay option under CH7_Option, so am I right that this has not been implemented yet? Also, I do not see CH8_Option at all as is shown in the Copter wiki you referenced above. It would be nice to be able to assign channel 8 to a relay as well. Thank you for all you all do! I am highly impressed with this software.

Until this is implemented, I will use a Turnigy RX switch as @Aaron_Goodnight is doing, or since I have an Arduino on board as well, I may let it switch the relay from a PWM signal from the Pixhawk - no worries…

Kenny,

That’s right, neither channel 8 nor the relay have been implemented in Rover yet. It’s not particularly hard to add but @peterbarker has a more strategic solution that lets us share the code between the vehicles instead of duplicating it. It’s a big change though so we won’t put it in 3.3 instead it will go out with 3.4. We are releasing Rover firmwares fairly quickly though so it won’t be so long from now I think… within a couple of months probably.

1 Like

That sounds great. I’m happy to work around (forever, really) with additional hardware. Good thing about a lawn mower, I’m not worried about a few extra grams (or pounds!) of weight! :slightly_smiling_face: