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

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 =1
  • CAN_P1_DRIVER =1(Enable CAN1)
  • CAN_D2_PROTOCOL =1
  • CAN_P2_DRIVER =1(Enable CAN2)
  • GPS_TYPE =9 or GPS_TYPE2= 9(Enable CAN GPS)

Set the flight control camera shutter

  • CAM_TRIGG_TYPE=0(0=PWM ,1=relay)
  • CAM_DURATION=10(uration that shutter is held open,0~50(1=100ms))
  • CAM_SERVO_ON=1900
  • CAM_SERVO_OFF=1100
  • CAM_AUTO_ONLY=1
  • Servo14_Function=10(Define the shutter trigger pin, take the flight control AUX6/M14/A14 pin as an example)
  • BRD_PWM_COUNT=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=1(Enable camera shutter input)
  • UAV_MODE=1(PWM input mode)
  • UAV_DURATION=CAM_DURATION(flight control parameters)
  • UAV_SERVO_ON=CAM_SERVO_ON(flight control parameters)
  • UAV_SERVO_RATE=SERVO_RATE(flight control parameters)
  • CAM_DURATION=10(Shutter ON time)
  • CAM_POLARITY=0(0:low,1:high)
  • CAM_FEEDBACK_TYPE=1(1 when the hot shoe triggers to record pos, and 0 when the shutter records pos)
  • CAM_ST=0(Shutter compensation time, set to 0 when using hot shoe)

Test shutter trigger

  • Trigger with remote control:
    RC?_OPTION=9(?= Remote control shutter trigger channel, such as RC7_OPTION=9, then the remote control channel 7 is set to high to take a photo, the range is 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

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=Sensors Automatic Config (automatically configure node iD)

Set flight control shutter trigger

  • TRIG_MODE=1
  • TRIG_INTERFACE=4 (PWM)
  • TRIG_PWM_SHOOT=1900
  • TRIG_PWM_NEUTRAL=1500
  • TRIG_PINS=?(trigger pin. If triggering on AUX5 and AUX6, the set value should be 56)
  • TRIG_ACT_TIME=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=1(Enable camera shutter input)
  • UAV_MODE=1(PWM)
  • UAV_DURATION=TRIG_ACT_TIME/100(flight control parameters)
  • UAV_SERVO_ON=TRIG_PWM_SHOOT(flight control parameters)
  • UAV_SERVO_RATE=PWM_AUX_RATE(flight control parameters)
  • CAM_DURATION=10
  • CAM_POLARITY=0
  • CAM_FEEDBACK_TYPE=11 when the hot shoe triggers to record pos, and 0 when the shutter records pos)
  • CAM_ST=0(Shutter compensation time, set to 0 when using hot shoe)

results matching ""

    No results matching ""