I have several 3-axis magnetometers mounted on breadboards, and they all read correctly in the x and z directions.

The Y direction is very strange; when turned to read 0, then turned 90 degrees counter clockwise, it reads 0 again. Then the values gradually get larger, peaking at about SE.

What could cause this behaviour?

I thought I had determined the breadboard itself was magnetic but I can't reproduce that.

  • \$\begingroup\$ I was going to say some magnetic material nearby. Can you add some leads and move the sensor around? \$\endgroup\$ – George Herold Feb 24 '15 at 2:12
  • \$\begingroup\$ Same issue with leads. If it was something nearby I would expect it to affect every axis. Thought it could be the breadboard because that was stationary relative to the board. \$\endgroup\$ – evandentremont Feb 24 '15 at 2:15
  • \$\begingroup\$ Yeah I wanted to get it off the bread board? How sensitive is it? Nickel is magnetic ... though Nickel plating is thin. \$\endgroup\$ – George Herold Feb 24 '15 at 2:15
  • \$\begingroup\$ Yep. It's on 10" leads now and same behaviour. \$\endgroup\$ – evandentremont Feb 24 '15 at 2:16
  • \$\begingroup\$ It definetly isn't something in the area, when tipping the magnetometer on it's side the Z axis works as expected, and the Y (now Z) shows grossly different numbers when facing up vs facing down. \$\endgroup\$ – evandentremont Feb 24 '15 at 2:22

I'm not 100% sure what the issue was, but found a better firmware that works much better, and even on the breadboard.

It calibrates the compass before using it, that's the only significant difference I see.


|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.