Controlling more than 8 motors simultaneously using custom mixer


First question here and I’m still learning so please bear with me. I was wondering about the pin order of the PWM outputs on the Pixhawk for the dodeca-copter layout. I’ve been reviewing the code to the best of my ability, but from what I can see the mixer for the top and bottom rotors of the dodeca seem to be separated into two separate mixers, one using the Main outputs and the other one using the Aux outputs.

The config file “24001_dodeca_cox” in init.d ( sets the Main mixer “dodeca_top_cox” and the Aux mixer “dodeca_bottom_cox”, which both simply seem to be regular 6 input 6 output hexa-copter mixers (as generated by but “inverted” in respect to each other. In conclusion the Main PWM outputs seem to be totally isolated from the Aux PWM outputs, with each output group flying one “half” each of the dodeca-copter. The PWM outputs should be ordered according to the order given in the mixer file and in the order generated by, right? If the Main and Aux output groups have one mixer each then that ought to mean output 1-6 Main and 1-6 Aux should be the correct ones?

As an extension to that question I wish to generate a mixer file for a different type of dodeca-copter, as in there are 12 rotors total in a 3x4 configuration (1 line of 3 rotors in each of the four corners). Since I don’t know how I would be able to separate this in a sensible manor into two mixers as was done for the mixing in the PX4 implementation of a dodeca-copter, I would need the 12 PWM outputs to all mix together using one large 4x12 mixing matrix (instead of two separate smaller 4x6 matrices, one for each output group). With the current PX4 firmware this doesn’t seem to be readily possible, at least from what I’ve been able to understand when looking in the most recent code from the master branch.

I have the .toml file to generate said 4x12 matrix using, but what would happen if I simply set this as my Main mixer for the Pixhawk, even though there are only 8 Main outputs? Is there any way to have the remaining four outputs be connected to the Aux outputs? Does anyone know enough details about how this mixing works to maybe give me some helpful advice here?


1 Like

There are several options. The easiest first.

  1. You can have 2 mixers. 4x2 on MAIN and 4x1 on AUX for example.

  2. You may use UAVCAN ESC as well. Then with small code modifications you can run up to 16 motors from single output or up to 20 with more modifications. 20 is the maximum allowed by UAVCAN protocol I believe.

  3. Maybe you can find some sort of pixhawk controller with 16 PWM outputs on single device. Or look for some i2c to pwm adapters

  4. You can use some sort of i2c to PWM adapters. There are some mentions about PCA9685 I2C to PWM module probably supported by pixhawk hardware but links I found are not working anymore.

1 Like

MindPX hardware has total 16 pwm outputs on single FMU.

You can have a look into this PR:

It will still need some changes to what you need, like change the max number of pwm outputs for main & aux module, but it give the basic idea.

1 Like