Internal Compass not showing up

I just recently put together a quad build. I have used Pixhawk on a previous build and decided to use one on this build. I set everything up fine, did calibration, but sporadically got "Compasses are inconsistent" pre-arm warnings.

I went back today to do another calibration and I noticed that in the two windows that show the point cloud of calibration points, only the external compass is showing movement as I move the quad around. The second window that is supposed to show the internal compass does not change with movement.

It would seem that the internal compass is not being read or is not delivering data.

How is a good way to troubleshoot the internal compass?

Thanks,

Paul

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • Well, after doing full resets of the board and simplifying it as much as possible, I still cannot get the board to detect the internal compass. So, without anything else to go on, I have to assume that its possible that the mag chip itself has actually gone bad. I didnt think that would be likely. Unfortunately I have had to order a second Pixhawk to finish what I was working on. If this is the case, I am not impressed with the board/component quality. Granted, this may be a one off thing, but thats such a cheap part to go bad on such an expensive board/device.

    I may still see if I can replace the chip and see if that can resurrect the internal compass. We will see.

  • I ran a test this afternoon. In the first, I had the external compass connected via the I2C port.  I did the calibration wizard. I could see the left window update as I moved the copter around. The right window/axes do not move.

    When I am done, a window does pop up that shows it has calibration data for two compasses. I then look at the parameters. Here is a synopses of what I see:

    COMPASS_DEV_ID: 73225

    COMPASS_DEV_ID2: 131594

    COMPASS_DEV_ID3: 0

    COMPASS_EXTERNAL: 1

    COMPASS_LEARN through COMPASS_MOTCT are all 0

    COMPASS_OFS_X: -89

    COMPASS_OFS_Y:  -32

    COMPASS_OFS_Z: -127

    COMPASS_OFS2_X: 12

    COMPASS_OFS2_Y: -40

    COMPASS_OFS2_Z: -6

    COMPASS_OFS3_X through COMPASS_PRIMARY are all 0

    COMPASS_USE: 1

    Then, I disconnect the external compass. I do a calibration as before. The following is what is written afterwards:

    COMPASS_DEV_ID: 131594

    COMPASS_DEV_ID2: 131594

    COMPASS_DEV_ID3: 0

    COMPASS_EXTERNAL: 1

    COMPASS_LEARN through COMPASS_MOTCT are all 0

    COMPASS_OFS_X: -89

    COMPASS_OFS_Y:  -32

    COMPASS_OFS_Z: -127

    COMPASS_OFS2_X: 12

    COMPASS_OFS2_Y: -40

    COMPASS_OFS2_Z: -6

    COMPASS_OFS3_X through COMPASS_PRIMARY are all 0

    COMPASS_USE: 1

    The main differences are that COMPASS_DEV_ID now shows the higher ID (not sure what the bitwise or integer meaning of that is), and COMPASS_EXTERNAL is set to 0 for internal since it could not detect the outer compass.

    If I run the console and test compass with the external compass disconnected, then move the pixhawk around, I can see a "little bit of movement or change" but certainly not what i see when I do do the same with the external plugged in.

    Before ending my tests, I took the Pixhawk out of my copter to make sure that it was not near anything that perhaps was causing interference. Same results.

    I cracked open the Pixhawk to see if there was anything obvious on or near the compass chip (charring, smoke, bad solder joints, etc.). So far I have not seen any red flags.

    I have dealt with a fair amount of mems type IC's and I dont think I have had one go bad other than when getting overvoltaged or overheated by heat gun, solder station, etc. So, I have a hard time believing that the chip all of a sudden went almost bad (there was some sign of life as far as what I get back from the Pixhawk, just not correct of very large values).

    My next guess is if there is something that could occur if for some reason I use my Pixhawk that had year old firmware on it, then it was upgraded. If for some reason a mix of parameters could cause an issue for it. 

    I may try to downgrade firmware if that is possible. I havent looked into doing that before but I imagine its doable. 

    I do have access to a logic analyzer so I may see if any of the I2C lines are brought out to a good place and put that on it and see if I can see any data coming from the chip.

    I suppose I could start trying to develop for this and get the firmware package and put debug in around the I2C/Compass code, but I was wanting to focus on getting my quad together not digging through code at the moment. That may change.

    I hate the idea of having to pick up another Pixhawk when I dont know if there is anything wrong with it in the first place, or if its firmware (I am a long time firmware engineer by trade, so I know that is a definite possibility) :)

    Thanks for the help. Any other ideas of things to try are welcome too. I have looked in the forums and have seen a few instances of similar occurances, but no resolutions. 

    • I have tried downgrading firmware with no luck.

      Has anyone heard of the magnetometer chip going bad on a Pixhawk itself?

  • After you complete calibration does it give you two sets of offsets? I know when I calibrate mine the second one barely seems to follow but I get two sets when completed.

    You could try removing your external and try calibration again and see what happens.

    Russ

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…