Shop OBEX P1 Docs P2 Docs Learn Events
Cool Compass — Parallax Forums

Cool Compass

SouLJahSouLJah Posts: 35
edited 2006-11-29 09:31 in BASIC Stamp
I just got a compass, Hmb55, and I was wondering why is it that when i rotate the compass on a flat surface, and then back to it's orginal position I don't get the same reading I got intially??

Thanks for your help

SoulJaH

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 03:09
    Typically, this is caused by hysteresis. But I wasn't aware that the HM55B suffered from such a phenomenon. If, when you return it to its original oreintation, you were to overshoot a little and then come back, does the problem go away?

    -Phil
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 03:15
    Weirdly enough when I did what you said I got about the same as the intial readings.· What does this all mean??
  • jhoyozajhoyoza Posts: 72
    edited 2006-11-29 03:18
    Did you calibrate it?
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 03:25
    Yes I did, but even if I didn't I should get consistenly wrong answers..

    ·
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 03:26
    Well, it does look like hysteresis; and that's got me puzzled, because there shouldn't be any. At least the one I've been working with doesn't exhibit any. Can you post the code you used to take your readings?

    Thanks,
    Phil
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 03:38
    I am using the test code that came with the module
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 03:54
    I tried that code, modified for my setup, and didn't see what you're observing. How big of an error are you seeing in the degree readout?

    -Phil
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 04:17
    It's constantly off bby 10-20 degrees, and the readings even change when i translate in a perfectly straight line on a flat surface
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 04:23
    What does this mean in terms of raw readings (X and Y values)?

    -Phil
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 04:27
    Actually the x and y values are no more than 1-3 off the intial reading
  • edited 2006-11-29 04:27
    Have you looked over the documentation regarding magnetic interference sources? There's a lot of ways to throw off the readings.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • SouLJahSouLJah Posts: 35
    edited 2006-11-29 04:29
    Oh yeah I have checked it out, and I am following the guidelines
  • edited 2006-11-29 04:34
    Hmmm, the only time I've seen that symptom is when I applied a really large magnet to the device.· It would change the level of interfering magnetic field stored in the breadbaord and PCB.· No conduit with power cables underneath the desk or anything like that?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 04:35
    When the total raw reading is in the neighborhood of 20 or so, variations as small as +/1 can make a noticeable difference on the net result. Plus, as Andy said, interference can play a major role as well. Another thing you can test is how much the readings change when it's sitting still, with and without other, possibly ferrous, objects in the near environs moving.

    -Phil
  • terahertzterahertz Posts: 55
    edited 2006-11-29 04:53
    I use·the HM55 connected to my BS2 almost every day. Motionless, my values·vary by 2-3 degrees at the most. My repeatability is about +-8 degrees. I consider those values to be pretty good considering what it is (it's a fairly complex device).
    ·
  • edited 2006-11-29 05:05
    With averaging of multiple measurements, I've been able to get the variations down to about a degree, motionless.

    It's interesting to watch a Boe-Bot with a digital compass that's heading north take a +/- 60 degree detour, lining itself up with what I'm assuming is a pipe or rebar under the concrete foundation. It always does it in the same place on my office floor.

    Aside from the big magnet mentioned earlier, I haven't ever seen one of those modules exhibit "memory" like that.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Andy Lindsay

    Education Department
    Parallax, Inc.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2006-11-29 05:19
    SouLJah,

    Just out of curiosity, what is your system mounted to, i.e. what all moves when you rotate the HM55B? Also, are the raw readings symmetrical about zero when the compass is rotated by 180 degrees? If not, how much are they offset?

    -Phil
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-11-29 09:31
    Gents -

    If I had to guess on the source of the problem, I'd be willing to wager that it's probably an external electro-magnetic source which is skewing the readings. An unnoticed relay, motor, solenoid, or any device that has a magnetic coil within it would do the trick.

    That is really too large an error to be almost anything else.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
Sign In or Register to comment.