How to set MAX_THROTLE in dependance of maximum power


I have question regarding MAX_THROTLE parameter. If it is possible to make it dependant from voltage or current?

The reason I need it to avoid to overload the battery and motor when it is fully loaded and in the same time to have enough power when the battery about the minimum.
I noticed that with the standard lipo-s 2x5000mah 4S I am loosing around 35-40% when the battery is low(voltage around 3.4 per cell)
In the same time I plan to use li-ion Panasonic NCR18650B 4S 8P with bigger working voltage range 2.7-4.8V which means I can loose up to 60% of power at the end of flight. Maybe still enough for horisontal flying but can be fatal on downforce thermals. I see it like can be partially solved by using bigger prop. Thats ok for low voltage but on the start it can damage the battery.
In manul modes it can be controlled by pilot(me) through current sensor but in auto throttle modes like rtl it would be nice to have such feature like automatic increasing MAX_THROTLE parameter during the flight depending on the current sensor or/and voltage sensor.
Actually good to have such feature in manual mode as well for safety.

So my question if it is already possible to configure that way or is it planned some how to be implemented soon?

Thank you,

This is a very interesting post.

I thought of the same thing for the use of Lions - A current aware, auto wear leveling ardupilot.

With Lions starting to pop up that deliver 10A constant current at 3300 mAh usable capacity, discharge current is becoming less of a problem.

Also there is the option to analyze logs for determining throttle percentage at maximum desired amp draw and then just set THR_MAX.

Yet it would be super convenient to have an ardupilot that will try and cruise below a certain amp level.

Maybe something like this has been brought up on github (wishlist) already and it would be worth a search.

Max, here is an example for a graph you can generate, to analyze throttle vs. current and voltage. This one is from a ground test to full throttle using apm flash logs and created in apm planner.

You are taking your battery voltage too low.

You should land before it starts loosing power. After a flight it should never be below 3.7v. At rest 3/7v is about 10% capacity and you should always have about 20% remaining. If you discharge further than that your battery life is greatly diminished.


You are looking at a temporary voltage sag under load during seconds. Note the pack’s voltage recovering after the load is removed. It is an older puffy pack and the sag would probably be lower with a new product.

I read up on it and yes, thank you for the heads up. I wasn’t aware the 3.7V limit also applies ed to short bursts of load and I didn’t even notice the low initial charge.

This brings me back to the topic, any thoughts on the enhanced battery “awareness” of ardupilot ?