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

DIY Robocars via Twitter
RT @a1k0n: @DanielChiaJH @diyrobocars @circuitlaunch Here's my car's view of that race. About 8.4 second lap times for laps 2 and 3... both…
19 hours ago
DIY Robocars via Twitter
RT @DanielChiaJH: Great racing against @a1k0n today at @diyrobocars! Pretty cool to both break sun-9s at the track today I think I got very…
Sunday
DIY Robocars via Twitter
Broadcasting the @circuitlaunch race live now at https://m.twitch.tv/diyrobocars Races begin around 2:00pm PT
Saturday
DIY Robocars via Twitter
RT @a1k0n: ran a huge number of hyperparameter tuning experiments yesterday; now I can train a new policy, far with better quality, in 15 m…
Saturday
DIY Robocars via Twitter
RT @a1k0n: Did I get rid of hand-tuned parameters? Yes. Am I still hand-tuning more parameters? Also yes. I have a few knobs to address the…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: I'm not going to spoil it, but (after charging the battery) this works way better than it has any right to. The car is now faste…
Sep 26
DIY Robocars via Twitter
RT @a1k0n: Decided to just see what happens if I run the sim-trained neural net on the car, with some safety rails around max throttle slew…
Sep 26
DIY Robocars via Twitter
Sep 24
DIY Robocars via Twitter
RT @SmallpixelCar: @a1k0n @diyrobocars I learned from this. This is my speed profile. Looks like I am too conservative on the right side of…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: @SmallpixelCar @diyrobocars Dot color is speed; brighter is faster. Yeah, it has less room to explore in the tighter part, and t…
Sep 24
DIY Robocars via Twitter
RT @a1k0n: I'm gonna try to do proper offline reinforcement learning for @diyrobocars and throw away all my manual parameter tuning for the…
Sep 23
DIY Robocars via Twitter
RT @circuitlaunch: DIY Robocars & Brazilian BBQ - Sat 10/1. Our track combines hairpin curves with an intersection for max danger. Take tha…
Sep 22
DIY Robocars via Twitter
RT @SmallpixelCar: Had an great test today on @RAMS_RC_Club track. However the car starts to drift at 40mph. Some experts recommended to ch…
Sep 11
DIY Robocars via Twitter
RT @gclue_akira: 世界最速 チームtamiyaのaiカー https://t.co/1Qq2zOeftG
Sep 10
DIY Robocars via Twitter
RT @DanielChiaJH: Always a good time working on my @diyrobocars car at @circuitlaunch. Still got some work to do if I’m to beat @a1k0n howe…
Sep 10
DIY Robocars via Twitter
RT @SmallpixelCar: My new speed profile for @RAMS_RC_Club track https://t.co/RtLb7TcgIJ
Sep 10
More…