Can't get servo to trigger camera. Help!

I have a Hobby King Nova Pro quadcopter that uses an APM 2.5 or 2.6 that I’m trying to setup for aerial surveying. I have installed a generic 2-axis gimbal/controller, which works fine, and a GoPro-like camera (SJ5000X) in a 3D printed frame I designed to hold the camera and a servo for triggering the camera. I powered the servo with a small 5v BEC, and have its signal wire plugged into A11 on the APM. I’ve set the trigger type to Servo, and the camera trigger port to A11 in mission planner.

I’d like to set the proper servo limits for the camera trigger servo, but I can’t get the servo to move. I have seen it twitch when powering up so I know it has power and is receiving some sort of signal. I tried using the Trigger Camera Here command in the Flight Data map window, and have tried flying a trial survey mission, but the camera trigger servo isn’t taking pictures. I’ve checked the camera and it seems to be set properly.

Does a servo not work for triggering the camera in Copter?

Otherwise, any suggestions?

I’ve already sent for a servo tester with a digital PWM value readout so I can get the right servo limit values needed for my setup. I need help getting the servo to trigger when called on to do so by the APM.

Thanks

There is a diagram here which suggests that to get PWM outputs OUT9 to OUT11 you need to set links on the APM circuit board.

http://ardupilot.org/copter/docs/common-apm25-and-26-overview.html#explanation-of-solder-jumper-options-on-the-bottom-of-the-board

Be sure you power your RC ouputs with an external BEC. APM can’t deliver the power to servos. Be careful to wiring (ie. go read the wiki on APM power schemes)

Thanks for the info, but I am already using an external BEC for the camera trigger servo. I have just the PWM signal wire from the servo connected to the “S” pin of “A11” (the row of 3-pin connectors numbered A0 thru A11 on the board). I don’t think powering the servo is my problem. Thanks!

Thanks - I didn’t know about the solder jumper options associated with A11.

This sounds like it is likely my problem with using A11 for controlling the camera trigger servo. If so, I would have to disassemble the drone and the APM case in the drone to get to the jumper pads, which may be more work than I want to put up with. As an alternative (let me know if this sounds plausible), it may be easier for me to use the AUX1 channel (the left knob on the Nova Pro’s transmitter that controls the gimbal roll) to trigger the camera. I’m using a generic gimbal that has a controller that is able to level the camera in the roll direction without any input - so I can disconnect the roll connector from the gimbal from the base of the drone. I then may be able to just plug the camera servo into the three pins on the base of the drone that my gimbal roll connector was plugged into (this assumes that these pins are sending PWM signals to the generic gimbal controller I’m using, which I’ll have to verify). Also, I’m not sure which of the A0-A10 pins the Nova Pro uses to control the roll of the gimbal, but I’ll have to be able to assign that pin to trigger the camera in the APM. Does this sound plausible???

Thanks!

My knowledge of the APM isnt that great so I guess the only way is to try it out :slight_smile:
As regards the jumper pads, I would guess they are only inputs to the APM that are read at startup, in which case it would theoretically be possible to modify the source code to get the functionality you want without having to remove the APM from your copter.
This is all speculation of course. It would require examining the source code to find out the truth of it. Unfortunately I have many other things to do currently, but for anyone interested the last APM compatible source code is on the master-AVR branch:

Thanks for your thoughts. My coding interests are limited, so I usually look for the “path of least resistance.” I’m thinking of trying what I said earlier with respect to the gimbal’s roll channel. Another option may be verifying the default function of A11 with an oscilloscope (I currently assume it’s digital; i.e., high/low since I don’t seem to be getting PWM), and maybe using a PIC microprocessor to covert the available on/off signal to the properly scaled PWM signal.

I had hoped that by selecting “Servo” as the camera trigger method in Mission Planner, the output of A11 would have been “set” to PWM. So far, that doesn’t seem to be the case,

Thanks again for your thoughts.

Sorry to waste everyone’s time on this, but everything appears to be working as needed. I just thought it wasn’t working.

I had everything connected properly, but had the PWM limit parameters set so close that the servo’s control arm wasn’t moving. There is no need to fiddle with the solder pads mentioned in an earlier post to get the APM to issue PWM to A11. Apparently, the APM already does this as I hoped/assumed.

I put an oscilloscope on the signal pin of A11 and was delighted to see a square wave whose width changed when I issued the Trigger Camera Here command in Mission Planner. All I had to do was set the proper PWM values for “Pushed” and “Not Pushed” to get the servo to trigger the camera. I used a servo tester with a digital readout of PWM to determine the proper PWM values for my setup.

My next steps are to fly a photo mission issuing Trigger Camera Here commands in Mission Planner, followed by programming and flying a survey mission. If I get photos from these tests I can focus on tweaking the camera settings for best results.

Thanks for all the helpful suggestions!


Great that it is working. Certainly not a waste of time. I am sure that many people will find this interesting, especially now that it is working:)

Ok, here’s an update.

Although I seem to have all the hardware hooked up right and the software set so I can trigger the camera with the servo using the Trigger Camera Now command, my drone isn’t taking photos during a survey mission. I have flown three surveys created with Auto WP command, and all my hardware and software settings appear to be set properly, but I’m not getting any photos when I fly the mission. There must be some other setting that isn’t well documented and I’m missing it.

Once again, I’m using a HobbyKing Nova Pro quad that has an APM 2.5 or 2.6 autopilot and I have it setup to trigger the camera with a servo. I can take individual photos using the Trigger Camera Now command, but the APM isn’t taking photos during an autonomous survey mission. I’ve spent hours trying to figure out what’s wrong, but I’m stuck.

I have attached a Zip file containing a screen shot, WPs, Logs, etc. for one of the survey missions I’ve flown in case that info may help identify my problem. I’m hoping someone knows the secret, or has the time to help me sort this out.

Any thoughts?

Thanks!

Logs.zip (1.2 MB)

Hello,
you are using the command in your mission script “do repeat servo”. Why not to use the command “do set servo” instead ?
Maybe it does not make a difference, just shooting in the dark here.
Also personally I would have used another approach as I explain in this blog, using the “cam-trig” method instead:

We use “DO_DIGICAM_” to operate the camera with good success.
Canon alpha series and Ricoh GX’s

I think I’m posting this in two places on this website, but…

Thanks for the help everyone. I have it figured it out, flew a survey mission, and got photos!

This was my problem (to close the loop on this for others who may struggle with the same problem):

I assumed that when I set the servo limits for PUSHED and NOT PUSHED on the INITIAL SETUP / OPTIONAL HARDWARE / GIMBAL tab, that that was all I needed to do, but, apparently those settings only work with the TAKE PHOTO NOW command, which is accessible in the pop-up list that you get when you right click on the live site map in Mission Planner. The servo seemed to work fine with the TAKE PHOTO NOW command, so I assumed that I was all set - not so!

I also need to adjust other settings for the APM to activate the servo during a mission. In Flight Plan I had to right clicked in the area that I wanted to survey and selected DRAW POLYGON / ADD POINT and create a polygon of the area I wanted to survey. Then I had to right click within the polygon and select AUTO WP / SURVEY (GRID), which brought up the survey aerial map and settings, including the camera settings. NOTE: You have to make sure the ADVANCED OPTIONS check box is checked on the SIMPLE tab for the next part. I then selected the CAMERA CONFIG tab, and then selected one of the TRIGGER METHODs at the bottom of the tab’s dialog box (see screen shot below). I selected the DO_REPEAT_SERVO “radio button,” and entered SERVO 11 (since my camera trigger servo is plugged into RC11 on the APM), PWM 1645 (which is right for my servo setup), and I left the CYCLE TIME (S) at the default of 2 (which I assume is how fast the camera can cycle between photos). These settings are the additional settings I needed to tweak to get the APM to take photos during a mission.

Everything seems to be fine now, but I noticed that the TRIGGER METHOD settings aren’t saved so I assume I have to reenter these for every mission (please verify if this is right and you know, or tell me how to make is so I don’t have to reenter these values).

In any case, I can move on to figuring out the rest of the workflow; i.e., geotagging the photos and post-processing them into a point cloud, etc. My next stop is…

http://ardupilot.org/copter/docs/common-geotagging-images-with-mission-planner.html

Thanks again for your help!

Thanks for the suggestions Hugues.

I chose to use a servo because it’s inexpensive ($5) and I didn’t want to
hack into my camera to make an electrical connection - I have a mechanical
connection. I also wanted to make the setup as elegant, modular and
generic as possible because I plan to use it on 3 to 5 drones. My system
seems to work in that I can issue a Trigger Camera Now command it it takes
a photo. However, it’s not working with Auto WP created survey missions so
I assume something is wrong with the mission created by Mission Planner, or
I have some setting wrong.

The Auto WP function uses the Do Repeat Servo command, not me. I hope I
don’t have to revise the automatically created survey mission to make this
work. That would be a pain as often as I plan to do this.

Thanks again for your interest and suggestions. I’ll review your blog.

Gary

Hi,

I have a pixhawk 4 holybro and I set it up with firmware that I downloaded from qgroundcontrol but with missionplanner.

  1. I set it up with mission planner as i coudn’t set up the bheli_s escs with the qgroundcontrol .

  2. I have a problem setting up the shutter in mission planner for a mapir camera survey2.

Could you please help me as to how I can set up the camera fucntion

Thank you very much!

Topometrics,

Sorry I can’t help. I gave up on the mechanical way of triggering the camera. In fact, I gave up on the drone and bought a DGI Mavic Pro, which works fine.

Here is the place to start.

Follow the setup through from the start.
I build survey drones and this works with them all.