ArduCopter EKF2 IMU2 Switching to Compass 0,2 abruptly with slow oscillations in pitch midflight

Hi,
I am using a hexacopter with CubeBlack mounted on a Kore Carrier Board, with a Herelink installed, which is flying normally up to some time ~7 minutes in loiter, after which the speed is slowing down (oscillating actually) to 1 m/s or so from 5m/s repeatedly. after looking at the dataflash logs, the message “EKF2 IMU2 Switching to compass 0”, “EKF2 IMU2 Switching to compass 1” are appearing at each twitch, Apart from that, the log Auto Analyzer shows "Test: Compass = FAIL - Large change in mag_field (320.41%)
Max mag field length (1402.83) > recommended (550.00)
" .
The Slow Pitch oscillations worsens in Autonomous Modes such as RTL, and Auto.

The Logs can be found at https://drive.google.com/drive/folders/1Y1PGpt1vFF7pnHqw6ZTdYJ8OZCiHIXDm

And here are some Pictures from the Log Graphs.


image
I am still not able to figure out what’s been causing this, Please let me know how to resolve this issue, Thanks.

Your parameters appear to be at the defaults.
Go through the Wiki tuning page here

Once you have done that do an autotune.
Looking at DES v Actual you can see just how hard the copter is working to maintain stability.
make sure your frame is up to it, and all props are level.

Hi, Mike
The graph looks good than mission planner logs plot. Which tool you using for logs plotting?

I talked to Philip @proficnc, and I was recommended to Preheat the FC 15 Minutes Prior to flight using a Power Pack Connected to USB Port of CubeBlack (and removing the power pack thereafter). and then rebooting before the actual flight

We followed the same procedure to wait for 15 minutes, and we faced another issue in a previously working drone with no other modification apart from plugging the power pack,

In the same series of flight procedure, during the actual flight, The Here3 Got disconnected Somehow, causing a EKF Failsafe and finally a crash.
The 5V Power Supply on Kore Carrier Board on CAN1 and TELEM2 port burned out and the TF03 Connected to it also burned, causing a huge financial loss.

Although, when we tested the same Here3 on CAN2, its working just fine.

I am really curious what would have gone wrong, and what’s the solution to both of these problems.
Logs - https://drive.google.com/drive/folders/1_vJvPmhxfP0H1PYW8hezhF96N1Tqx4P9?usp=sharing

Yes, Indeed the Copter was not tuned and was on default params, but I didn’t tuned it, because I wanted to be clear on whether this Compass Switching is because of the same issue. because I hadn’t encountered any Compass Error on an untuned Copter before.

Ok, For anyone revisiting this section,

  1. Do not use Large vehicle mag cal, instead use the usual onboard compass calibration.
  2. make sure the GPS/MAG is at a good distance away from power/RF Wires.
  3. Wait for 15 minutes, but rather than using a power pack, plug in the batteries instead, as in my case the 2A port fried up my FC.

Hopefully, Things will turn out great afterward, fewer crashes eventually,
It’s really sad, I wasted a lot of money in crashes just to debug, only because the hardware and manufacturer support is so weak.

2 Likes

@Yatin-Khurana we are also facing this same issue could you please look into it , I’m sharing the logs
Link - Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.