Skip to content

PWM controlled shutter ​

This article mainly describes the use of PWM to control the camera to take pictures and C-RTK2 to record POS data; the general camera is a relay to trigger the shutter.

ArduPilot firmware ​

NOTE

The flight control parameters are set in MissionPlanner > "Configuration" > All Parameter Table/Parameter Book. After modification, please click the write button on the right and restart the flight control.

Enable UAVCAN

NOTE

The following settings are to enable UAVCAN and provide RTK/navigation data for the flight controller; if you only use C-RTK 2 as PPK, this operation is not required.

  • CAN_D1_PROTOCOL set to 1.
  • CAN_P1_DRIVER set to 1 (Enable CAN1).
  • CAN_D2_PROTOCOL set to 1.
  • CAN_P2_DRIVER set to 1 (Enable CAN2).
  • GPS_TYPE or GPS_TYPE2 set to 9 (enable CAN GPS).

Set the flight control camera shutter

  • CAM_TRIGG_TYPE set to 0 (0=PWM , 1=relay).
  • CAM_DURATION set to 10 (Duration that shutter is held open,0~50(1=100ms)).
  • CAM_SERVO_ON set to 1900.
  • CAM_SERVO_OFF set to 1100.
  • CAM_AUTO_ONLY set to 1.
  • SERVO14_FUNCTION set to 10 (Define the shutter trigger pin, take the flight control AUX6/M14/A14 pin as an example).
  • BRD_PWM_COUNT set to 6 (Take the V5+ A6 pin as an example, the firmware version below AP4.10 does not need to be set in a higher version; it should be equal to or greater than the pin number).

C-RTK2 Parameters ​

When using PWM triggering, you need to modify the following parameters of C-RTK2:

  • UAV_ENABLE set to 1 (Enable camera shutter input).
  • UAV_MODE set to 1 (PWM input mode).
  • UAV_DURATION set to CAM_DURATION (flight control parameters).
  • UAV_SERVO_ON set to CAM_SERVO_ON (flight control parameters).
  • UAV_SERVO_RATE set to SERVO_RATE (flight control parameters).
  • CAM_DURATION set to 10 (Shutter ON time).
  • CAM_POLARITY set to 0 (0:low,1:high).
  • CAM_FEEDBACK_TYPE set to 1 (1 when the hot shoe triggers to record pos, and 0 when the shutter records pos).
  • CAM_ST set to 0 (Shutter compensation time, set to 0 when using hot shoe).

Test shutter trigger

  • Trigger with remote control:
    RC?_OPTION set to 9 (?= remote shutter trigger channel; for example, with RC7_OPTION set to 9, flipping channel 7 high takes a photo; range RC6–RC12).
  • Triggered with a ground station:
    • Missionplanner>Data>Actions, select Trigger_camera, click to execute the action to trigger the camera to take a picture.

PX4 firmware ​

NOTE

The flight control parameters are set in the parameters of QGroundcontrol. After modification, please click the ok button on the right and restart the flight control.

Enable UAVCAN

NOTE

The following settings are to enable UAVCAN and provide RTK/navigation data for the flight controller; if you only use C-RTK 2 as PPK, this operation is not required.

  • UAVCAN_ENABLE set to Sensors Automatic Config.

(automatically configure node ID)

Set flight control shutter trigger

  • TRIG_MODE set to 1.
  • TRIG_INTERFACE set to 4 (PWM).
  • TRIG_PWM_SHOOT set to 1900.
  • TRIG_PWM_NEUTRAL set to 1500.
  • TRIG_PINS (trigger pin. If triggering on AUX5 and AUX6, the set value should be 56).
  • TRIG_ACT_TIME set to 200 (trigger time).

C-RTK2 Parameters ​

When using PWM to control shutter triggering, you need to modify the following parameters of C-RTK2:

  • UAV_ENABLE set to 1 (Enable camera shutter input).
  • UAV_MODE set to 1 (PWM).
  • UAV_DURATION set to TRIG_ACT_TIME/100 (flight control parameters).
  • UAV_SERVO_ON set to TRIG_PWM_SHOOT (flight control parameters).
  • UAV_SERVO_RATE set to PWM_AUX_RATE (flight control parameters).
  • CAM_DURATION set to 10.
  • CAM_POLARITY set to 0.
  • CAM_FEEDBACK_TYPE set to 1 (1 when the hot shoe triggers to record pos, and 0 when the shutter records pos).
  • CAM_ST set to 0 (Shutter compensation time, set to 0 when using hot shoe).