I’m trying to create a Mixer for a coaxial helicopter that has one swash plate for each rotor level. Each swash plate is controlled by three servos (at 0, 120 and 240 degrees). Additionally, each rotor has one motor controlled by an ESC. With this setup I end up with 8 Main outputs. Now I am trying to figure out, how this can be expressed in a Mixer file.
So far I came up with to possible solutions for this. But with each of them I ran into issues and now I don’t know which one is the way to go and how to work around the problems that I ran into.
Here are the two options:
Option 1: Using two Helicopter Mixers
The first thing I thought of was to use two helicopter mixers:
# Upper rotor level H: 3 T: 0 2500 5000 7500 10000 P: 0 2500 5000 7500 10000 # Upper swash plate servos: S: 0 10000 10000 0 -8000 8000 S: 120 13054 10000 0 -8000 8000 S: 240 13054 10000 0 -8000 8000 # Lower rotor level H: 3 T: 0 2500 5000 7500 10000 P: 0 2500 5000 7500 10000 # Lower swash plate servos: S: 0 10000 10000 0 -8000 8000 S: 120 13054 10000 0 -8000 8000 S: 240 13054 10000 0 -8000 8000
According to the documentation on helicopter mixers, they
combine three control inputs (roll, pitch, thrust) into four outputs (swash-plate servos and main motor ESC setting).
So, using the two helicopter mixers, all my 8 outputs are covered. The problem is, I didn’t yet connect the yaw control (control group 0 index 2) to any output. A helicopter mixer kind of assumes that there will be a tail rotor to control the yaw. However, my coaxial helicopter doesn’t have a tail rotor and shall controll the yaw by different turning speeds at the two rotors.
Is it possible to integrate this functionality into the two combination of two helicopter mixers?
Option 2: Using 8 summing mixers
The other option I thought of was doing with 8 Summing/Simple mixers. There is a mixer ROMFS/px4fmu_common/mixer/coax.main.mix that is doing this for a coaxial helicopter. The thing is, that the coaxial helicopter that they are doing it for is a lot less complex then the one I have. It has only one swash plate and two servos on it. It doesn’t have collective pitch which makes the whole thing a lot easier. The problem that I ran into with this option was that I don’t know how I can integrate the collective pitch in this setup. I thought of just adding the control throttle to all servos. So the mixers for the 0 degree servos would look something like this (combining pitch and throttle)
M: 2 S: 0 1 -10000 -10000 0 -10000 10000 S: 0 3 -10000 10000 0 -10000 10000
and the mixer for the other two servos would look something like this (combining pitch, roll and throttle)
M: 3 S: 0 0 10000 10000 0 -10000 10000 S: 0 1 -5000 -5000 0 -10000 10000 S: 0 3 0 20000 -10000 -10000 10000
Is this the correct approach? And if so, how do I need to set the values for the scaling of the throttle input for the servos at 120 and 240 degrees? Is it correct setting them to the same values as the main rotor ESCs? I guess not, but I really don’t know, how to figure this out.
Any help on this issue would be greatly appreciated.