Camera trigger/shutter on APM 2.6


Just tried to configure my shutter. I'm using an opto-isolator with CHDK functionality. The idea is that I should be able to pull a pin high for a specified number of ms, configure a CHDK script to measure the time that it's raised and then take a photo or shut down the camera.

First thing I did was see how I could accomplish this on APM 2.6. This page seems to be the best description, others mostly describe doing this with PWM signals:

It states that A9 is raised high when the shutter is configured as "relay". I've set the time to something high. The maximum is 127. When the switch is low, I measure 0.00v. Then I flip the switch, but the pin isn't raised high. Ch7 is indeed set to "camera trigger" in the radio calib.

One strange thing in this config is that when I change the page from "camera gimbal calibration to something else and then go back, the config in the camera trigger part has disappeared. Not sure if therefore it actually did get saved.

The pin I'm measuring is A9 and on the APM2.6, I'm counting from A0 to A9. That leaves A10 and A11 on the rest of the end and 2 additional pins that are NC. So it's the fifth from the forward end.

Has anyone gotten this to work properly?  What am I doing wrong or is this documentation wrong? 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Thanks, your post is extremely helpful.
  • Hi Mr Gerard Toonstra,

    I'm a newbie and would like to know several things regarding controlling relay. Would you guide me please?

    1. How can we give command to relay/shutter pin (A9) through mission planner? Is there any 'HIGH/LOW' button that I can click? I knew that we can control the pin via inserting the instruction during setting the way points isn't it but unfortunately I don't want that type. I want to control it via computer like controlling it using remote controller. The reason is if my plane got too far and my Remote Controller cannot reach it, I still have the autopilot (mission planner) where I can snap when I want.

    2. Is the shutter/relay specific only for arducopter and not arduplane?

    I really appreciate if you can guide me. Thank you. 

    • I have mine setup on a switch on the radio. When I toggle the switch of ch. 7, the camera takes a picture. I don't know for sure if MP has an option to do this, I don't think so. in my opinion it's not a good idea to allow vehicles to fly out of control range. I'd rather have the radio as the last option than the telemetry link because the telem link doesn't have the full manual option. In my operations I always have a guy operating the radio hands-on ready to take control where the other monitors the telemetry information like battery and so on. So on does the "piloting" even if that is automatic and the other does the health monitoring.

      Shutter/relay shouldn't be specific for copter or plane. I know the GPS distance triggering option was introduced after it was on the plane, so there are sometimes features that take a bit longer on one platform vs. the other. The relay option has been there a long time though.

  • 100KM

    Thanks for posting. I have a friend looking at the same problem.

  • I got this sorted out. The relay trigger time goes up to 50, which is 5 seconds. I used the relay test in the terminal and this allowed me to check the A9 pin worked. Then I got some help triggering the relay from the radio and this then gave the same behavior.

    Only thing to figure out is how to invert the relay trigger. The opto-isolator is also an inverter, so I need +5V to be the default state and have it pulled low when it triggers.

This reply was deleted.


gotham liked gotham's profile
Hiroki Tanaka liked Hiroki Tanaka's profile
Oct 13
Derrick Davies liked lisa TDrones's profile
Sep 23