Drone rotates unexpectedly when accelerating upwards

If I send my drone upwards at high speed, I see it rotate unexpectedly after a few seconds, usually by very roughly about 180 degrees. It remains at its new orientation after I stop ascending.

I have 2 compasses - 1 in the Pixhawk, and 1 external compass that is mounted below the quadcopter at least 15cm from the nearest noise source.

I have the log available here; download the zip and extract using my username as the password.

I did an auto analysis of the log and MP told me:

Test: Compass = FAIL - WARN: Large compass offset params (X:259.56, Y:281.75, Z:-268.91)
WARN: Large compass offset in MAG data (X:259.00, Y:281.00, Z:-268.00)
Large change in mag_field (41.86%)
Max mag field length (566.57) > recommended (550.00)

I also have a screenshot of Yaw vs. DesYaw (red line is desired yaw):

There seem to be some “switching to compass” messages too which are concerning. Here is my compass setup in MP:

My other drone has the internal compass enabled and flies fine. Should I be disabling the internal compass here? The internal Pixhawk compass is located right next to the battery so is subject to a lot of noise.

Many thanks.

Yes - disable the internal compass. You have an external compass that is hopefully fitted further away from the battery/power electronics.

Use the Throttle vs Mag sqrt graph from the special graph pull down menu to troubleshoot this.

1 Like

I previously thought that Arducopter prioritised the first compass with the knowledge that the internal compass would probably have interference. I might try this anyway. Thanks.

Hi Dave, I have the graph here but there does not seem to be much correlation between magnetic field and throttle:

What do you think?

I’m bemused because the external compass is so far away (>16cm) from the drone wiring. Is it possible the folding stick (that the compass is attached to) is wobbling?

And here is a zoomed in view of when I put the throttle to full (and about the same time that the unwanted rotation occurred):

I think you are right and it shows little influence to speak of. Hard to say though if it’s yawing also. I would disable the internal mag anyway.

1 Like

to me, it seems like your Yaw is not-so-well tuned, and the yaw you see at high throttle is caused by power difference between CW and CCW motors (difference in props, or some motors are slightly rotated, if mounted on round arms)

1 Like

I’ll check the motors, disable the internal compass, and do an auto-tune just on yaw. Thanks for the tip.

Just reporting back that the problem was indeed slightly rotated motors. I did not need to autotune to fix this, just make sure each motor is vertical. :smiley:

1 Like

thanks for reporting back, so it was the last option: “some motors are slightly rotated, if mounted on round arms”

  • reporting back can help others that search for similar issue.
1 Like

And yes, I do have round arms on my quad.