Wiring problem

Hi.

I am struggling with the problem of correctly wiring all servos in my fixed wing plane. I use Holybro Pixhawk 4 and I want to configure servos for my own build where I have two ailerons servos left and right and two servos for elevator.

Airframe reference in the documentation specify how to connect servos, but I want to change IDs of these servos or simply double output for e.g. two servos of elevator. How can I do that?

Another problem which occured is trimming issue. I read the documentation but I it isn’t a good explanation for me. Could someone guide me how can I do it?

Hi @pilotel,

I think this tutorial should solve your problems. Adding a New Airframe Configuration | PX4 User Guide

In short, these adjustments are essential:
Mixer issue
According to the px4 guide you need to create your own mixer file. You can derivate it from this file. Simply by copping and editing corresponding parts.

Trimming
Then the trimming should be done in PX4 parameters. Parameter PWM_MAIN_TRIMx.

1 Like

Thank you for your answer @roman-dvorak. If I understand correctly after copping and editing corresponding parts I will have to build pixhawk firmware and write it to the pixhawk?

I cannot understand values all values in the mixer file. My aim is to create output for left and right ailerons with differential movement of them. Could you give me some clues?

Is there possibility to watch changes I’ve made in realtime to the parameters about TRIM?

You can do it in firmware (and compile it, flash it, …) but it’s very tedious. For start, it’s better to edit the file on the SD card. In (/etc/mixers/<mixer_name>.main.mix)

Parameters/values in mixer file are very detaily described here:
https://docs.px4.io/master/en/concept/mixing.html#summing_mixer

If you don’t know, try sending a sample of your code.

But if you want to change the direction of rotation, you can do so by adjusting the mixer so that you negate the first two values in corresponding row.

The second way is reverse rotation by parameter. There is a parameter PWM_MAIN_REVx.

Yes it is. Trim values are applied in immediately to PWM outputs.