View Single Post
  #4   Spotlight this post!  
Unread 22-01-2016, 01:45
slibert slibert is online now
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 356
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: NavX Compass Stuck at 270

Quote:
Originally Posted by Brindlefly View Post
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.

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).