How to use servo in pixhawk?

#1

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?

thanks

#2

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.

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

1 Like
#3

Hi,

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?

Thanks,
Jason Evans

#4

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.

Thanks,
Jason Evans

#5

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:

#6

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.

#7

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?

#8

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.

#9

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

#10

Still I am facing same problem…??

#11

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

#12

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

#13

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

#14

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

#15

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

At the end of this file https://github.com/PX4/Firmware/blob/master/ROMFS/px4fmu_common/init.d/4001_quad_x, insert the following sentences:

set MIXER_AUX pass
set PWM_AUX_OUT 12345

And then build and upload firmware.

#16

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

Good luck.

#17

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

#18

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: