Triggering a Camera: APM or Arduino

Hi Guys,

A quick question. Has anyone programmed APM for a camera trigger?

Basically, I need to send out +5V when camera must trigger for 250ms and send 0V otherwise.

The problem I have is:

digitalWrite does not seem to work on APM output pins.

APM.OutputCh(PWM_Pulse) does not seem to do the job.

APM_Camera library in APM also does not help me here.

Am I going wrong somewhere? Any clue is appreciated.

Thanks.

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

Join diydrones

Email me when people reply –

Replies

  • This reply was deleted.
    • Hi Adam,

      To your question:

      Yes, it was in the Arducopter Arduino code.

      Hardware

      I used a simple thyristor circuit in between APM and DLSR camera. I attached that to the DLSR camera to trigger the photo. I send a simple high digital pulse (5V when high, 0V when low) to trigger the camera (Camera should be on before you fly).. The pulse is about 220ms wide and helps to take a snapshot. I think you can use one of the output pins of APM/ Pixhawk. Google it, enough information on using camera trigger should be online.

      Software

      Regarding the code, I will make it easy for you.

      1. Define a function 'CameraTrigger(..)' in Usercode.pde (This is usually where users can edit their code, without messing up the rest of the code in Arducopter. If you don't understand the code very well, this is the place to write your own functions).

      2. Call this function you defined in this file, from 'commands_logic.pde'

      3. In 'commands_logic.pde', find the function 'verify_nav_wp()'. This function is triggered whenever a waypoint is hit. It is basically a verification check that is hit when the quadcopter reaches the 'waypoint radius zone'.  Call your camera trigger code CameraTrigger(..) from here - basically, make a function call.

      Does that sound simple enough ;)?

      Regards,

      Shyam

  • +2

  • Does the camera triggering work in Arduplane 2.7?

    We can't seem to get it to function.

  • In some cases it is desirable to retract the lens during takeoff and landing. I just solved this using CHDK. See the blog post here:

    http://fpvlab.com/forums/showthread.php?11357-Scripting-Canon-SX230...

    Note that this is a stock SX230 with no modifications.

  • The camera triggering has been broken for some time.

    It is proposed that it be fixed in 2.9.

    The mission scripting still works using the relay in APM1, not sure what's working with APM2.5 as nothing I have tried has anything working.

This reply was deleted.

Activity

Jose Araujo liked Jose Araujo's profile
Aug 29
spencer harvey liked spencer harvey's profile
Jul 9
More…