Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 3 of 3

Thread: Need advice on compass parts for Teensy units.

  1. #1

    Need advice on compass parts for Teensy units.

    I need help with magnetometer usage and part selection for a compass use case. I have a QMC5883l up and running, but I can't use the data. I might need to switch units and want to choose wisely.

    Presently the QMC5883l returns readings that are stable if the unit is held stable...but it seemed like when I tilted the unit to a new position and then tilted back, the readings wouldn’t go back to the original value. I tested this further by subjecting the unit to an external magnetic field supplied by a permanent magnet. I can see the output values change, but when the magnet is removed the values definitely do not return to the original value. Also, earths magnetic field is supposed to be .25 to .65G...I have the unit set to 2G sensitivity...but see much less dynamic range in the output data than that would suggest...and widely variable between each axis. Is it normal for magnetometer units to act this way or could I have obtained low-quality units?

    I have seen other units with tilt compensation etc, but I'm skeptical the libraries to support them will be compatible with the non-standard I\O pins I need to use with implementation with Teensy units. Can anyone recommend a known-good unit that can easily be used as a compass interfaced with non-default I\O pins on a Teensy?

  2. #2
    Senior Member
    Join Date
    Jul 2014
    Posts
    2,665
    Quote Originally Posted by kdharbert View Post
    I tested this further by subjecting the unit to an external magnetic field supplied by a permanent magnet. I can see the output values change, but when the magnet is removed the values definitely do not return to the original value.
    AFAIK, that is what it is to be expected. That is why you calibrate sensor before and check after usage.

  3. #3
    Senior Member
    Join Date
    Oct 2015
    Location
    Roma (IT, EU)
    Posts
    336
    Quote Originally Posted by kdharbert View Post
    Is it normal for magnetometer units to act this way or could I have obtained low-quality units?
    I got crazy trying to find a reliable unit. I tested maybe 3 o 4 of the most talked about, with tilt compensation etc., with "sphere" calibration etc.
    Never got reliable results. Gave up in the end.

    Best of luck, will look at this thread so see if I can learn something!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •