Compass errors , innovations high in flight

Hi,
Got a custom built Y6 Copter running 4.2.0 from a small local company.
(But I have realised I probobly is best of by solve config issues myself. Had a Misconfigured GPS at first… that i think i now have solved. (Had lots of GPS gliches))

We have realised we have some issues with the compass’es.
Holybro Pixhawk4, with M8N GPS/Compass combo.

Primary Compass is the M8N unit mounted on a 20cm tower. Internal magnetometer sometimes has lots of interference, so normaly disabeled.
We get all kind of compass error messages via mission planner and message logs.
Tried looking through the logs by MavExplorer and the only thing I am clear about is that the innovations are way of for the compass.

Help pointing in investigating direction is apreciated.
In this logfile both compasses were enabeled for calibration tests, normally the internal is disabeled.
https://drive.google.com/file/d/1zCKMc1ykXHjFv8H2HKKncUOT2oqsOT2g/view?usp=sharing

Li-ion battery?

You should update to latest Stable disable EK2 and make sure EK3 is enabled.
Then deal with the very high vibrations on this craft it’s a non-starter with >1000 clipping events in this short flight.

Thanks,
Yes its a big 28Ah li-ion pack.
Have not dared to change fw until,i got a clue about the basic problem.
For my understanding…
How did you see those clipping events?
What are more normal vibration values?

The FC is placed on some sort of flexible material… so i guess that i shall test to remove that…

Edit: found it… Measuring Vibration — Copter documentation

And the likely cause of your problem. If you use the same pack every time, locate in the same position and use Magfit to calibrate the compass and produce the Compass Motor coefficients it might be good enough.

The Z-vibes should be down where X&Y are but under 20. The Wiki says under 30, which is too high. And after working on reducing these (balance props, better FC isolation) you need to configure the Dynamic Notch filter.

I don’t think this is logical. Starting with the most up to date firmware will save you time later. Some of the PID’s looks suspect, where did they come from?

How do you mean Li-Ion is a problem? (big metallic pice ? )
Versus Li-Po?

Regarding FW update… i guess that it is a philosophy question… my experience is that ‘don’t change to many parameters before the basic problem is understood’. But i guess that if you suspect the sw then the latest version is a valid action. anyway… i will do as you suggested.

The PID’s are from the supplier, but I think their experience with ArduPilot is quite limited… Know for a fact they preferred to use old DJI controllers… I guess that I should start over with all settings soon.

Oh yea, much worse than Lipo’s in this regard. You will find many posts here about that and it’s my own personal experience. Usually it manifests itself on smaller craft where physical isolation is difficult or impossible.

I would believe that because some of the settings don’t make much sense. You may be better off to start from scratch.

Ok, so the vibration issue’s are sorted out… Cables under the antivibration bridge touched the bridge, coupling cable vibrations directly to controller. From 50 mean, and 70 peak vibrations (m/s/s) down to 10/20 with cables rerouted… (The antivibration bridge was actually a nice piece of engineering.)

(Screws passes through large openings in middle bridge, and is mounted in FC and the lower plate, and foamy stuff is placed between bridge and plate, and also between FC and bridge. But the cables were in contact with the lower plate causing the excessive vibrations. Anyway… easily sorted out…

But the compass issue seams like a worse nut to crack. Graphed battery current versus magnetometer values… and the current has a linear impact on the magnitude of the magnetometer values… The strange thing is that the internal and external magnetometers seams to be like vise affected… Had thought that the external should have coped better… But I guess that the current flow through the individual battery cells might cause magnetic fields close to the external compass/magnetometer located in the GPS module. (The FC is mounted below the back end of the battery pack)

Have ordered an external magnetometer module for further experiments… Wondering if magnetometer placement on the end of one of the landing legs might help up my situation.
Will also try with some 10Ah Li-Po’s to see the difference to the 28Ah Li-Ion packs.

Run MagFit for each compass and get all the updated correction values, including COMPASS_MOT. That will address the current issue.

Ok… will lok into that…

Another thought… could ‘gps for yaw’ /moving Basline replace the magnetometer based compass completely? Or is a magnetomerer compass a must?

GPS for Yaw requires requires two GPS units mounted as far apart as you can get them, and it’s not a complete replacement for the compass.
Just see if you can do a flight in Loiter mode with lots of yaw and some circle or Figure 8 patterns, then post a link to that log.
We will step through the magfit process, and look for other issues.

Thanks!
Will start next week with updating to latest, and progress from there…
Ill be back… =)