In the never ending quest to improve camera triggering via Pixhawk, one of my objective was to reduce as much as possible the triggering latency. That is the time between the moment the autopilot processes a trigger instruction (sent out on a predefined Pixhawk AUX ouput) and the effective image capture by the camera. There are improvements that are out of reach for me : how fast runs the APM firmware on Pixhawk, how fast the camera effectively triggers. The most significant improvement I coiuld try is to reduce any latency between the Pixhawk output and camera input, i.e. to suppress any intermediate processing or electronics integrated circuits in between. I usually used an intermediate electronics circuit such as stratosnapper or similar to trigger pictures.

Instead I searched for a direct cabling method. This requires to make your own (or purchase it if your camera model is supported by the cable makers) micro usb cable that will plug the camera directly to a Pixhawk AUX port. Pixhawk is then configured , for this AUX port, as a "relay". A relay is not a PWM signal that is usually used on the output ports. A relay signal is simply a 3.3V square impulse that is produced on the signal wire of this output AUX port.

To configure a relay output on Pixhawk, you will not find the complete information on the current wiki, but I'm sure, after this post, this incredible wiki guy at 3DR will add and complete it.

There are five parameters to setup for Arducopter, and four for Arduplane:


  • Ch7_Opt : select "camera trigger" option
  • Camera shutter : select the "RC" relay output you connect the cable to : it must be one of RC9, RC10 or RC11 (RC12 to RC14 are unfortunately not available in the list in mission planner)
  • BRD_PWM_Count : select 0 to have all 6 AUX ports act as relays, 2 for having 4 of them (AUX3 to AUX6), 4 for having two of them (AUX5, AUX6)
  • CAM_TRIG_TYPE : 1 (for relay)
  • In all parameters tree list, under "Relay", setthe value of "Relay_PIN" : must be a value corresponding to your chosen AUX port. If RC9 then enter "50", if RC10 then enter "51", if RC11 then  enter "52"


  • Same as copter but there is no "Ch7_Opt" parameter to set.

In order to make it work, the 3.3V signal produced by a Pixhawl relay is a non standard voltage, which should normally be 5V on most cameras. Therefore you still need an minimalistic intermediate circuit to raise the 3.3V to 5V. It can be done with one transistor and 2 resistors as follows (sorry for my basic drawing skills):

This circuit works as I have tested it (for a Sony NEX type of camera).

Now there are two strong limitations and probably what we could call bugs (developers will correct me if I am wrong). These bugs were tested in Arduplane 3.3, 3.4 and Arducopter 3.2.1 (not tested in 3.3 but most probably still present as nothing in the release notes states a correction about this):

BUG n°1 :

  • As soon as you display the "camera gimbal" screen, in order to just view (or modify) the "camera shutter" option, the parameter "CAM_TRIG-TYPE" will systematically be reset to zero (instead of remaining at value 1, configured for relay).
  • Workaround : this screen should be the first you view/modify BEFORE any of the four other parameters.

BUG n°2 :

  • In the parameters list, under the "relay" section, you will find RELAY_PIN, RELAY_PIN2, RELAY_PIN3, REALY_PIN4 (by the way it seems arducopter is limited to two REALY_PINs, while Arduplane is limited to four REALY_PINs). For camera triggering with relay, onlyRELAY_PIN works; no other RELAY_PINx will work.
  • Workaround : use only RELAY_PIN.
  • Constraints : excludes the simultaneous use of a LIDARlite and camera triggering with relay.

Hope this info will help you setting up your relay camera triggering, and save you the full day I spent on trial and errors....



Views: 1071

Replies to This Discussion

Thank's for share Hugues, I'm trying to learn about relays and better trigger now, very usefull and clear.

Thanks for sorting this out and sharing the issues so we can ease the setup for the next person.

For Bug #1, I think the issue is most likely to be in the Mission Planner (I guess this is the GCS you're using) but I wasn't able to recreate it.  That might mean that it's been fixed in a recent version of the MP (I'm using the latest beta which is ver or maybe I just didn't follow the exact steps required.  Could you try and upgrade to the latest mission planner (go to the Help screen and push "Check for Updates", wait a few minutes then restart the MP?

Bug #2 isn't technically a bug, it's more of a "short coming" :-) in that we don't have "Relay2", "Relay3" etc in the drop-down list and the camera shutter code always uses the first relay... so I guess until we enhance it we should make it more clear in the wiki that it only uses the first relay.

Thanks again.

Thank you Hugues,

please let me what is a value of triggering latency at the present moment, before your improvements enterd into force and what is the expended triggering latency.

Do you video camera or camera to take pictures only ?


Thx Randy for these precisions. I will try the latest mission planner and report back.

For the second point, due to this "short coming", it is then not possible to use camera relay trigger and lidarlite simultaneously, do you confirm this or am I wrong with something ? (lidarlite uses normally two relays 54 & 55)

Hi Darius, good question. To be honest I do not know as I did not measure this latency yet. I was completely focused on resolving a workaround the two points mentioned above. I will try to measure that, thx for the suggestion.

Thanks for posting this Hugues.

Here are the settings I'm using for AUX5 (RC13=AUX5) configuration:

CAM_TRIGG_TYPE = 1 (Relay)
RC13_FUNCTION = 10 (camera_trigger)
RELAY_PIN = 54 (Pixhawk AUXOUT5)

In Mission Planner going to INITIAL SETUP>Camera Gimbal still sets CAM_TRIGG_TYPE back to 0 (Servo), so don't do that.



Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2018   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service