How to do Motor Test to determine MOT_SPIN_ARM and MOT_SPIN_MIN

The docs instruct us to use the motor test feature to determine MOT_SPIN_ARM and MOT_SPIN_MIN.

And there’s discussion that these settings can be related to MOT_THST_EXPO.

The Motor Test on Mission Planner’s SETUP tab allows testing that the motors spin at a minimum specified percentage of throttle. In my project’s case - 6%.

There are buttons for “SET MOTOR SPIN ARM” and “SET MOTOR SPIN MIN” - and each allows entering a value.

But I can’t seem to find any documentation on how to determine the proper values for these parameters given the available test for percent throttle to cause the motors to spin.

Is there some guidance on how to determine these values?

And curiously, the published ranges for these values (ARM: 0.0 to 0.2, MIN: 0.0 to 0.3) don’t seem to relate to the settings that Mission Planner suggests you enter. In my case, for ARM Mission Planner suggests 7%. for MIN it suggests 3%.

Thank you!

Some valuable info here from The Man!
Tuning

Indeed - and I’ve read many of Leonard’s posts on this topic.

But still I can find no guidance on how to use the Motor Test to select the values for these parameters.

Motor Test just spins the motors at the % throttle you input. You can use it to set the MOT_SPIN ARM value by indicating deadzone or not if you don’t want them to spin. For MOT_SPIN_MIN I do it experimentally by dropping the throttle from a high Hover in Stabilize mode and seeing how the craft reacts. You want some stabilization but not too much thrust. It really depends on your craft and it’s thrust/weight. The buttons are there just to make it convenient to set them but I usually set them from the Full Parameters List.

EDIT:
In motor test 8% is 0.08 in arducopter terms, 10% is 0.10 and so on…

In the motor test, start with low values like 0.08 or less and check that each motor can start and run reliably at this low speed. If you don’t have props on put a small load on the motor shaft with your fingers.
Increase the value until all motors always start reliably. This is MOT_SPIN_ARM , I go and set it myself but probably those “Set” buttons work.
For MOT_SPIN_MIN we usually just add a bit more than MOT_SPIN_ARM like +0.03

But!
MOT_SPIN_MIN can be tricky - it needs to be low enough that you can always descend and so motors are not hitting the MOT_SPIN_MIN just for typical stabilisation.
MOT_SPIN_MIN needs to be high enough that the motors will reliably remain turning in the correct direction and not desync during descent.
You can check in logs for these things, ideally you would see RCout’s going to low values but not flat lining, and you can still descend and manoeuvre as required.

So for a lot of multirotors MOT_SPIN_MIN is easy: MOT_SPIN_MIN = MOT_SPIN_ARM + 0.03
And then there’s the others that need special attention.
If MOT_SPIN_MIN has to be highish to keep props turning, but you are seeing motors hitting MOT_SPIN_MIN during normal use, then add a bit of dummy payload or get smaller props.

3 Likes

Excellent - Thank you!

This is all pretty much as I had pieced together from various posts. But since the docs say use the Motor Test to determine these values - it’s, well, unclear.

I know that ArduPilot and Mission Planner have had a long winding road of evolution over the years - but it seems odd to me that the motor test screen has buttons for setting MOT_SPIN_ARM and MOT_SPIN_MIN - rather than just directing the user to the parameters screen.

I’ve been pitching for better ArduPilot documentation to be written - this is a pretty good example why. Imagine how much time you’d have for more interesting activities if you didn’t have to answer rookie questions like this!

Many Thanks!

One more thing to be curious about…

When you first arm a copter, it will be in some mode - maybe stabilize, alt-hold or loiter. The throttle will also be at full low to arm.

Will the motors be at “arm” or “min” at this point?

The terminology implies the motors will be at “arm”. But in stabilized, loiter or alt-hold modes and the throttle at full low, the conditions will be identical. Yet the terminology implies the motors will be at “min”.

So I guess the question is when does the software switch from using “arm” to “min?”

Ok, a few little points to clarify here.

First up, this is one of the most difficult settings to define as it depends so heavily on the ESC / Motor / propeller combination. The best I have been able to come up with is you want MOT_SPIN_MIN to be as low as possible while being 100% confident that the ESC won’t desync or burn out if you quickly apply throttle.

If I am doing a quick setup I will choose a setting that is not generating thrust but I don’t want to reach in and stop the blades with my hands.

If I have more time I will do a bunch of testing on a thrust stand to ensure that I get the best compromise but keep in mind that this testing needs to be done with load on the propeller, so back pressure from a second source.

@xfacta Your description was really good however this point is not completly accurate.

All lightly loaded or endurance focused aircraft will have this problem and all aircraft will see this during breaking mauvers. The lower MOT_SPIN_MIN can be set the better the aircraft can handle these situations but they always happen. We have done a lot of work in the motor mixer to handle motor saturation at both minimum and maximum throttle and it is one of the reasons ArduCopter performs so much better than the alternatives.

The short summary is that seeing minimum throttle output during some phases of flight is normal. If you see that on just one or two rather than all motors bouncing off the bottom in hover or slow flight it is a sign of other problems.

But a great summary!

ARM is where the aircraft goes with all motors to signal that the aircraft is armed. When at ARM all motors are the same and no stabilization is happening. So this happens in the default setup when your throttle is at zero in Stabilize or when Alt_Hold thinks you are landed. When stabilizing the aircraft (the autopilot thinks it is flying) the lowest any motor will go is MIN.

People have been saying this for years and we have been making this a high priority for years. However it takes a while to work out how best to explain this in a Wiki or how to present the setup or parameters in a way the is more intuitive. Often it takes someone like yourself that is going through the process for the first time to provide the explanation or description that makes sense to a new user. Everybody can make pull requests to the wiki :slightly_smiling_face:

2 Likes

@jstroup1986, you asked: If I’m on the right track, can I assume from the parameter name “MOT_THST_EXPO” that the relationship between rpm and thrust is exponential ?

If you have a look at the basic momentum theory results for propeller thrust you get a relationship of
StaticThrust = Constant * rpm^2

This tends to move towards Constant * rpm the lower the efficiency of the system.

We use:
thrust = command * (1-expo) + command ^2 * expo

where
command = (pwm - pwm_min ) / (pwm_max - pwm_min)

so for expo = 1 this is the perfect lossless propeller.

So it isn’t an exponential is is a polynomial but you get the idea.

2 Likes

I’m glad to see you mention propeller loading - I was thinking of including that in my inquiry - but thought it might be a bridge too far for this discussion.

When I get around to building a thrust measurement rig, I’d be curious to have your suggestions on creating simulated prop loads.

1 Like

I’m a rookie. Getting stuck constantly, endless hours trying to understand basic concepts. There is no reference implementation with all the nitty gritty details that you have to learn by endless hours of trial and error. the getting-used-to-it curve for tools like qgc and mp are enourmous (its not learning-curve, its getting used to the very confusing dialogs).

i remember duplicating what was shown in a youtube video that one of the ardu experts posted a few years ago. wow, great instructions. i followed them and it worked. he said that that after meeting some people at a uav field, they were having “a terrible time”, and so he came how and fixed the problem (in the code) and posted the youtube. nothing about fixing the docs or even referencing the youtube in the docs.

compare ardu docs (and tools) to betaflight. Last week I spent 3-4 days doing beginner demos with STM32cube tools (IDE, AI demos, programmer) with a demo board. Wow, learned so much, how to program STM32 demo boards. In just a few days. Great docs (its not opensource).

I think many never get past the rookie stage with ardu/px4. Its not worth it to them. You guys who help out… you are fantastic. but without some well-documented references implementation, you are missing a lot of new members to the club. these people arent stupid or lazy.

PS: why the interested in stm32 tools? i wanted to just avoid MP and QGC for programming an fc if possible. stm32 are so much easier to use.

I tried to do this with this series of videos because I got so frustrated with people getting it wrong:

Happy to get feedback on how I could make this better. I agree its hard and also agree it should be easier.

I have been writing my own proto-doc website for Ardupilot. ziptieai.com and my wiki.

Past few days been trying to get ardupilot running on my new x500 build. Got everthing (telem radio, rc/rx, gps, etc) working, but the motors wont turn. and i try to change the motor values in mplanner… and mplanner refuses to change them. I set motor setting in mplanner… then download settings and i have these weird floating point numbers. i documented what i did, in detail…
https://drive.google.com/drive/folders/1XhYtd5LolvhXh7U9fOOmTGYEgGunSxJY
1-2b_x500_drone-build_ardu+mp_…docx

Outdated docs (no “last edit” date on ardu doc site… i opened a page, played a youtube… it was 10 years old), no numbering system (to make it easier to uniquely ID a webpage), mission planner quirks (could not change values in the UI for motor settings)… I just gave up for now. So many settings, get any one of them wrong and it wont work. With time I have noticed how the youtube experts skip over difficult topics in their “its easy” videos. Looking more into STM32 stuff. Its great to be getting things done, not being lost in rabbit holes.

That wiki page talks about a youtube series from Eric @ intelligent quads (actaully, talks about my heavily editted version). He put together a detailed step by step demo that (with great difficulty… he did not number his steps, missed some, and he did this 5 years ago) I replicated and redid several times. His series is the ONLY such presentation that is truly (1) organized conceptually while (2) presenting all the steps to get it done. KUDOS to Eric!