# Example configuration with passthrough mixing for gimbal control

**URL:** <https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602>\
**Category:** PX4 Autopilot\
**Created:** [June 15, 2016, 11:37am UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602 "2016-06-15T11:37:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gianni-carbone](https://discuss.px4.io/letter_avatar_proxy/v4/letter/g/54ee81/32.png) [@gianni-carbone](https://discuss.px4.io/u/gianni-carbone)\
**Post date:** [June 15, 2016, 11:37am UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602/1 "2016-06-15T11:37:59Z")

</div>

Hello everybody,

I’m trying to control the gimbal using the channel 7 of my RC.  
Honestly I’m a bit confused with mixer setup.  
I cannot do the work. My target is very simple I would set the gimbal pitch using channel 7 of my RC.

I’m using master branch 2016-06-10 21:00. I normaly run master branch weekly refreshed.

system config is  
mc quadcopter  
Hardware Pixhawk HK clone

SYS\_AUTOSTART = 4001  
RC\_MAP\_AUX1 = Channel 7

/etc/init.d/4001\_quad\_x:  
sh /etc/init.d/rc.mc\_defaults  
set MIXER quad\_x  
set PWM\_OUT 1234

/etc/mixer/quad\_x.main.mix:  
R: 4x 10000 10000 10000 0  
M: 1  
O: 10000 10000 0 -10000 10000  
S: 3 5 10000 10000 0 -10000 10000  
M: 1  
O: 10000 10000 0 -10000 10000  
S: 3 6 10000 10000 0 -10000 10000

extras.txt (in the SD card):  
frsky\_telemetry start  
gpio\_led start -p 4

Please can anybody help me and tell me if this configuration is good for the scope and where the pass through channel will be outputted?  
I tryed to use AUX outputs but there is a fixed lenght PWM  
while on the free master outpust (5 through 8) no signal is present.

Any help is appreciated.  
Thank you very much.  
Gianni

---

<div class="post-metadata">

**Author:** ![thedevleon](https://discuss.px4.io/letter_avatar_proxy/v4/letter/t/3ec8ea/32.png) [@thedevleon](https://discuss.px4.io/u/thedevleon)\
**Post date:** [June 15, 2016, 4:37pm UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602/2 "2016-06-15T16:37:09Z")

</div>

You won’t see any output on the main outputs, because it’s PWM\_OUT is only set to 1234 (instead of 123456).

However the rc.mc\_defaults script also sets an AUX mixer, which looks like this:

```
# Manual pass through mixer for servo outputs 1-4

# AUX1 channel (select RC channel with RC_MAP_AUX1 param)
M: 1
O: 10000 10000 0 -10000 10000
S: 3 5 10000 10000 0 -10000 10000

# AUX2 channel (select RC channel with RC_MAP_AUX2 param)
M: 1
O: 10000 10000 0 -10000 10000
S: 3 6 10000 10000 0 -10000 10000

# AUX3 channel (select RC channel with RC_MAP_AUX3 param)
M: 1
O: 10000 10000 0 -10000 10000
S: 3 7 10000 10000 0 -10000 10000

# FLAPS channel (select RC channel with RC_MAP_FLAPS param)
M: 1
O: 10000 10000 0 -10000 10000
S: 3 4 10000 10000 0 -10000 10000

```

As you can see, AUX1, AUX2 and AUX3 **inputs** are passed through to the first, second and third AUX **outputs** - so try hooking up your gimbal to that.

As a side note, I’m also working on implementing on [much more advanced gimbal control](https://github.com/PX4/Firmware/pull/4624) so keep a look out for that in the future 🙂

---

<div class="post-metadata">

**Author:** ![gianni-carbone](https://discuss.px4.io/letter_avatar_proxy/v4/letter/g/54ee81/32.png) [@gianni-carbone](https://discuss.px4.io/u/gianni-carbone)\
**Post date:** [June 19, 2016, 6:41pm UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602/3 "2016-06-19T18:41:50Z")

</div>

Leon,  
Many thanks for your answer.  
at the moment I’m using the master branch on a pixhawk HK clone and my startup show this:  
…  
INFO [init] Multicopter  
INFO [init] Mixer: /etc/mixers/quad\_x.main.mix on /dev/pwm\_output0  
INFO [init] Mixer: /etc/mixers/pass.aux.mix on /dev/pwm\_output1  
INFO [init] Addons script: /fs/microsd/etc/extras.txt  
WARN [gpio\_led] start, using pin: AUX OUT 4  
INFO [frsky\_telemetry] sending FrSky D type telemetry

In qground control I’ve settled AUX1\_PASSTHROUGH\_CHANNEL = 7  
but connecting a servo to AUX1 the servo stays locked in neutal position. The channel monitor shows me that the channel 7 is working (change with knob rotation)  
What could be wrong?  
I would also say that you are doing a good job with the vmount driver. Hoping your PR will be soon pulled into the master.  
Thank you for your attention.  
Gianni

---

<div class="post-metadata">

**Author:** ![thedevleon](https://discuss.px4.io/letter_avatar_proxy/v4/letter/t/3ec8ea/32.png) [@thedevleon](https://discuss.px4.io/u/thedevleon)\
**Post date:** [June 19, 2016, 9:34pm UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602/4 "2016-06-19T21:34:33Z")

</div>

Gianni,

you’re welcome and thanks 🙂

I’ve never actually heard of AUX1\_PASSTHROUGH\_CHANNEL, and I can’t find anything referencing it in the source from a quick github search.

I think the parameters you should be using are the ones that start with RC\_MAP\_AUX.  
(RC\_MAP\_AUX1, RC\_MAP\_AUX2, RC\_MAP\_AUX3 etc…).

Also you have to know that you won’t see any output from the mixers until you have pressed the safety switch.

---

<div class="post-metadata">

**Author:** ![gianni-carbone](https://discuss.px4.io/letter_avatar_proxy/v4/letter/g/54ee81/32.png) [@gianni-carbone](https://discuss.px4.io/u/gianni-carbone)\
**Post date:** [June 19, 2016, 9:41pm UTC](https://discuss.px4.io/t/example-configuration-with-passthrough-mixing-for-gimbal-control/602/5 "2016-06-19T21:41:49Z")

</div>

Leon,  
sorry for the parameter name it was the description in qgc.  
And yes now it works I always try before while disarmed.  
Thank you very very much!  
I can arange the gimbal control, but how I sayed above I hope your work will be pulled in master as soon as possible.  
Thank you again.  
Gianni
