PixHawk and APM Mapping Camera Configuration

PixHawk and APM Mapping Camera Configuration

This video shows how to configure Mission Planner parameters in conjunction with an Autopilot controlled mapping camera trigger. The trigger method for APM requires a USB cable and either an EFL600 LED light controller or HK 5V LED light switch. The trigger method for PixHawk also requires a USB cable and one of the aforementioned LED light controllers as well as a 5V step up board since PixHawk only puts out 3V from its RC outs and CHDK needs 5V to utilize the remote trigger function.
Both of the setups shown in this video allow the cam_trig_dist parameter to trigger a Canon mapping camera with CHDK based on distance traveled in flight and therefore get consistent overlap in aerial imagery. This is optimal for mapping.


  1. Rafael Tab

    Hello friends

    I have a 3dr x8..

    I built a cable like in video for trigger my canon S100 with pixhawk but nothing (i ready have 5v in my pins) exactly. Only shoot the camera when disconet the usb cable.

    I tried the two methodology by servo and by relay an nothing happend in all aux port.

    The script 3DR detect the usb signal conecction but My camera not respond to “trigger now”.

    please help me!! @geobduffy

  2. Kevin Chrsitensen

    I realize this is not a recent post but I’m lost…..
    I have an S100 with CHDK, the EFLA600, Sparkfun step-up board and this cable http://www.kapshop.com/p274/Canon-11-pin-for-CHDK/SDM-and-Video-out/product_info.html

    I have soldered as described in the video and have connected to Pixhawk. I can measure 3.3v from the output pins of the Pixhawk.

    The camera will fire when I disconnect the main Lipo battery or when I plug a usb cable in my pc and unplug it. But I can’t get it to fire from Mission Planner.
    Any idea how I can troubleshoot this?

  3. Great Lakes

    I am having the same problem that FLranch is having with my SX260 so may change camera if I have to (do we know what camera that is in the Vid).

    Before I started looking into dif cameras I wanted to see if the pixhawk side of things where working by putting a volt meter on a lead from RC7 and if I am understanding things right I should get 3v when set up right when armed and I click trigger cam now option, but voltage remains unchanged

    I set RC7_Function to 10
    also set gimbal to RC7
    and set the limits the same as in the vid as far as I can tell I must be missing something simple

    • geobduffy

      The video is showing an s100 as example but the sx260 works the exact same. Just FYI, if it takes one picture when you unplug it that is ok. If it keeps taking pictures (more than 2 max) then some setting or something with the script is wrong. Can someone who is having the issue zip and add the script here so I can check and test it?

      • Great Lakes

        Ok good so I will be good with the CHDK side of things that’s good to know!
        Should I see 3v out on rc7 on the pixhawk if set up right

        • Great Lakes

          Thanks to Geobduffy I found that i did not have the back rail on the pixhawx powered by one of the ESC’s now that i got that fixed it is working hope to find time to fly a small map here this week

          • Caleb

            Great Lakes. How did you power the back rail by one of the ESC’s? I am having the same problem!! :-/

        • mactadpole

          Just wanted to reply to some of these issues as I went round and round for about 3 hours today before I got it to work. My setup: SX260HS, Pixhawk, and DIY trigger cable w/ voltage step up (Thanks Flight Riot!). I could get my camera to do the computer/USB cable trigger trick so I knew the script was good but right clicking and selecting trigger camera now on the Flight Data screen had no response. Stuck a meter on it and I was getting 5.1V on the rail and I think a 30-40mV pulse when I right clicked trigger now. Put the meter on the in/out lines of the voltage step up and got no response when triggered. After playing around a bit I realize my default Shutter>Push value on the camera gimbal page was too low and had to change it from 1300 to 1900. That got it to trigger! I did notice that I got 5V on the IN pin and 5V out on the out pin of the voltage stepper, so I don’t know if its actually needed unless your Pixhawk rail is not outputting 5V.

  4. FLranch

    Hi geobduffy,

    I am still having issues with getting the CHDK to work on my canon SX260. I have the remote parameters set as stated above. Any suggestions?

    and everyone else with similar problem (script triggering when unplugging from computer) able to figure out what’s going on?



    • Great Lakes

      I have the same thing going on with my SX260 HS triggers when I unplug from my computer not when I plug it in driving me crazy

      • geobduffy

        OK guys, in determined to figure out what’s going on here. I have not been able to repeat this. Have you used the zip file script? Have you copied the script into your own file? If so, have you saved as a .bas file?
        I’ll shortly upload 3 new scripts to choose from with different functionality.

  5. bocorps

    hi guys,
    i understand the need for a 5v step up in case we use a pixhawk but why do we have to connect a 5 volt led switch since we already get the 5v needed from the sparkfun step up ?

    And if the 5v led switch is important, can’t we just replace it by some 5v ubec as those Micro UBEC 3A / 5v from hobbyking ?


    • geobduffy

      The switch functions to trigger the camera based on the CAM_TRIGG_DIST parameter for a given mapping mission. With a steady 5v signal the camera will just take pictures continuously.

  6. boxerone

    Hi geobduffy
    as I wrote in my previous post, as soon as I connect the camera via USB to my computer (to check the gentwireUSB cable), the camera did not respond at the running script (FR_int.bas) but upon disconnecting it start shooting continuosly. …I am getting crazy !.-)
    any suggestion?? camera is on default setting , as well as the CHDK parameters are set to default ( with remote shutter flagged and abowe script running)
    Any suggestion how to get this working?
    Thank a lot for any suggestion tha may help

    • MattyP


      Are you supply the 5v to the servo rail on pixhawk? Look carefully in the video, I missed it first time and thought the eflight control with sparkfun stepup was all that is required but you also need the 5v from a BEC or similar going to the pixhawk to get it working on the bench.

      • boxerone

        Hi geobduffy
        thanks a lot for your help !
        that was my mistake: I didn’t realy that 5v is missing on pixhawk servo rail. I’ve just ordered the 5v stepup converter and give it a try. I’ll let you know
        thanks again

        • geobduffy

          Hey guys, you only need a standard USB cable for bench testing with a PC and camera. No additional 5v source required. Also, I have both kinds of gentwires and will try with those as well. This has to be something very simple. I wonder if there is a certain firmware on sine SX260 that behave strange.

          • boxerone

            Hi all,
            this is something strange and looks like relateded to some software bug: I build a usb cable with a push button (as described in chdk wiki) to test remote functions alone. This is not even working and I am not able to shoot in mode
            Only when running the script the usb unplug (or one push) produce continous focus and then shoot.
            Any idea??

  7. jagaxiola

    I have a Spektrum AR8000 Rx and Naza V2, in your configuration did you connected the servo connector to your Rx or the APM? I just want turn on the camera with the Tx for the Canon 260 an use the script intervalometer with 2 seconds
    Thank you

    • geobduffy

      Sure, just set the script for 2 second intervals and plug into an RC output that you’ve programmed a Tx switch to trigger. Done

  8. jagaxiola

    Hello everybody, I am new on this, I just received my Eflight controller and soldered to the USB, I follow the step of the video. My question is if the servo connector goes into the Receiver Rx or the APM? Because the Receiver Rx Voltage is more than 15 V.
    Thank you for your help

    • geobduffy

      I don’t think you will want to run 15V into the trigger as it will likely blow the switch and may even damage your camera. If you will be doing mapping, you’ll want the camera to be triggered by the APM based on the CAM_TRIGG_DIST of the particular mission you are running.

  9. FLranch


    I tried what you said and the camera did not trigger when I plugged it into the computer, but then triggered when I unplugged it and continued taking pictures.
    I used STICK software to setup CHDK on the camera and then added the Flight Riot, no interval/remote switch script.See script and link to STICK below.


    @title Remote switch AP
    print “Flight Riot No Delay Interval”

    if is_key “remote” then shoot
    sleep 0
    goto “loop”


    I guess I will try a different method for installing/setting up the CHDK on the camera?

    Thanks for your help.

    • geobduffy

      what camera are you using? Maybe try adding 500 to sleep.
      Also, what are your CHDK remote settings?

      • boxerone

        Hi all! First of all let me thank you for the great and hard work! this site is awsome!
        I have the same exact problem: testing the gentwire cable and your FR script, as soon I disconnect the camera from USB it start shooting continuosly.

        Any idea ?? I am triyng to have my Sx260HS connected to pixhawk.

      • FLranch

        Hi geobduffy,

        Thanks again for your help. I am using a Canon SX260. Under Remote parameters I have:

        Enable remote – on
        Switch type – none
        control mode – none

        then there are other options such as:
        enable synch – off
        enable synch delay – off
        Synch delay 0.1 ms – 100
        enable script start- off
        bracketing in contionous mode- leads to more options

        Are these the correct settings?

        I tried adding the 500 to sleep, but script is still only triggering when I disconnect camera from computer and then continues taking pictures.

        What method do you recommend for installing CHDK? STICK software or different?

        I was also wondering if you could suggest a gimbal for the SX260? We ordered this one from RCTimer:


        however I am finding the board controller install/setup to be very complex, at least for me:) And it also seems pretty big and heavy for our X8 copter.

        I was thinking about trying a simple servo gimbal like this:


        Any thoughts would be much appreciated,Thanks again for all your help.


        • geobduffy

          Boxerone and FLranch,
          I can’t for the life of me replicate what you are experiencing.
          I assume continuous mode is off?
          Also, what mode are you using? I use Tv typically.

          • FLranch


            Hey I am at my wits end trying to figure out what is wrong. I re installed CHDK, still using the STICK software. I was using auto mode but also tried Tv mode, still same problem.
            As far as continuous mode, I am unclear where this setting is?


          • boxerone

            So, I finally figure out that may be some difference in how chdk script is handle by different firmware version camera.
            The problem that I was experiencing stopped immediately after I switch to this very simple script, different from FR simple one

            @title Remote button
            wait_click 1
            is_key k “remote”
            if k=1 then shoot
            goto “loop”

            I just whant to remenber that according to Pixhawk wiring datasheet, there no power at all at the servo rail. So for those who are fling with the 3dr Iris (like I am doing) you must bring 5v from the power distribution board to channel 8 (or any other channel available)

            Thanks FR for sharing the new scripts!

  10. FLranch

    Hi geobduffy,

    I have followed the directions in the video been reading related posts but can still not get my camera to respond to “trigger now”. Our goal is to take small scale aerial imagery at our wildlife research ranch and I am very “new” to this all but learning slowly.

    So we have the RTF X8 copter with pixhawk. I have already made the USB trigger cord with the 5V stepup board. On the pixhawk we only have RC 11-14 available, so I used RC_channel 11 (plug 5). In MP, I have set config>fullpara list> RC11_function to 10 and in gimbal settings I have set Shutter for RC11 with the pwm limits described in video.

    When I try to test the camera and trigger using “trigger camera now”nothing happens, however as soon as I disconnect the battery the script starts??? Any ideas about what I am doing wrong would be greatly appreciated.

    And thank you for this tutorial, even though I haven’t got it completely working yet, it was very helpful.


    • geobduffy

      Interesting. So, a good first test is to plug a normal USB cable into the camera, start the script on the camera, and insert the other end into a PC. The script should trigger the camera.
      If it does not, then something is wrong with the setup on the camera.
      Can you check that?

  11. hovershotspv

    Can not get the camera to fire on test throughout Fixhawk. I can get it to work plugged into RX and using switch…. What am I not doing? What script are you using please. I have the FLA 600 and the spark fun 5v step up

    Thanks for the help

  12. wmedernach

    THANK YOU! I did have the RC7_FUNCTION set to 10, but I had the limits incorrect in the Camera Gimbal tab…
    Couple more questions before I head to the field…

    Now that this ‘Trigger Camera NOW’ is functioning, when you plan a survey grid mission I see it adds the DO_SET_CAM_TRIGG_DIST and sets a distance, and then at the end of the mission is sets it to zero.

    Do you have a method to retract the lenses at the edn of the mission?

    I’m thinking if you set DO_SET_CAM_TRIGG_DIST to something small like 1m, and then adjust the script to watch for 2 bursts and shutdown at that point?


    • geobduffy

      Hi Warren,
      Currently I don’t retract lens before landing but I have a couple ideas that I’d like to test out without getting into PWM scripting, etc. I’ll email you separately on this and then we can share back to FR community as a Post what we figure out.
      BTW, thanks for the donation. Very generous! 🙂

  13. wmedernach

    Hey Brenden, thanks for the video.
    I’m back on this trying to get the cam_trigg_dist functioning properly. I just finished soldering up the step up board onto the cable. When I plug things in, and use your 0 interval script, the camera starts firing right away and continues firing.

    I’m thinking I might have some other params messed up from trying different suggestions from various forums…

    What should the cam-trigg_type param be set to? Servo or Relay?

    I’m trying to think of what other params I might have changed… 😉

    Warren M

    • geobduffy

      Hi Warren,
      Check out the video from :38 and use same settings (10 for RC channel, which is for camera trigger) and use servo limits and shutter values from video as well. The camera will trigger nonstop if servo limits are not set. You’re almost there…

  14. jvhutchisonjr

    I just tested this setup and it works fine manually triggering via MP, but I will have to test cam_trig_dist tomorrow while moving as my gps is so dead on that even setting it to 1 meter and sitting in my den the deviation isn’t enough to trigger it automatically. This setup does not support multiple PWM inputs, just on and off.

  15. jvhutchisonjr

    Hello geobduffy,

    I already have a apm2 trigger cable but have migrated to the pixhawk now. As I currently do not have any of the required hw to trigger via pix, I was wondering if you could provide a schematic on the connections between led controller, step-up board, and camera? Plan to buy the required parts in a week or two and hope this tides me over. And also can this setup function the same as a gentwire rig with pwm to control several different camera functions? I have a chdk script that will allow me 6 different pwm commands.

    • jvhutchisonjr

      Nevermind about the schematic, believe that I can follow it via the video. But am still wanting to know about the rest, thanks.

      • geobduffy

        You’ll find it pretty self explanatory once you have the STEPUP board in hand. I have not tried the gentwire yet but if you want to share the script you are using I will get one and test out the setup. Are you using this on APM? If so, what capabilities are you using with the additional command options?

        • jvhutchisonjr

          I only need multiple functions to start script triggering, stop, and shutdown so the lens retracts.

          The script is the kap from

Submit a Comment

Pin It on Pinterest

Let's stay in touch

Would you like to sign up to receive an occassional newsletter from us.  We'd love to let you know about new and wonderful things happening on the site.  Your details are never shared or sold and we hate spam as much as you do. 

You have Successfully Subscribed!