This will be a mini how-to about custom frames (like my SG Adventure Mini) and the motor mixer settings for different flight controllers. I already described a bit about the settings on KK2.0, KK2.1.5 or the Naze32.
There are two methods about getting the right numbers for your flight controller. The first one is by using the angles between the arms and the roll and pitch axes. The second one is by getting the distance from every motor to the Roll and Pitch axes. I used the first one for setting the mixer editor on my KK2.0 board about two months ago, because I saw this method in a HobbyKing-video on YouTube.
Although I will use the second one in the future because it is more accurate. Why?
Using the first method we use the angles between the motor arm (or in a bit asymmetric frame the line between the motor-shaft and the center of where the flight controller is mounted) and the roll and pitch axes. Then use the sine(of this angles) = the value we use for our flight controller. This is actually almost the same as method two:
For the angle α, the sine function gives the ratio of the length of the opposite side (the distance from the motor shaft to Roll/Pitch) to the length of the hypotenuse (this is the distance from motor shaft to the center of the flight controller).The controller uses only the ratio between these two sine functions and in that way it knows the ratio between the distances to Roll and Pitch and where the motors in space are.
Using the method with the sine of the angles would be 100% ok, if all 4 arms have the same length and are mounted in the same distance from the flight controller. On my SG Adventure Mini Quad the distance from the front two motors to the FC are 135.3mm and the distance from the rear motors is 136.2mm. That is less a mm. Using the method with the angles would be no problem at all.
To be 1000000000% accurate 🙂 I am using the second method, getting the ratios of every distance to the Roll and Axes by measuring these. How to do this:
Measure all the distance from every motor to the Roll and Pitch axes. Take the biggest nominal value and divide all the distances by it. In that case every distance is a ratio of the biggest one.
In my case this is the distance from Motor 1 (Rear right) to the Pitch = 108mm. Dividing:
Motor 1:
-
Pitch 108/108 = 1 (For the KK2.0 or KK2.1.5 Motor Mixer this means 100).
-
Roll 83/108 = 0.768 (KK boards 77)
Motor 2:
-
Pitch 83/108 = 0.768
-
Roll 106,9/108 = 0,989
And so on for the other motors. Note that the motor layout in MultiWii/Naze32 are not the same as in the KK or the APM.
And to show you, that there are (almost) no difference in the calculation methods:
Sine(38) / Sine(52) = 0,782; 38 and 52 are the angles to Pitch and Roll for Motor 2 on my frame.
0.768 / 0.989 = 0,776; This difference is so small, that there is no problem for the FC.
As said both methods work well, but the second one is more accurate when using arms with different length. I hope this “problem” with asymmetric frames, like mine or TBS Discovery, and the right settings is more clear now.
Hi,
Thank you for the great explanation. I have 1 question about the doing the measurements. Should we measure the distances in relation to the flight controler, the center of lift or center of gravity? or in case center of lift and center of gravity do not exactly align in the middle of them. As the turning point of pitch will be between the center of lift and the center of gravity thst seams more logical. For yaw the turning point will be at the center of yaw as center of gravity does not come into play.
Maybe i’ overthinking but with a setup like the tbs discovery there are big differences between cog cof and the fc location.
Hope you have an answer on this
Kind regards
Hi, this is a very good question. On standard frames the CoG, CoL and the flight controller are on the same location. Center of gravity of the frame is hard do define, as this depends on where the battery, camera, gimbal or fpv equipment is. But in order all motors to have the same speed in hover, the CoG should be matching the more important center of lift/thrust. I always assumed that the flight controller should be in that CoL point… So I think more important is the CoL and it should be calculated to that point. A simple example: if you have an TBS Discovery and put for some reason the flight controller right on the front, it make no sense to calculate to that point. The controller need to know how the motors are allocated in the space. And I think the firmware of the controller assumes that the FC is in the CoL, so calculating the speed of the motors based on that point.
Regards
Some more thoughts: The only problem with placing the flight controller not in the matching point of CoL and CoG, should be when flying in some direction, because of not so accurate calculations. Just in hover there will be no or minimal difference. And some more info: In my opinion the CoL/CoT point on the TBS Discovery is wrong marked. I never had once and dont know how that one is balanced, but the CoL is where the CoG is marked 🙂
Thanks for the answer, I think that the reason that they put the CoG more in front of the CoL is to get an equal pitch distance front to back. However depending on the amount of thrust input the CoG will shift between the CoL and CoG.
For the flight controller the location of the sensor should not matter as the angle of change will be the same. In theory it might even be beneficial as the measurement of the change will take a little bit longer because of the distance between the turning point and the location of the sensors, it should dampen the movement (only in the pitch direction).
I have no idea how the calculations are done in the FC and how much this will have an effect and as this is my first quad am not ready to start testing. Am having far to much trouble getting the PID settings right.
Yes, getting the PID right is far more important, than the motor mixer settings. On my Pixhawk I have tested the same frame as V-Type and normal Quad-X, almost no difference when PIDs are well tuned. About the TBS, as said the CoL is absolutely wrong marked. But so small differences does not matter so much in real flight.