Pwm servo setup

Hello. Can someone point me in the direction for setting up a pwm servo motor to be operated via qgroundcontrol?

Hi @BryanGT -
QGround Control is a ground control station for autopilots- it isn’t intended for standalone use! Can you share what type of autopilot / vehicle you’re working with? If using ArduSub, three servo channels are available for button-based control of peripherals, you can find instructions here.

1 Like

Hi we have a blueboat. Still getting used to everything so forgive my ignorance.

I can see in BlueOS that I can setup Pwm outputs, but unsure how to send commands to the boat as to how to acruate the servos?

We have the pwm servo connected to the 16 channel on the pwm rail on the navigator board

Hi @BryanGT -
The BlueBoat does not have the same easy servo control ability that ArduSub does. This thread gives information on how to setup control for PWM outputs on ArduRover.

Hi Tony - making some progress but further help would be appreciated.

I have managed to setup a custom json action file to display the buttons on the action menu in QGroundcontrol

Here is a copy of the script

this is the error we get when triggered

Not fully understanding what to do next we would appreciate some input.

Our servo has a PWM as bellow. We are only looking to actuate it through 180 degrees to trigger a water sampler. so max 2500, min 500

We obviously need to input these figures into the script which i assume is param2?

But what we are unsure of is what links what is in the script to the physical output on the 16 channel PWM rail? Where do we input that the servo is connected to a specific channel?

PWM servo is currently connected to PWM Output 5


This means the autopilot has rejected the command.

To use SET_SERVO commands in ArduRover you need to first set the corresponding SERVOn_FUNCTION parameter to Disabled (0). If that doesn’t resolve the issue then you may need to check that the command you’re trying to send is within your configured SERVOn_MIN/MAX limits.

I seem to have forgotten to mention those points in my initial instructions - sorry!

Per the message specification:


Another potential gotcha is that the power rail on the Navigator’s servo output header is powered from V (Aux), to allow for powering servo motors and the like without drawing from the Raspberry Pi’s power and risking under-powering the onboard computer (which can cause it to unexpectedly restart).

If you’re not supplying 5V to the AUX 5V header (which from your second-last screenshot it looks like you’re not) then the servo may be receiving a signal but not any power, in which case you won’t get warnings from the autopilot / in QGC, but your servo will stay still.

1 Like