Example configuration with passthrough mixing for gimbal control

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

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 so keep a look out for that in the future :slight_smile:

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

Gianni,

you’re welcome and thanks :slight_smile:

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.

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

1 Like