I'm confused and a bit frustrated, would appreciate any help as I'm not sure how to proceed.

Setup: I have a pixhawk autopilot running Arduplane 2.77, using Mission Planner 1.2.95

I've been following this guide to get my CHDK enabled camera working with my pixhawk. I'm interested in getting the camera triggering based on distance traveled.

Obviously the guide was written with APM in mind, so it needs to be adapted a bit for pixhawk; specifically the setting for RELAY_PIN. I've kept the rest of the settings the same as in the tutorial.

Pixhawk has 6 AUX ports according to the quick start guide, I am assuming that the numbers above the pins correspond to the AUX port numbering. When you mouse over the RELAY_PIN parameter, it says that pin 54 corresponds to Pixhawk FMU AUX1.

Tried setting RELAY_PIN to 54, no joy. Did a bit more looking, discovered in the release notes for 2.77: 

"Improved relay code
The relay and servo set code has had a major overhaul, with up to 4 relays now supported for MAVLink control and much better support for the DO_SET_SERVO, DO_SET_RELAY, DO_REPEAT_SERVO and DO_REPEAT_RELAY MAVLink commands. Along with these changes is a new parameter BRD_PWM_COUNT which allows you to specify how many auxillary PWM outputs to enable, with the remaining outputs being available as digital relays. This allows you to re-assign some of the aux servo outputs on Pixhawk for use as relays, by setting the RELAY_PIN, RELAY_PIN2, RELAY_PIN3 and RELAY_PIN4 parameters. The pin numbers for these pins start at 50 for the first aux servo pin, and go to 55 on Pixhawk."

Additionally,I found this github issue about this same problem that states that the Pixhawk can't trigger CHDK because its relay pins operate at 3.3V instead of 5V.

So i suppose my specific questions are:

1) Is AUX1 pin 50 or 54?

2) Can anyone confirm that the relays, when working properly, won't be able to trigger CHDK?

Views: 68768

Reply to This

Replies to This Discussion

Hi Hamish, Za Pf, Reuben and all,

I successfully tested the Pixhawk CHDK trigger suggested by Reuben using the board layout by Za Pf.

The basics:

The original circuit was suggested by Reuben:

The design is based on two 220k resistors and one BC547 transistor. It requires 5v being fed to the servo-rail by an ESC or a separate BEC. Za Pf designed a board based on this circuit and published it on OSH Park:

Some pictures while building it:

Placing the parts:

After soldering:

The final cable:

Two minor things:

The holes for the resistors are a little small and for soldering it would be easier if the holes for the transistor would be a little bit further apart. 

A big thank you to ZaPf, Reuben, Marco and all the others who contributed!



Hi Za Pf and all,

I just came across this Sony multiport plug which should be much easier to handle:


But shipping is pretty expensive - even in Europe...

Cheers Thorsten, I am happy I managed to help someone :o)  You can also use this to operate leds or other things you need to switch on and off ..current is only limited by the transistor specs, you can also increase the voltage supplied if you may need 12v ..

Hi Reuben,

yes, thanks! :-)

Previously, I used  Marco's design. It works great and reliable as well but the advantage of your circuit and ZaPf's layout is, that it has less parts and that you can order the board form OSH Park for $1.15 for three of them - which is perfect!


Is this woks for RX100m2 ?


Nice job Hugues! ;)

It was very difficult to find S2 multiport in local electronic store, so I decided to bring RX100II to camera service center to wiring shutter and ground out from camera shutter button.
And it was work to trigger camera in Pixhawk without any additional circuit. When camera connected to Pixhawk in idle position, sometimes camera take a photo without any trigger command from Mission Planner.
Then I add Hugues circuit, camera still take a photo without trigger from MP although in longer interval to shut. Is that happen because of voltage in Pixhawk not stable?

We have also developed a CHDK cable to be packaged with a mapping drone we are about to release. Our preproduction prototypes are in and we are currently testing them. We have a few extra if anyone is looking for a CHDK cable for mapping. I would be happy to send a few out at no cost provided we get feedback.

If anyone wants one, please PM me and send me a photo of your drone, ready to fly with canon camera installed. I only have 5 to send out so first in.....

I have attached our draft manual which may be of interest (and may be completely wrong)!


When the board is available for purchase please get it added to the wiki in Camera Shutter Triggering using CHDK#chdk_cables_for_purchase. The best way to get it added if you are not a wiki editor is to add a request with the words and links to the wiki issue tracker.

The tuffwing example there is good to copy - a few words about your board, and links to where it can be purchased and a user guide. 

Hi Ausdroid

I am very interested to test your prototype, at present I work with a big UAV (3.0 m wing span) mapping high lands in Andean Range Mountain. I use a Sony A7r and Sony a5100, but the Canon S100 is very useful in very high zones due to low payload restriction. As you can see in attach pictures, now I use a push servo as trigger, mount in 3D ABS frame, but it is not a dependable method, i lost many pictures due to random fails. I am in Lima, Peru. I hope you let me test your work...

.kind regards

Juan Pablo Gayoso



PM me with an address and I will send one over. Would LOVE to see some of the pictures. What a fantastic area to be flying in.


Hi Joe

my address:

Calle Gómez del Carpio 129. Int. 303. Barrio Medico. Surquillo.

Lima 0034. Peru.

My name: Juan Pablo Gayoso Mogrovejo

Thank you very much

 I will send news when arrive ..

thank you so much....again

Reply to Discussion


© 2020   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service