I’m after volunteers to test a new lua script which can automaticaly find the right MOT_THST_EXPO for a copter, saving the need to use a thrust stand setup.
Finding the right expo for your motors/prop/ESC combination is an important part of getting a good tune for ArduPilot, but the only method we have had so far is to do a full thrust stand test, which is quite time consuming and thrust stands can be quite expensive, especially for coaxial propeller setups (on an X8 multirotor you need a dual-prop thrust stand to do it properly).
I’ve developed a new lua script which runs a series of pulse tests to find the expo automatically with a couple of minutes of flying. You can see the pattern of pulses it uses in the above graph, which shows the throttle in green and the acceleration produced in red.
I need volunteers so we can test this script on a wide variety of vehicles and make sure it performs reliably.
To test you will need an updated firmware which adds a new lua binding from this PR:
if you are not comfortable building yourself then you can ask me to build the firmware for you if you tell me what build you need (what board and any special options such as bdshot).
Once you have the firmware loaded then you will need to load this lua script:
Then refresh parameters and set the parameter EXPO_ENABLE to 1.
Then setup an RCn_OPTION to be 300 for some 3 position switch. The 3 switch positions are:
- low: disable tuning
- mid: enable tuning
- high: save tune
To run the test takeoff and hover at about 10 meters over the ground, and switch to GUIDED mode (or takeoff in GUIDED mode). Then move the 3 position switch to the mid position.
The copter will do a series of thrust tests, pulsing the throttle up and down by 25% while measuring the acceleration. After each pair of tests it will send a text message with the adjustment to the expo, like this:
the convergence criteria is still being improved, so if it hasn’t finished after about 3 minutes then you can abort and send me the log.
Please fly with LOG_BITMASK=65535 so I can see the PIDs.
There is more documentation here:
For discussion on discord see the thread “automatic MOT_THST_EXPO estimation” under the copter dev channel.
When you send me logs, if you also have thrust stand test data then please send that as well, and also let me what what prop/ESC/motor you are using and the weight of the copter is.
Note that this is for copter only for now. I will extend it to quadplanes soon.
Thanks!