Pixhawk Relay Switch Configuration

Hello all,

I have been scouring the net for solutions/information on using the pixhawk for logic switching or as it is commonly reffered to on the wiki, “Relay Switch”. I just want to trigger the pixhawk with my transmitter and have the pixhawk output a 1 0r a 0. 3.3 volts or 5 volts.

My solution so far:

-First, set the BRD_PWM_COUNT=0. (I want to use RC9 or Aux 1, but I still set all AUX IO’s to be relays)

-Second, define the “First Relay” or RELAY_PIN= 50. (this is pixhwk AUXOUT1)

-Third and this is where I am confused; I define SERVO9_FUNCTION = 1, 10, 59 or anything that makes sense.

This is really the last step that feels correct to me. However, there is no output when I begin to trigger my Transmitter switch. From the flight data page Channel 9 input ppm values show min=1000 and max= 2000. Is this possible with the Pixhawk flight controllors or am I chasing my own tail? Is this only able to be done durin auto missions? Any help would be greatly appreciated.

-Riley

I have been doing this for years now. Great feature love it.

I turn on some LED’s with a switch connected to a MOSFET.

On my Pixhawk I have BRD_PWM_COUNT = 4

I use a switch connected to channel 9 so CH9_OPT = 28

When you define a relay they use to be numbered one and two but now I think there are more than that.

So I have set RELAY_PIN = 54 That set Aux Out to be 5.

So when channel 9 is low the lights are off and when channel 9 is above 1800 the lights are on.

SERVO functions are for passing radio signals straight through the auto pilot.

So in missions or commands sent to turn relay 1 on/off this goes to Aux Out 5 as well.

Auxiliary Function Switches

Mike

Thank you Mike for your input. You got me thinking about what I am doing wrong. I have read your solution in another discussion. Looks like my mistake was the firmware.

I am using plane firmware. The relay options are only for copter firmware from what I can tell. Can anyone confirm this?