Shop OBEX P1 Docs P2 Docs Learn Events
Hm55b — Parallax Forums

Hm55b

SatRatSatRat Posts: 1
edited 2008-09-26 21:47 in BASIC Stamp
Does anyone have a way to reduce the erratic output (jitter?) from the HM55B compass module?· I have tried calibration many times, and also used a 5 sample averaging routine, but the output readings still bounce around + and·- 10 degrees or more, making it marginally useful for sensing and correcting direction.

Comments

  • Stonebridge12Stonebridge12 Posts: 2
    edited 2008-09-26 20:40
    I've tried the compass also and wish I could find a way to make it less 'jittery' (as you call it ). I think I've gone down the same route as you trying to use software to help tame it. It doesn't matter if I solder this, breadboard, etc... I've also tried running the DEMO in an environment virtually free from interference. There's always seem to be alot of bouncing.

    I'd love to get the HM55B compass to work like this -> : http://thedigitalcompass.com/ (check out the video (but not the price tag [noparse]:)[/noparse]) ) and how accurate the graphics correspond to the movement of the device.

    I want my HM55B to be like this... [noparse]:([/noparse]
  • Mike GreenMike Green Posts: 23,101
    edited 2008-09-26 21:04
    If you read the HM55B module datasheet, you'll see that it's specified for only 6 bits of accuracy after calibration. This is 6 bits (64 values) out of a possible circle of 360 degrees or a 6 degree resolution at best. If you want better, you have to pay for it.
  • Jesse HastyJesse Hasty Posts: 29
    edited 2008-09-26 21:47
    It will apparently take up to 20 measurements per second. You should be able to use a smoothing algorithm to give you pretty good accuracy. I would update 3-4 times a second based upon the last 20 readings with some weight advantage for the more current readings. It might take up a significnt portion of the stamp's computing capacity. I would try the simpleest thing first. Every .25 sec average the last 20 readings. If the twitter is random this will not work well, but if the twitter jumps between two readings with a duty cycle based upon the actual reading versus the 6 bit reading it should render fairly accurate results.

    It will be very difficult to get such a sensor to indicate slew rates greater that 6 degrees per second, and indeed the computed results will still twitter at·slew rates greater than 6 degrees per second.·

    Post Edited (Jesse Hasty) : 9/26/2008 9:55:00 PM GMT
Sign In or Register to comment.