Compass problem on large rover

Hi all!

I have a problem with the compass on my lawnmower rover. My vehicle is equipped with a pixhawk autopilot with external GPS antenna with compass.
I am able to calibrate the compass successfully when the pixhawk and the antenna is not into the rover.
But when I put them again into the vehicle, the heading seems to be rotated almost 90 degrees from the real heading.
Unfortunately I can’t make the calibration process with the rover, because this vehicle is almost 50 kg.
Probably the magnetic field has changed on the rover, because it has a petrol engine which is realatively close to the antenna (30cm).
This website is talking something about “Large Vehicle Mag cal.”
https://ardupilot.org/planner/docs/common-compass-calibration-in-mission-planner.html
But I dont’t know how should I do that.
If you know any solution, please share me.
Thanks a lot!

Zoltán Bán

1 Like

Calibrate with pixhawk and antenna not in rover.

Later, arm admitting mag errors. Hopefully, when the motor rotates errors will be averaged and disappear. If not, place GPS compass far from motor.

I constantly observe this on single motor vehicles (rover, helicopter…).

1 Like

You can try to use In Flight/drive Compass offset learning. Set the COMPASS_LEARN parameter to 3. You will want a ground station connected or telemetry back to your radio as prompts and messages are given. Drive it around and the offsets will be learned. If it doesn’t finish then the offsets are probably too high (COMPASS_OFFS_MAX). You could relax this and try again but the basic problem is the mag is too close to things on the vehicle that are influencing it.

This is in Copter but the basic rules procedure applies. Page down near the bottom.
https://ardupilot.org/copter/docs/common-compass-setup-advanced.html

4 Likes

We operate very large rovers and gave up on magnetometers altogether. Our machines are >2 tonne, have diesel engines and cables carrying 800A peak. We use a moving baseline GNSS setup for heading. Magnetometers are very sensitive and the Earths magnetic field is relatively weak. It is very easy to distort the local field with ferrous metals and electric currents - in which case, the magnetometer becomes less useful. For most rovers, the course over ground as reported by the GNSS is a reliable heading but only while moving. You can reduce the EKF reliance on the magnetometer (and thereby increase its reliance on GNSS) using the EK2_YAW_M_NSE param (or EK3_YAW_M_NSE if you use EKF3). I have seen the new new large vehicle mag cal feature but have not used it. I think it would be worth lookig at if you are stuck with the magnetometer as your only absolute yaw source.

1 Like

Thank you guys! I will try with all of your advices.
One interesting thing: I checked the mag field with my phone’s compass exactly near the pixhawk’s gps antenna and the heading on the phone hasn’t changed. So i don’t understand yet what couses this heading problem.
On saturday I Can give it a try and than share my experiences to you!
Thanks for all!

I have some suggests to you:
1.You can set up the compass higher. Although it’s a bit ugly, it’s the fastest and best way to use it
2.You can use the compass of RM3100,It have better anti-interference performance. I have tested it. Compared with the common 8310 compass, the anti-interference performance is improved by at least 40%, which can better resist the motor interference
3.I suggest you use permalloy, which is a kind of metal that can shield the magnetic field. You can try to stick it to the area with the most serious motor interference, so that all magnetic fields can be isolated. However, you should note that this metal should be at least 1.5cm away from the rm3100 compass. And the closer it is to the compass, the smaller its area must be. My test result is that when they are about 2cm away, using 16 square centimeters of permalloy, it can reduce 60% of the interference of the aircraft, because I have completely shielded the power distribution board. It also proves from the side that the interference of motor is not as large as that of power distribution board in many cases

Hey, I think you can try the combination of rm3100 compass and permalloy. The specific reason is put forward in another reply

Permalloy certainly has its applications but does not typically help when dealing with compass interference unless the source is isolated to a very small area that you can cover completely. You can not shield the compass itself as this has the effect of also shielding the very same magnetic field that you are trying to detect.

1 Like

Yes, he will isolate all magnetic fields, including the Earth’s. But sometimes we don’t need to completely isolate all the interference. With the height GPS, you can increase the area of the shielding area appropriately. For example, if permalloy is used to reduce the interference by 20%, and rm3100 is used to improve the anti-interference performance of the magnetic field generated by the current, then the compass of the aircraft or vehicle may be fully used normally.

Now the vehicle is on my garage’s floor , but you can see the location of the compass. It’s the highest point of the rover. By the way, it is a neo m8n gps module.

https://drive.google.com/folderview?id=10ElyhMHWd56ATqXyIwJ673SZHNtaV5j8

1 Like

That looks very cool but I’m sorry, I can’t see you getting any sane yaw information from that magnetometer…

Can you give me a log?

It looks like the compass is in the right direction, but it’s not clear whether you actually enabled the external compass. In addition, is the external compass disturbed? You can start the car, but stay still and observe on the ground station whether the direction will automatically shift. Or remove the wheels, increase the throttle, and check if there will be more interference

1 Like

Hi! Sorry, but i am just a beginner in pixhawk and using mission planner. How can i save a “log”?

https://ardupilot.org/plane/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html
The fastest way to check the problem is to cut off the power supply of the car, but keep the power supply of the flight controller. Then connect to the ground station and observe in the state whether the values of mx, my, mz and mx2, my2, mz2 will be consistent. Then remove the wheels of the car, power the car and increase the throttle, and observe whether the values of the two compasses will change abnormally. If there is a yaw, I think you can clearly see it on the ground station without having to let the car go ahead

1 Like

Ok! Thank you! I will check that on saturday.

Post a screen shot of the HW ID screen from Mission Planner after connecting. And/or the parameter file.

But that location is bad so close to the alternator and other than a taller mast I’m not sure what else you can do with the mag in that module to significantly improve it.

This one is mine. Robot Mower

I couldn’t get any compass working consistently until I used the RM3100.

2 Likes

Very nice Rover Vincent!

Vincent - That also looks like another challenging environment for a magnetometer! You seem to have a bit more separation than Zoltán which will certainly help. Could you possibly share a log file so we can see how well the RM3100 perfoms?