Shop OBEX P1 Docs P2 Docs Learn Events
Just got my compass chip — Parallax Forums

Just got my compass chip

edited 2009-05-08 02:54 in Robotics
I have it wired in, but am not getting any data out of it.

Its the HM55b I believe.

I am running the test program, but as near as I can tell it just keeps saying that the status is not ready.

Any ideas on how I can trouble shoot this device.

Comments

  • edited 2009-05-07 03:40
    Hi everybody, I just wanted to let you all know that I got my compass working now.

    It was a matter of switching two wires, for the next person running into this problem if you look very closely pin five on the chip goes to pin four on the microprocessor and visa verso so I got the 4 and 5 pins crossed.

    This could be a common problem for people just starting out with this, but once that problem was fixed I started getting my compass information just like I was supposed to and it worked really well, seems to give readings between one and two degrees.

    I am going home now, but pretty soon I want to look at calibration. I am wondering right now if I really need calibration just for navigation around a room when I don't really care if I am going north or south, but just want to measure relative position, in other words do things like make turns of 90 and 180 degrees?

    Well thanks for taking the time to have a look at these posts, I really like the compass chip, now that I have gotten it working.
  • modemmanmodemman Posts: 41
    edited 2009-05-07 04:20
    I strongly recommend you calibrate even if you don't care where the Earth magnetic poles are. This will definitely increase the accuracy of the compass (it gives it proper references) and help you measure those 90 degree angles better. If you're indoors and not in some open field, it is difficult to use a compass like the HM55b for geo-navigation anyway. I find it quite adequate for using as a 90 degree turning reference though. My code is not so good and the HM55b is not speedy (takes a while to get a reading and to process that ATN function), so my robot goes into an annoying dance while trying to find that "perfect corner turn". I guess it's a matter of compromising, averaging and understanding how to build an efficient subsumption engine - I'm just not there yet.... oh yeah, I'm still on BS2 (I'm forgetting Propeller folks don't have speed issues).

    Glad to hear you figured out your wiring issues.
  • HumanoidoHumanoido Posts: 5,770
    edited 2009-05-07 10:28
    This compass works well on a BS2px which is fully capable
    of processing directions quickly and efficiently in real time.

    With a fine calibration based on the actual position "on
    the chip surface" some very accurate results can be obtained,
    very suitable for navigation in areas where there is no
    interference from magnetic sources. It is possible to achieve
    reasonable indoor navigation. A quick check to see if the area
    is clear - look for magnetic fields with a cheap mechanical
    compass.

    To get started, take a look at some of the Penguin robot
    compass programs, in particular, the 18 band radio. These
    divisions can be modified and made to a finer resolution.
    There are more compass programs at the PRS Penguin Web
    site.

    humanoido
  • modemmanmodemman Posts: 41
    edited 2009-05-08 02:54
    Humanoido,

    I finally went and checked the Penguin stuff and I almost can't believe the amount of information you were able to put up. I'm fairly new here (started in March this year) and I have to say that looking at your various posts, projects and code, not only I've learned a great deal (like how simple and fun it is to hook up 2 BS2 boards, for example), but I also did something that I find to be very cool: I actually completely trashed all the bloated code I've written (mainly by adapting what I've copied from Parallax and others) and decided to rewrite everything from complete scratch. The result is a very modest new start (a-la "roaming with xxx"), but it's tiny, compact, I know how and why I'm doing it and I'm finally proud of it.

    Thanks for your great efforts to share your knowledge and experience. Man, you really did a lot of stuff!!!

    PS. Just switched to a BS2p and things are indeed more pleasant.

    Eric,

    Just finished playing with some compass code (courtesy of Humanoido) and wanted to confirm that - on the BS2P at least (which is a tad slower than the BS2PX on the Penguin, but much faster than the plain BS2), the compass works really smooth, and I can finally do close-to-real-time readings. As highlighted before, do the calibration - it's not a big deal, but makes a difference.

    modemman
Sign In or Register to comment.