General Purpose servo action setup

From UgCS
Jump to: navigation, search

Main Page UgCS Connecting UgCS and DJI A2, Naza-M v2, Phantom 2, Wookong-M

Download this page as a PDF file


DJI A2 and Wookong autopilots support general purpose servo action. It can be used to trigger camera. It requires a device which can trigger camera remotely. Possible solutions:

• Gimbal with camera trigger connector built in, which supports PWM signal. (For example: Zenmuse Z15)

• Stand alone device to trigger camera via PWM signal (For example)

Steps to configure camera trigger for use with UgCS mission flight:

• Connect gimbal or triggering device to general purpose servo output on autopilot: – A2: output "F2" – Wookong: output "F1" (Consult DJI autopilot manual for more details on how to use GP servo outputs.)

• Configure the servo action in configuration file. By default the "vehicle.dji.trigger_action" parameter in vsmdji.conf file is set to -1000, 1000, for additional configuration see Configuring trigger_action parameters in vsm-dji.conf below.

• Create a mission with waypoint actions Camera-mode Single-shot.

More information about turning modes and supporting autopilots can be found Here.

Configuring trigger action parameters in vsm-dji.conf

Parameter trigger action accepts seven comma separated integers.

Parameter number Range Description
1 -1000..1000 Default servo position
2 -1000..1000 1st servo position on action
3 0..9 seconds to hold 1st servo position
4 -1000..1000 2nd servo position on action
5 0..9 seconds to hold 2nd servo position
6 -1000..1000 3rd servo position on action
7 0..9 seconds to hold 3rd servo position


If the trigger needs only 1 servo position change then last 4 parameters can be omitted.
Example:
The following line in vsm-dji.conf:
vehicle.dji.trigger_action = 100, -200, 1
Produces the behavior:

• Autopilot will keep the GP servo at position 100 during the whole mission.

• On each waypoint which has the "Camera-mode: Single-shot" action the connected servo will:
– move to position -200,
– wait 1 second,
– move back to position 100.