This is for ordering the motors properly in Arducopter and then adjusting the directions of BLHeli32 ESCs.
Everytime I attach new motors to new ESCs and new FCs I think I’ve figured out, with my big fat brain, what the connections and ordering and direction is supposed to be, and never once have I got it right the first time.
So here is the “iterative” (read: trial and error) method that I now use with good success. Please feel free to let me know if you see any errors or flaws here.
First, wire up your motors to your ESCs however is most physically convenient for layout (ignore position and numbering) and then wire up your ESC signals to your FC however is most physically convenient with the connector. Yes, whatever ordering you want, both for motor wires and signal wires. As an added bonus your motor wires can lie nice an flat on your frame, all the way back to the ESC, without crossing over each other whatsoever.
Take care of all your basic motor configuration and settings in order to get your motors turning (check turning using next step below). By which I mean do your dshot protocol configuration, your motor battery voltage values, stuff like that. Don’t worry about the ordering or direction, just get them to the point where all four will turn during the motor test. Here’s the motor test:
Go into MP > Setup > Optional Hardware > Motor Test
Note, in the VERY VERY end, after everything is perfect, we want
Motor A = front right, turning CCW
Motor B = back right, turning CW
Motor C = back left, turning CCW
Motor D = front left, turning CW
Note that the ordering above, for “motor A through D” is not the same as the “motor 1 through 4” diagram. Motor A starts at the front left (for a quad) and then proceeds clockwise.
The odds are against you that you got it right by accident, and even more against getting the rotations correct as well.
Here’s how to fix it.
Click on motor A. Motor A is supposed to turn the front-right motor. You have a one-in-four chance of getting it right. Ignore the other three motors for now.
Note which motor turns when you chose Motor A. Ignore the direction for now. Let’s say for example that the back left motor turns.
Use this cheat sheet:
Front right motor = 33
Back left motor = 34
Front left motor = 35
Back right motor = 36
In our example, the back left motor turned. It is number 34.
Now go into the Config > Full Parameter Tree. Look at the SERVO1, SERVO2, SERVO3, etc settings. Find which one of those has SERVOx_FUNCTION set to 34. Let’s say for example that in our case, SERVO2_FUNCTION = 34. Servo 2 is assigned to turn the front right motor, but it’s actually turning the back left motor. So we are going to change the 34 (for “back left”) to 33 (for “front right”). But if we just change that servo from 34 to 33, then there will be two servos assigned to 33. Instead, let’s find which servo is assigned to 33, and we’ll swap them. Let’s say I see in the parameter tree that SERVO3_FUNCTION = 33. So now change SERVO2_FUNCTION = 33 and SERVO3_FUNCTION = 34.
Write those parameters.
Now go back to the Setup > Optional Hardware > Motor test and click on motor A. Now, the front right motor should turn.
Now, write down in your notes "SERVO2_FUNCTION = 33 = FRONT RIGHT "and DO NOT CHANGE IT ANYMORE. You’ve got one motor correct. Now repeat the whole process for motor B. One motor at a time. Don’t forget to write it down once you get it, and don’t change it.
Now, while you were doing all this, you were just ignoring direction because, well, one thing at a time. The following motor reversal instructions are for an ESC running Dshot (let me know if anyone knows how to reverse a Dshot motor through arducopter parameters). First you’ll need to turn on the DShot passthrough functionality if you haven’t already, so that you can talk straight to the ESCs through the FC. For me, that consisted of MOT_PWM_TYPE, 4 (for DShot150) and SERVO_BLH_AUTO, 1.
Then disconnect the FC from Mission Planner. Open up your BLHeliSuite32 software (you’ll have to get that installed on your own). Find the right serial port and connect. Now, before you go hog-wild reversing motor direction, you need to know that ESC 1, 2, 3, 4 are not related to the motor ordering you already dealt with. So you need to use the motor testing function in BLHeli to figure out which motor is which, all anew. There’s a “motors” tab that let’s you manually spin the motors. Best thing to do is drag each slider up slightly, one by one, and then back down. If you click on the slider it’s funky. The order that the motors are in doesn’t matter; what matters is that you right down which of the ESC’s need to be reversed. Once you check and note that for all four ESCs, then you go back to the main ESCs tab and click on “check” and get the ESCs loaded again. Now we’re going to switch one ESC at a time. So here’s the key: at the bottom, click on the number of all the ESCs that you DON’T want to affect, leaving only a single ESC number remaining that is the one you are reversing first. Now finally click on the “Reverse” slider to flip-flop the direction, and then make sure you “write” to the ESC. That one single ESC should have been flipped. Now you can go back to the motors tab and check, to make sure you did it right. And if you flipped that one motor successfully, then you can go back and repeat for any other motors (one at a time) that you need to reverse. Check it on the motors tab before you quit out, then re-connect to mission planner one last time and go do the motor test and everything should be copacetic.