Need proper documentation for using compass

Hi All,

I’m trying to use an external compass with the Navio2 and am really frustrated with the lack of documentation for this functionality. IT is a highly recommended setup but there is nothing in the documentation which tells us how to set it up correctly other than trawling through the forum and making sense of different bits of information

I am currently using ardurover 3.2-rc2
Currently when I check on mission planner .
I see that the compass 3 which i have set to external is not detected. Checking the COMPASS_DEV_ID3=0.

I am currently using the 3DR GPS + Magnetometer sensor (only the magnetometer is plugged in). I’m using the standard 3dr cable that goes between the mag port and the i2c port on the navio2.

I have already set the I2C baudrate to 400000 and when I do i2cdetect -y 1 <— (not in documentation - found on forum)

I get

I’m assuming 2 devices are present.

barometer and possibly the compass ??

So then whats next ?

how come my compass dev id3 = 0 ?

Can someone from emlid please update the compass docs ?

Also what external compass modules are compatible with the navio2 ?



I’ve also tried setting i2c speed to 1Mhz just to see what happens

Still doesn’t work.

If I can get some help as soon as possible that would be great as I am keen to test out my rover in the next few days

when I attempted to run ardurover manually.
I get the following in the console

Then just gibberish after that . This happens at bboth 400 Khz and 1Mhz I2C baud

I think you are making it more complicated than it needs to be. Usually you just plug the external compass in and it is autodetected. No need to set any parameters. External compass is set as compass1 and the external checkmark is applied automatically. If there is no bug in 3.2, this should be all there is to it.
Do you have an original 3dr gps+compass module? Is the I2C connector fully populated?

Yes, I have done all that.

I currently have a 3dr GPS + compass module (purchased from 3dr awhile back).

Currently, only the Mag port on the 3DR gps+mag compass is plugged in which connects to the I2C port on the navio2.

The 6 pin connector on the GPS is not connected to anything. After hours of trawling around the forum I came across this post this arvo. According the post, it seems that you do need to connect the 6way connector also. I will need to test this tomorrow when I get into work.

In your setup do you have the 6 pin connector hooked up? I was under the impression the 4 pin mag connector had power going in also. There is a small red LED that lights up on the GPS module when the cable is plugged in.

Also I was under the impression external compass will be dev ID 3 not 1 .

Again I see a need for all this information to be put into the docs

1 Like

I had some success today getting the compass working.

The 3dr gps + mag sensor needed both the 6pin GPS + 4 pin mag connector supplied with power. even though I’m only using the Magnetometer.

I currently disabled the internal compasses (DEV ID 1 and 2) and am only using compass 3. and calibrated by sensor.

I have aligned the arrow on my gps+mag sensor to point forward so that the sensor arrow forward points to the forward orientation of my platform.

The weird thing was that the rover was pointing in the opposite direction in mission planner to actual orientation
I then changed the orientation to Roll 180 deg. This puts my rover in roughly the right heading to what the platform is doing.
38 PM

I do notice that the compass ekf is very twitchy whenever I did a spot turn where the error would rise up and sometimes goes red quickly before falling back down. IS this considered normal behaviour?

50 PM

1 Like

I had the same problems with ardurover 3.2.
I always used the live calibration to check if my compass orientations where correct. It was a nice visual reference, but now only the onboard calibration is available and it is a total shot in the dark. I had the compass working one day and the other day it was 180° off. Without changing anything except the lipos of course. EKF is giving errors for turning the vehicle. North and south are ok, east and west result in bad compass health.
3 different external compasses fail to calibrate most of the time, even when set to relaxed. They were all working fine before.
I would suggest going back to 3.1.2.

Ok ,

Unfortunately, I can’t revert back to the old version as there are features in 3.2 which I need.
Currently, I’m running the compass with Roll 180 deg and it seems to be working but again sometimes when I do consecutive spot turns it throws the compass off a bit.

This topic was automatically closed after 100 days. New replies are no longer allowed.