Brushless PWM Gimbal¶
Many camera gimbals can accept PWM input or SBUS input for controlling the roll, pitch and yaw angles. This page describes the setup procedure to allow ArduPilot to control these gimbals.
Warning
These instructions are for ArduPilot 4.3 (and higher). For ArduPilot 4.2 (and lower) please refer to the Servo Gimbal instructions.
Supported Gimbals¶
Gimbals that accept PWM input or SBUS input to control the gimbal’s lean angle should work.
Some gimbals accept PWM or SBUS input but only provide rate control. These gimbals will not work by default but it may be possible, using the gimbal’s configuration application, to configure them to interpret the input for angle control.
The list of supported gimbals is a work-in-progress. If you would like to add a gimbal that is known to work, please raise an issue
Connecting to the Autopilot¶
If the gimbal has multiple PWM input ports (one for each axis), connect them to the autopilot PWM output channels. If the gimbal accepts SBUS input then connect it to the autopilot’s SBUSo (aka “SBus output”) port.
Connect to the autopilot with a ground station and set the following parameters. These settings assume the autopilot’s PWM outputs 9, 10 and 11 will control the gimbal’s roll, pitch and yaw angles respectively. They also assume common angular ranges of the gimbal which may need adjusting to match the actual gimbal being used.
MNT1_TYPE to 7 (BrushlessPWM) and reboot the autopilot
MNT1_PITCH_MIN to -90 (meaning the gimbal can pitch straight downwards)
MNT1_PITCH_MAX to 25 (meaning the gimbal can pitch up by 25 deg)
MNT1_ROLL_MIN to -30 (meaning the gimbal can roll right 30 deg)
MNT1_ROLL_MAX to 30 (meaning the gimbal can roll left 30 deg)
MNT1_YAW_MIN to -180 (meaning the gimbal can yaw to the left 180deg)
MNT1_YAW_MAX to 180 (meaning the gimbal can yaw to the right 180deg)
MNT1_RC_RATE to 90 (deg/s) to control speed of gimbal when using RC targeting. If RC value is intended to control the ANGLE, then set it to 0.
SERVO9_FUNCTION to 8 (Mount1 Roll)
SERVO10_FUNCTION to 7 (Mount1 Pitch)
SERVO11_FUNCTION to 6 (Mount1 Yaw)
Optional¶
To allow pilot RC transmitter control of the gimbal:
RC6_OPTION = 213 (“Mount Pitch”) to control the gimbal’s pitch angle with RC channel 6
RC7_OPTION = 214 (“Mount Yaw”) to control the gimbal’s yaw angle with RC channel 7
RC8_OPTION = 163 (“Mount Yaw Lock”) to switch between normal yaw operation and locking mount heading with RC channel 8 (in RC Targeting mode only).
RC9_OPTION = 185 (“Mount RP Lock”) to switch between three modes of earth frame/body frame locks for the roll and pitch axis in RC targeting mode.
Mount RP Lock Switch Position |
Roll EF/BF |
Pitch EF/BF |
Description |
|---|---|---|---|
LOW |
BF |
BF |
FPV lock: pitch/roll RC sets locked angle with respect to mount;useful when flying via gimbal camera |
MID |
BF |
EF |
Pitch lock: roll RC sets locked angle with respect to mount |
HIGH |
EF |
EF |
Horizon lock: pitch/roll RC sets locked angle with respect to horizon |
BF = Body frame, EF = Earth Frame
Note
for full FPV lock the yaw axis should not be forced to Earth frame by a Mount Yaw Lock switch. See Gimbal / Mount Controls for more information on mount modes, pilot/autopilot targeting controls, and axes locks.
setting MNT1_OPTIONS bit 2 (value +4) can be used to for force FPV lock as given in the above table without the need for RC switches when in RC Targeting Mount Mode.
Configuring the Gimbal¶
Connect the gimbal to your PC and using its configuration application
if using SBUS input set the input channels to match the output channels from the autopilot
set roll angle input to input to channel 9
set pitch angle input to input to channel 10
set yaw angle input to input to channel 11
If the gimbal supports “lock” and “follow” yaw control it should be configured for “follow”.
Control and Testing¶
See Gimbal / Mount Controls for details on how to control the gimbal using RC, GCS or Auto mode mission commands