1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Compass chips

Discussion in 'Embedded' started by Tim Wescott, Apr 3, 2014.

  1. Tim Wescott

    Tim Wescott Guest

    I'm looking at this chip: HMC5983-TR, along with its friends and
    relations.

    Anyone have any mileage with these? Are any ones particularly better or
    worse? Are any suppliers particularly better or worse?

    Mostly, I'm interested in knowing the direction of a rapidly moving
    platform with respect the Earth's magnetic field, as an aid to moment-to-
    moment navigation. So both accuracy and high bandwidths are big pluses
    to me.
     
    Tim Wescott, Apr 3, 2014
    #1
    1. Advertisements

  2. Tim Wescott

    John Larkin Guest

    I recently researched sensors, for a system that would measure ambient
    fields and apply a correction to an instrument. There was a medium-big
    thread on that here, a couple months back.

    I didn't like any of the Hall or AMR/GMR type chips for my
    application. They are usually slow, inaccurate, and often weird. I
    decided to use a fluxgate. Autonnic has some nice stuff, coils and
    boards. Ditto Speake & Co. Both British.


    --

    John Larkin Highland Technology, Inc

    jlarkin att highlandtechnology dott com
    http://www.highlandtechnology.com
     
    John Larkin, Apr 3, 2014
    #2
    1. Advertisements

  3. Tim Wescott

    mroberds Guest

    The only one I've used was already in a can, along with MEMS gyros and
    accelerometers and a GPS receiver, to create an integrated inertial nav
    box. I don't know which specific magnetic-compass device it used.

    From playing with it on the bench, they weren't fooling about not using
    steel bolts or otherwise having steel, iron, etc close to it. There are
    calibration procedures that can get around some of the effects of nearby
    iron, but you have to run them.

    In the finished product, I'm pretty sure I ended up ignoring the
    magnetic heading data, and just using the inertial and GPS stuff. I
    couldn't get out of having steel, and motors drawing non-trivial
    current, relatively close to the can.

    One other observation is that pretty much every one of these I've ever
    seen in a complete system, including ones where the user is expected to
    be clueless (automotive), have some kind of end-user-accessible
    calibration procedure. Usually you push the button and then rotate the
    compass sensor through 360 or 720 degrees and that's it.
    Depending on where you are on the planet, the Earth's magnetic field can
    do strange things. For instance, the nominal magnetic declination in
    Oregon ranges from roughly 16 to 19 East, but there are some local spots
    where it can be 4 East or 24 East - see
    http://pubs.usgs.gov/gp/1002d/plate-2.pdf . Sometimes these places will
    also be noted on the VFR aeronautical chart, as in these ones
    http://skyvector.com/?ll=43.02258773555188,-118.93267821889907&chart=301&zoom=4
    north and south of Harney Lake.

    Matt Roberds
     
    mroberds, Apr 4, 2014
    #3
  4. Tim Wescott

    Tom Gardner Guest

    Presuming there are no problems with nearby ferrous
    objects, you might still have to deal with problems
    like the one hinted at here...
    http://www.pilotoutlook.com/glider_flying/turning_error

    Sensor fusion and estimation is a seriously interesting
    topic. I don't know how much has been put into the public
    domain by various amateur organisations that create,
    for example, DIY drones.
     
    Tom Gardner, Apr 4, 2014
    #4
  5. Tim Wescott

    Tim Wescott Guest

    Ugh. I'd kind of thought about the whole magnetic disturbance thing, but
    not about magnitudes.

    I think maybe I'll just leave the compass out, and let the board get
    smaller. It's another sensor to fuse in a sensor fusion application, but
    it's only worthwhile if the data is good.
     
    Tim Wescott, Apr 4, 2014
    #5
  6. Tim Wescott

    Tim Wescott Guest

    How slow is slow? It needs to be teeny -- a 4mm square chip and its
    associated traces and bypass caps takes a huge bite out of my board space
    budget.

    I'm thinking maybe it's not worth the effort and board space.
     
    Tim Wescott, Apr 4, 2014
    #6
  7. Tim Wescott

    Tim Wescott Guest

    That's just a geometric problem due to the fact that left entirely to its
    own devices a compass needle would really rather point down into the
    ground in most places on earth. I already know how to deal with that one.
    I'm not sure either. It's certainly a complicated one. I've done sensor
    fusion stuff before: it's not trivial.
     
    Tim Wescott, Apr 4, 2014
    #7
  8. Tim Wescott

    John Larkin Guest

    I'd like about a KHz of bandwidth, and most of the compass-type chips can't do
    that. But if that's all the space you have for a 3-axis sensor, a fluxgate is
    out.
    --

    John Larkin Highland Technology Inc
    www.highlandtechnology.com jlarkin at highlandtechnology dot com

    Precision electronic instrumentation
     
    John Larkin, Apr 4, 2014
    #8
  9. Tim Wescott

    John Speth Guest

    Depending on where you are on the planet, the Earth's magnetic field can
    That's an interesting map. I didn't know there could so much local
    variation. I guess all that subterranean iron in motion can cause huge
    magnetic disturbances. Add to that the fact that the magnetic poles
    wander over time, it's even more complicated.

    My personal experience with magnetometers is that we tried to prototype
    the use of one in a device that included a pair of speakers (think
    permanent magnet). I can say confidently that such an arrangement is
    doomed to fail. The market forces of miniaturization make it worst.

    JJS
     
    John Speth, Apr 4, 2014
    #9
  10. Tim Wescott

    mroberds Guest

    In the application I was working on, it didn't matter so much, because
    the device was always used in a defined area that was maybe 100 m on a
    side, there was plenty of time to do calibration passes, and we almost
    always had GPS as well. If we could have beat the problems with steel
    and motor currents, the compass would have been a useful additional
    reference.
    The main things the compass seems to be good for is an absolute heading
    at zero or low speeds, before you switch to GPS, or an absolute heading
    if you don't have GPS for some reason.

    Matt Roberds
     
    mroberds, Apr 6, 2014
    #10
  11. Tim Wescott

    Tom Gardner Guest

    GPS won't give you your heading - when you are moving it will give you
    your track. The earth's magnetic field gives you heading, albeit
    with the significant ambiguities noted by others.

    To understand the difference, consider facing north, i.e. the
    heading is north. Now step sideways to the left while still
    facing north - the track is to the west.

    The threat indicator called FLARM has, necessarily, a significant
    well understood non-ideality: it indicates the threat relative to
    your track - which causes pilots to start looking relative to the
    aircraft's heading, until they consciously correct.
    http://www.flarm.com/
     
    Tom Gardner, Apr 6, 2014
    #11
  12. Tim Wescott

    rickman Guest

    How much is a heading off from a track in an airplane? The difference
    would only be due to wind?

    I used to geocache a lot and tried teaching some friends how to use the
    GPS. Often they just couldn't get used to the idea that this wasn't a
    compass and if you turned your body (and the GPS with it) the GPS didn't
    indicate that. As you say, it only knows which way you have moved and
    even then only once your movement was significant, 10 or 20 feet to get
    a decent "track" as you call it. But when I would use the GPS every
    week I got very used to it.
     
    rickman, Apr 6, 2014
    #12
  13. Tim Wescott

    Dave Nadler Guest

    It can be huge, especially if you're flying a slow
    plane in a strong cross-wind.

    While its possible to fly slightly sideways, the
    significant error will be the wind (except in
    helicopters which can fly sideways, backwards,
    etc).


    Hope that helps!
    Best Regards, Dave
     
    Dave Nadler, Apr 6, 2014
    #13
  14. Tim Wescott

    Dave Nadler Guest

    To meet FLARM's cost target, it was not practical to do a
    wind calculation (though perhaps an extremely simplistic
    circling-drift-estimation might have fit, that wouldn't
    have helped where the problem is more serious in strong
    winds - typically wave flying).

    In the ILEC SN10, I used true ASI (requires pitot-static
    sensor plus outside air temperature), and GPS track, to
    back-calculate wind. The cockpit display is nose-up via
    back-calculated heading, so avoiding the issue you mention
    with FLARM and making it easy to choose optimal cloud
    streets with the course.

    Hope that helps!
    Best Regards,
    Dave (principal designer ILEC SN10, former FLARM developer ;-)
     
    Dave Nadler, Apr 6, 2014
    #14
  15. Tim Wescott

    Tom Gardner Guest

    When landing, you sometimes sideslip to lose height without
    gaining speed. See a 45degree track/heading difference in

    lines up at 1:00, then look at the red woolen thread on
    the cockpit canopy. The sideslip is removed immediately
    before touchdown.

    Apart from that, ...As much as you want, if there is a
    strong crosswind. Consider a glider flying at 40kt at
    5000ft with a 60kt crosswind component! It is most
    easily visible when landing with a crosswind or when
    ridge running - where you may have a 30kt perpendicular
    to a ridge and be travelling at 60kt along the ridge.

    Basically yes, but if you really want to get into it
    you'll need to consider the difference between true
    north and magnetic north, yes.

    All sounds right!
     
    Tom Gardner, Apr 6, 2014
    #15
  16. Tim Wescott

    Tom Gardner Guest

    I'm unconvinced that it would be possible to give a
    reliably accurate correction for wind, especially
    when thermalling or where wind direction is highly
    variable near ridges or mountains.

    I'd always prefer something with predictable and
    trustworthy characteristics - even if those
    characteristics are in some ways not ideal.
    FLARM got it right!

    Ah, the easy case :)

    Good to hear from the horse's mouth! FLARM is a good piece
    of kit and I wonder if it will ever become mandatory in
    drones, e.g. to enable "sense and avoid" in Class G airspace
     
    Tom Gardner, Apr 6, 2014
    #16
  17. Tim Wescott

    Tom Gardner Guest

    I've flown "backwards" at -10kt in a fixed wing
    aircraft - specifically a K8 glider at 2500ft
    in a 40kt headwind with an airspeed of 35kt.
     
    Tom Gardner, Apr 6, 2014
    #17
  18. Tim Wescott

    Tom Gardner Guest

    Or you're sideslipping, see a 45degree track/heading
    difference in


    Ahem. Backwards at -5kt, doh.
     
    Tom Gardner, Apr 6, 2014
    #18
  19. Tim Wescott

    Dave Nadler Guest

    I've done it, though if the wind changes rapidly (when
    you cross into a different valley) it takes a while
    to converge.
    I think so, but I'm biased ;-)

    Well, no, the easy case is <hdg, true ASI>, <GPS track>,
    which is just a vector subtraction. Because of compass
    issues others mentioned above, I have no heading input.
    So, I have <unknown hdg, true ASI>, <GPS track>, which
    is the set of solutions differencing a circle and vector.

    Apply (poor man's) Kalman filter and presto, wind.

    I joined the FLARM team for a while to get FLARM into USA
    (software for PowerFLARM and legacy FLARM v5). We're now over
    800 units deployed in USA and growing well (I think its around
    26,000 worldwide).

    While FLARM is now mandatory for gliders in some European
    countries, the FLARM group would prefer to avoid anything
    mandatory, with the inevitable authorities showing up to help.

    Now I gotta find some more interesting projects...
    See ya, Dave "YO electric"
     
    Dave Nadler, Apr 6, 2014
    #19
  20. Tim Wescott

    rickman Guest

    I guess the real issue is that I never considered that heading was
    anything other than the direction you were headed rather than the
    direction your window was facing. Now I know...
     
    rickman, Apr 7, 2014
    #20
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.