How to use servo in pixhawk?

Hi guys
I am currently trying to use User-Hooks to control a servo with aux channel but i don’t know how to use these channel

how can i use aux output channel?


Hi hamid

In QGroundControl you can configure the parameters directly. I think your needed AUX Channel setting is in RC_MAP_AUX#, where you can select your RC# Channel input. If I don’t forget, I’ll post a screenshot tonight.

Here is the screenshot where you can define an input RC Channel from your transmitter:

1 Like


I’ve been trying to set this up for a while now, but I never seem to get anywhere. Here’s what I’ve done…

  1. setup my Futaba R7008SB to output all channels on S.BUS (receiver mode B)
  2. setup QGC to map AUX_1 thru 5 to receiver channels 6-10 respectively (as you show in the image above)
  3. plugged a servo into the Futaba receiver on channel 6, and another servo into Pixhawk AUX_1

Finally, switching the servo on the transmitter triggers the servo on the receiver, but not the one on the copter. Is there something I’m missing. I’m running the latest master branch of PX4, but getting nowhere with it.

Any ideas?

Jason Evans

Hi Hamid,

Can you elaborate on what you mean by “User-Hooks”? I’m trying to do the same thing you are, but having issues.

Jason Evans

I figured it out. I did not realize that the power rail on the Pixhawk does not provide 5v. Once I powered my servo from a battery and connected the control line to the AUX port it worked perfectly. This is the article that clued me in on my issue:

I need to get my volt meter back from my friend, so I can diagnose these things myself. :slight_smile:

1 Like

I tryed these steps but i am not geting pwm signal at AUX1, I am trying to paas signal through AUX1 when i switch on my Futuba RC CH9.

Have you also powered the MAIN or AUX rail with a 5V source, for example using a 5v BEC? So for example if you just plug in your servo to a MAIN motor port (for testing :slight_smile: ), is the servo moving?

I assigned AUX1 to AUX5 from channel 6 to channel 10 respectively with my Futuba RC and i connected one by one AUX1 to AUX5 with Oscilloscope for test pwm signal is coming or not when i am switching my RC channel, but in Oscilloscope it always showing one fixed PWM signal, I am not able to get PWM signal from any AUX.

I want PWM signal when i will switch my RC channel.

AUX mixer setting may be needed if your Airframe does not use AUX outputs.

Still I am facing same problem…??

What is the type of Airframe? e.g. DJI F450 quadcopter

Quad-copter X Genric. Is in this configuration AUX output not available?

Yes, it is. AUX mixer is not set in the quadcopter X generic airframe setting.

In which quad X frame i will get aux output…I tried many times in many different frames…

There is no quad X frame which has Aux output.
But you can change the software like this:

At the end of this file, insert the following sentences:

set MIXER_AUX pass
set PWM_AUX_OUT 12345

And then build and upload firmware.

Have you tried Mount to Enable MNT_DO_STAB ? See full documentation here.

Good luck.

I inserted code as you told me
when i am building firmware code some error is coming

What error is it? and following infos are needed for me to solve it if you want.
Error message:
PX4 version:
PC OS version:
Pixhawk version:

This file has been moved to here.