I’d like to use the Pixhawk with the PX4 flight stack to control two relays on the AUX ports with two of the switches on the Taranis transmitter. The relays are on a Parallax Dual Relay board, which simply require a HIGH/LOW signal to operate and are compatible with 3.3V signals.
I see that with the current releases of the PX4 flight stack and QGroundControl, I can assign AUX1, AUX2 and AUX3 to specific channels. However, it appears that this only allows for a PWM signal to those ports. Am I missing something or is it not possible to set the switches to control the AUX ports in a GPIO mode?
If it’s not currently possibility, I assume I could write a module like gpio_led that will take RC transmitter inputs and send the correct GPIO signals?
I apologize if this is already documented elsewhere. I’ve found lots of information for relays/camera triggers for the APM flight stack, but very little regarding the PX4 flight stack.
You should be able to configure your auxiliary pins of the Pixhawk as gpio pins.
Probably this is not documented yet in the new developer guide.
Here is something form the old guide
Any update? I´m trying to trigger a relay with the digital outputs (AUX5 and AUX6 by default) but I´m not able to do it. Just a pmw signal in AUX1 to AUX4 pins and nothing in 5 and 6 auxs. I don´t know if I have to change some parameter.
If you connect a regular servo, are you able to control it? If you can, then you’ll probably need to put an electronic switch between the AUX port and relay. I personally have not come across any electronic relay (for hobby use) that works on a PWM signal.
PMW signal is received in the first four aux ports. The thing is that I don’t receive any signal in 5 and 6 auxiliary ports. Here is where it’s suppose I have to receive a digital signal, not for a servo if not for a relay. But I am not receiving anything in these ports.
I’m curious, what airframe do you have chosen in QGC?
Quadrotor X - DJI Flame Wheel F450, just because F450 it´s my model. Could be digital AUX PINs are not able for this airframe or something like that?
I’m presuming you enabled MNT_MODE_IN to get AUX1-AUX4 on the Pixhawk to output PWM signal.
I think unless you customize the firmware, that’s all you’re going to get.
No, I haven´t enable MNT_MODE_IN but that seems is just for inputs, and I want an output.
So you mean the only way for obtain an aux pin with a digital output is editing the code?
These references are on the Pixhawk ports. They do not relate at all to Tx outputs. You have to calibrate and program your Tx to work these outputs.
Quadrotor X with mount (e.g. gimbal) Common Outputs
Edit SYS_AUTOSTART = 4002
MAIN1: motor 1
MAIN2: motor 2
MAIN3: motor 3
MAIN4: motor 4
MAIN5: feed-through of RC AUX1 channel
MAIN6: feed-through of RC AUX2 channel
Specific Outputs should now be and you can use it just like any PWM output:
AUX1: Mount pitch
AUX2: Mount roll
AUX3: Mount yaw
AUX4: Mount retract
Note: MAIN5 and MAIN6 becomes the same as AUX1 and AUX2 Outputs.