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_PROTOCOLset to 1.CAN_P1_DRIVERset to 1 (Enable CAN1).CAN_D2_PROTOCOLset to 1.CAN_P2_DRIVERset to 1 (Enable CAN2).GPS_TYPEorGPS_TYPE2set to 9 (enable CAN GPS).
Set the flight control camera shutter
CAM_TRIGG_TYPEset to 0 (0=PWM , 1=relay).CAM_DURATIONset to 10 (Duration that shutter is held open,0~50(1=100ms)).CAM_SERVO_ONset to 1900.CAM_SERVO_OFFset to 1100.CAM_AUTO_ONLYset to 1.SERVO14_FUNCTIONset to 10 (Define the shutter trigger pin, take the flight control AUX6/M14/A14 pin as an example).BRD_PWM_COUNTset 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_ENABLEset to 1 (Enable camera shutter input).UAV_MODEset to 1 (PWM input mode).UAV_DURATIONset to CAM_DURATION (flight control parameters).UAV_SERVO_ONset to CAM_SERVO_ON (flight control parameters).UAV_SERVO_RATEset to SERVO_RATE (flight control parameters).CAM_DURATIONset to 10 (Shutter ON time).CAM_POLARITYset to 0 (0:low,1:high).CAM_FEEDBACK_TYPEset to 1 (1 when the hot shoe triggers to record pos, and 0 when the shutter records pos).CAM_STset to 0 (Shutter compensation time, set to 0 when using hot shoe).
Test shutter trigger
- Trigger with remote control:
RC?_OPTIONset to 9 (?= remote shutter trigger channel; for example, withRC7_OPTIONset 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_ENABLEset to Sensors Automatic Config.
(automatically configure node ID)
Set flight control shutter trigger
TRIG_MODEset to 1.TRIG_INTERFACEset to 4 (PWM).TRIG_PWM_SHOOTset to 1900.TRIG_PWM_NEUTRALset to 1500.TRIG_PINS(trigger pin. If triggering on AUX5 and AUX6, the set value should be 56).TRIG_ACT_TIMEset 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_ENABLEset to 1 (Enable camera shutter input).UAV_MODEset to 1 (PWM).UAV_DURATIONset to TRIG_ACT_TIME/100 (flight control parameters).UAV_SERVO_ONset to TRIG_PWM_SHOOT (flight control parameters).UAV_SERVO_RATEset to PWM_AUX_RATE (flight control parameters).CAM_DURATIONset to 10.CAM_POLARITYset to 0.CAM_FEEDBACK_TYPEset to 1 (1 when the hot shoe triggers to record pos, and 0 when the shutter records pos).CAM_STset to 0 (Shutter compensation time, set to 0 when using hot shoe).

