Log in

View Full Version : NavX Compass Stuck at 270


Brindlefly
14-01-2016, 20:57
This year our team is working with the NavX for both its gyro and its compass. While experimenting with it I was able to get the compass values but when I redeployed I found that the compass was stuck at 270 degrees. When I saw this I tried to pull gyro values to confirm that the NavX was working and I found that the gyro was working fine. Any help with getting the compass unstuck would be much appreciated.

slibert
15-01-2016, 00:15
This year our team is working with the NavX for both its gyro and its compass. While experimenting with it I was able to get the compass values but when I redeployed I found that the compass was stuck at 270 degrees. When I saw this I tried to pull gyro values to confirm that the NavX was working and I found that the gyro was working fine. Any help with getting the compass unstuck would be much appreciated.

Have you calibrated the magnetometer? The output of the magnetometer is only valid once calibrated. See this page for more info: http://navx-mxp.kauailabs.com/guidance/magnetometer-calibration

Brindlefly
21-01-2016, 20:44
I have been messing with the calibration all week and I can get it unstuck but it never gives me actual reading. Sometimes when I calibrate it returns an angle of around 280 and other times it will give me an angle around 300-360 and 0-45. I think I am doing the calibration correctly (I have a box with labels of each axis and I rotate it along with the pictures). It would be great to get some help with the calibration.

slibert
22-01-2016, 01:45
I have been messing with the calibration all week and I can get it unstuck but it never gives me actual reading. Sometimes when I calibrate it returns an angle of around 280 and other times it will give me an angle around 300-360 and 0-45. I think I am doing the calibration correctly (I have a box with labels of each axis and I rotate it along with the pictures). It would be great to get some help with the calibration.

After you have calibrated the sensor, when you display the values from the sensor in the navXUI utility, is the "Magnetic Disturbance" indicator shown? [This indicator is also available in the Java, C++ and LabVIEW libraries.]

The navX-MXP magnetometer calibration includes enough information for the software to determine the expected strength of the earth's magnetic field. And if it receives values that exceed that expected strength of the magnetic field, it determines that the magnetic field it is mesuring is "disturbed". When this reading is "disturbed", the values are not useful. This is described a bit more in the "Magnetometer Calibration" online documentation (http://www.pdocs.kauailabs.com/navx-mxp/guidance/magnetometer-calibration/).

For instance, once the navX-MXP magnetometer calibration has been performed, if you operate the navX-MXP and move a cell phone (which emits a small magnetic field very near the cell phone) near the sensor, the sensor reading goes haywire and the "magnetic disturbance" indicator is displayed.

The earth's magnetic field is relatively weak compared to the magnetic field from PCs, cell phones, robot motors and other things like that. So small amounts of magnetic disturbance can cause big problems w/the compass readings. The "Magnetic Disturbance" indicator tells you when this is happening.

If you've followed the documented magnetometer calibration steps as you've said, that's the next thing to look into. I am suspicious you are operating the sensor near other magnetic fields (for instance, near a PC which uses motors to spin a fan to keep it cool, or near a cell phone, or near energized motors on you robot).