Relay outputs in PX4?

Converting from Arducopter to PX4 on Pixhawk and trying to setup relay outputs. Arducopter maps aux outputs to relays. Don’t see this in PX4. Also, is MAVLINK command CMD_DO_SET_RELAY supported?
Seems super basic, but can’t find any docs. Thanks!

Hi, is this a PWM relay or are you trying to set a GPIO? I think it’s probably true that this is not supported in PX4.

Hi Julian, I suppose I could use a PWM/DC converter on an RC passthrough to an AUX output, but struggling to get the to work too. Just seems like such a basic function that was always supported by Arducopter. What is everybody using to turn accessory relays on and off? Thanks

Hi ,
i can confirm RC passthrough does work on my CUBE ORANGE F.c running PX4 for activating a relay from one of the AUX channels on the flight controller . I have a Herelink Telemetry system .
I have used it to switch ON a programmable UBEC voltage output for my Raspi piwer.

My understanding is that RC passthrough outputs PWM signals. Did you use a PWM to DC converter to switch the relay? I can’t find GPIO settings for the Aux outputs. Thanks!

Hi,
Yes , it does output PWM signal but again confirm from your receiver manual .
I us Matek DUO UBEC to power my accessories including my radio air receiver. and RASPi One output port of MATEK DUO can be controlled by providing to the board itself . The AUX 2 channel of CUBE orange flight controller is wired ( SIGNAL + GND) to the PWM input of the MATEK DUO UBEC board. Video attached if this helps.

Thanks SJ, I need to trigger relays with a DC voltage. I think there are PWM - DC converters out there, but seems like a cumbersome way to trigger a relay. Very odd to me that this function was never implemented as it is Ardupilot. Am I’m the only person out there that needs to turn relays on and off?

1 Like

oh …ok…triggering relays with dc voltages are easily available and low priced. I guess you require 3.3v / 5v dc relays. Just check with R.S components ir Farnell or Mouser electronics for your customized solution.

check this link

Looks like that device will do it, but it’s HUGE. Need something much smaller, cheaper.

here’s what I need RC Switch with Digital Output - ServoCity
thanks for putting me on the right track. MM

1 Like

It would be better to just have a DC output or a custom settable pwm and duty cycle ( 0-100% duty cycle, varying freq eg: 50-100 or other freqs ) . @JulianOes , is this feature implementation planned anytime soon ?