Motor Interlock Enabled during Autotune

Hi all.
I have a new build that I have been trying to get off the ground. So far I have had pretty good luck with the machine but I am now at the point where I am trying to to Autotune it. So today it was cool and breezeless and thought I would give it a go. So first I did a Yaw tune.
It went for what I thought was a very long time. In the middle of the flight it suddenly spun 180 and continued on with the tune. Eventually I got a tune complete message, landed and disarmed.
I then set up for a roll tune. Off the ground she went, started the tune, twitch twitch as normal. Suddenly it did a 180 and the twitch stopped. Everytime I tried to tune I got the same result.
When I opened the log, and I confess. I can build but I suck at logs and config. I noticed this odd Motor Interlock enabled after the machine was armed and airborne.

Logs are in the post below.

You got that log file handy? Dont know if I can find the problem but happy to try

Sorry guys the logs where to big to attach so I needed to drop box them


Hi Ricky,
I know you’ve been around this stuff probably longer than I have, so excuse me if I preach to the converted…

The motor interlock messages dont show up and you dont appear to have a channel set for motor interlock - maybe a bug in the mission planner graphing?? I could be wrong of course, I was only using Dronee Plotter today.
I see a lot of repositioning you have to do during autotunes, that’s pretty much normal I think.

No battery voltage and current monitoring, please set that up so you can use the MOT_BAT_* params and failsafes. Compass/Motor calibration will help a lot too once the current monitoring is working.

Motors 2 and 4 are working a little harder than 1 and 3, therefore a slight weight imbalance. Heavier at the rear, but probably not a big issue.

Pitch seems OK but Roll is a bit under-performing.

I’m going to guess and say you’ve got 10 inch props, since most params are at or near defaults. Set these and try autotune again:

ACRO_YAW_P,3.00
ATC_ACCEL_P_MAX,108700
ATC_ACCEL_R_MAX,108700
ATC_ACCEL_Y_MAX,27000
ATC_RAT_PIT_FILTD,21.00
ATC_RAT_PIT_FILTE,0.00
ATC_RAT_PIT_FILTT,21.00
ATC_RAT_RLL_FILTD,21.00
ATC_RAT_RLL_FILTE,0.00
ATC_RAT_RLL_FILTT,21.00
ATC_RAT_YAW_FILTD,0.00
ATC_RAT_YAW_FILTE,2.00
ATC_RAT_YAW_FILTT,21.00
INS_ACCEL_FILTER,20.00
INS_GYRO_FILTER,42.00
PSC_ACCZ_I,0.52
PSC_ACCZ_P,0.26
AUTOTUNE_AGGR,0.075

Once you’ve got the voltage and current monitoring working you can set these properly:
MOT_BAT_VOLT_MAX
MOT_BAT_VOLT_MIN
BATT_ARM_VOLT
BATT_CRT_VOLT
BATT_LOW_VOLT

Any reason to set these?
MOT_PWM_MIN and MAX
They can usually be left at 0 and just do the ESC calibration, unless you’ve got ESCs that cant be calibrated. Ah I see, Dshot 150 - right. I think they can still be 0, but it may not matter. Just something I noted.

Use this spreadsheet:

Wow thank you for this.
Your right i have nothing set for Motor Interlock so perhaps a MP issue. I was shocked to see it.
I am running a 14 inch prop so I assume I need to tweak the values based on prop size and cell count. This is very cool. Wish I had something like this as a starting point.
I will tweak and try again.
Thank yo ever so much.
The one thing I am still confused about is the sudden yaw 180 degrees. IT did it more then once. Puzzling.

14 inch prop starting point:

ACRO_YAW_P,2.60
ATC_ACCEL_P_MAX,81200
ATC_ACCEL_R_MAX,81200
ATC_ACCEL_Y_MAX,23400
ATC_RAT_PIT_FILTD,16.00
ATC_RAT_PIT_FILTE,0.00
ATC_RAT_PIT_FILTT,16.00
ATC_RAT_RLL_FILTD,16.00
ATC_RAT_RLL_FILTE,0.00
ATC_RAT_RLL_FILTT,16.00
ATC_RAT_YAW_FILTD,0.00
ATC_RAT_YAW_FILTE,2.00
ATC_RAT_YAW_FILTT,16.00
INS_ACCEL_FILTER,20.00
INS_GYRO_FILTER,32.00
MOT_THST_EXPO,0.70

Thanks Shawn.
oh and yes it’s a bit butt heavy and I need to see what can be done to balance that a bit better.

Any thoughts on the strange yaw 180.
And your spreadsheet is awesome. Thanks for that.

xfacta,

I just crashed a VTOL during a QAUTOTUNE. Would you mind taking a look at the log?

You know a lot more than me.

Dave

Haven’t seen a 180° Yaw !

Yes this is likely what happened if you were running autotune in loiter or poshold

1 Like

Thank you. I suspect that’s what happened as the wind was picking up and I had the impression it weathervaned.
@xfacta I used the tool you posted to me to update all my parameters. I also found the that the voltage and current sensor was faulty so I replaced that as well. However today there is a high wind warning so likely not going to get it out to see how it works.
I am going to take your tool and apply it to all my machines I have upgraded over the winter.
Hope yo don’t mind I found a spelling mistake on a parameter and I corrected that and modded the calc to support LIHV Batteries.

I have to say once again…very helpful tool