Motor mixing and why it’s important.

Not all quads are equal, literally. Some have layouts and motor locations different than others and this can mean that the stock motor mix that comes with cleanflight and baseflight isn’t always the best mix for your particular application. While the stock tuning methods using the boxed motor mixes that comes with these applications is good for most people, Some people tend to have issues with PID Tuning because their motor mix is off. These issues can become especially apparent when you begin to incorporate hex and octo layouts. The stock mix for all of these layouts assume that all of the motors are equally spaced from a center point.

As you begin to get into advanced multi rotor design, you will probably want to build a custom mix for your quad as it can make tuning a breeze, and make your quad fly much better.

Some examples of multi rotors that don’t have a symmetric design and require a custom mix are the TBS Discovery, ZMR 250, Sparrow, Sparrow Hex and the QAV250. They are not perfect X configurations.

How to figure out the motor mix

I like to use the application that was created by Iforce2D. This application works really well for setups that don’t have angled motors, And it works for most people except for people that are building tricopters. Best of all, it’s free. (thanks Hydra)

[button link=”https://www.iforce2d.net/mixercalc/” type=”big” color=”green” newwindow=”yes”] Click here to open the motor mixing calculator in a new tab.[/button]

Pretty much all that you need is a ruler to get started with your motor mix calculations. You simply have to measure the distance from one motor to another and set those constraints for each motor. Each motor should have three constraints in order for the mixing calculator to work properly.

This video shows how to use the mixing calculator:

Putting it all together:

Once you have figured out what you’re Cmix is, you’ve got to put it into your flight controller application of choice. I like to use Baseflight for my builds because that’s the official software that is supported by the Naze32 which is my go-to FC.

This is an example of the settings that I got recently from calculating the motor spacing on the Sparrow Hex.

You can see from the picture that the sparrow hex is not a conventional hexa copter and therefore requires a custom mix because the motors are not equidistant from a center point.

I ran the calculations found at the Iforce2D website and this was the result:

Granted, I did take trigonometry, and pass with flying colors, but this tool really makes all of that time spent memorizing sohcahtoa seem useless.

The next step is to import your calculations into the CLI of you flight controller software:

What we ended up with for the Sparrow hex were these values:

mixer CUSTOM

cmix 1 1.000 -0.567 1.000 1.000

cmix 2 1.000 -0.561 -0.990 1.000

cmix 3 1.000 0.583 0.987 -1.000

cmix 4 1.000 0.567 -0.989 -1.000

cmix 5 1.000 -0.835 -0.014 -1.000

cmix 6 1.000 0.813 0.005 1.000

Put these values here:

If all went well, you should see an OK for your sanity check.

Now, before you go and try to fly, make sure that your props are removed and then test the motors to make sure that you got them in the right place and right rotation. If they don’t match your cmix diagram, try again.

If you are using cleanflight, you do not have to change the word cmix to mmix. Thank goodness there is some congruency between these two platforms.

Here it is in Cleanflight:

Why this works

The way it works is, motors that are placed further away from the centre of gravity will require a greater amount of thrust to travel the same distance as a motor that has been placed near to the centre of gravity.

So if you look at a standard mix you will see this:

cmix 1 1.000 -1.000 1.000 -1.000 (Rear Right motor) cmix 2 1.000 -1.000 -1.000 1.000 (Front Right motor) cmix 3 1.000 1.000 1.000 1.000 (Rear Left motor) cmix 4 1.000 1.000 -1.000 -1.000 (Front Left motor)

Essentially what we see it that each motor is mixed with 100% of the force applied.

each motor’s individual mix can be viewed as shown:



cmix [motor number] [throttle] [roll] [pitch] [yaw]

If yaw is negative, the motor will spin clockwise.

When we modify these values, we change the amount of force that is applied to each motor.

I won’t go into more details on motor mixing in this post, Ill save it for the future.

Please subscribe to our updates to get info about future posts!

Conclusion

After running a custom mix, I was amazed to find out how much better in my Sparrow Hex flew on stock PIDS. Essentially any quadcopter or multi-rotor that has motors that are not equidistant to a center-point should have a custom mix. Try it for yourself and you’ll see!

That should do it, Go out and fly!

About the Author

Anthony Jacobs is a quadcopter enthusiast that has made it his mission to help others find valuable information about these machines. He has found that the learning curve for this hobby is extremely steep, and that you have to sort through tons of forums and blogs and websites to find the right combination of parts. There is no standard for testing of parts, and there is no real science behind what people think is good or bad. Anthony decided to build QuadQuestions so that he can give you a mind dump, and help you find the parts that work well without having to spend an eternity on the forums, or sorting through a mountain of parts.