Using AUX pins as relays for CHDK

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?

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

Join diydrones

Email me when people reply –

Replies

                  • Hi @Martin Poller I had no joy with that switch.  I ended up using this one http://www.e-fliterc.com/Products/Default.aspx?ProdID=EFLA600 and it worked fine.  Just supply 5v to your servo rail and it works.  I used rc7 output on the pixhawk.

                  • Hopefully it is Martin, I am about to use the same unit.

  • I have this working as a relay in APM Plane, but I am unable to use a channel to trigger the camera.  I have set RC7_function to 10: camera_trigger and channel 7 assigned to a switch, but it doesn't trigger the camera.  The camera triggers fine based on distance.  Plane doesn't have the channel 7 option setting like copter.

    Anyone have an idea?

  • Like others, I was disappointed with the performance of my Canon S100 camera on my hexacopter (Tarot 680 Pro with RC Timer ASP gimbal) so I decided to do some testing on the S100 and a couple other Canon cameras. I ran a couple of series of 10 photos of the same scene using the S100 from the hexacopter while in flight. Only about 20% of the photos were usable, the rest were blurry. When I did a flight of the same scene using the S100’s HD video mode I could see the problem. There was some type of resonance with the vibration of the hex as the props when in and out of phase. The video cycled from sharp to blurry and back, with the blurry part being about 80% of the cycle.

    One previous member suspected that the lens barrel might be rattling around since it’s loose. I tried taping the barrel to prevent it from moving but there was no change. I also tried adding a 100 gram weight to the gimbal thinking that the added mass might change the dynamics of the gimbal. There was no change, still only 20% good images.

    In researching Canon cameras, I found that the A2300 does not have optical image stabilization and there is a version of CHDK available for it. I purchased one off eBay and loaded it up with CHDK 1.2 Alpha. The 1.2 version of CHDK on the A2300 is buggy, so I tried the current development version of 1.3, it works perfectly. I tried the same scene shot from the hex and got pretty good jpg photos. The RAW (DNG) photos have the potential for better quality but they take a lot of processing to get anywhere close to the jpg photos. Using Photoshop RAW, I was able to get close to the jpg quality but not equal it. The A2300 does have some limitations. It doesn’t have a normal iris. It has an ND filter so you can get either f2.8 or f7.9, nothing in between. I set it for 1/1000 second and locked out the ND filter, then used the manual ISO setting for exposure control. See the attached image labeled A2300.

    One other member said they got good results using the Canon S90 so I bought one of those on eBay. Unfortunately results were similar to the S100 so the S90 is going back on eBay. See the attached image labeled S90.

    I considered, briefly, trying out the Canon Powershot G series. The G9 is the most recent version that does not have optical IS and has a version of CHDK, unfortunately Adobe Camera Raw doesn’t have a preset for it. Camera Raw G series presets start with G10, but the G10 has optical image stabilization. I may still try out a G9 just to see how much improvement there is and if it’s worth the extra 200 grams weight. But for that extra weight I could just as well go for one of the versions of the NEX and have HD video also.

    A2300.jpg

    S90.jpg

    Hex.JPG

    https://storage.ning.com/topology/rest/1.0/file/get/3701799758?profile=original
    • T3

      Compared to your S90 photos my S110 NADIR ones are (much) less blurred - no matter if mounted fixed or using a gimbal.  Maybe your mount is not soft enough. Not sure how hard/soft the dampers are but it might be worth to try with 4 or 8 instead of 12.

      • I might try that at some point. I've been disappointed by the noise in the pixels of the A2300 so I've purchased an SD900 to try out. If that fails I'll try popping out some of the dampers to see what difference it makes with my S100. I hate to do that because they were tricky to get in.

    • I just discovered I was wrong about the G9 not having Optical IS, it does so it's not a viable camera for a hexacopter.

  • T3

    Hi all,

    here is my layout based on Marco's circuit:

    3701797887?profile=original

    I hope it helps. Since there is no "official" solution so far, maybe someone can put this on the wiki page.

    Kind regards,

    Thorsten

    • You might consider adding an LED/resistor across the output for trouble shooting. It's sometimes hard to tell if there is a problem with the Pixhawk configuration or the camera configuration. There's an intermittent problem that CAM_TRIGG_Type will sometimes be reset to "0" from "1" and the LED helps troubleshoot that problem.

This reply was deleted.

Activity