Shop OBEX P1 Docs P2 Docs Learn Events
compass recommendations? — Parallax Forums

compass recommendations?

bishopbishop Posts: 82
edited 2005-04-19 18:41 in Robotics
i'm looking to use a compass on my next bot project.
any recommendations?
thx!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
**************

daniel woolston
Teksystems Inc.
www.danwoolston.com
**************

Comments

  • geekythinggeekything Posts: 53
    edited 2005-04-17 20:00
    I've got the Devantech unit, which is the R117 listed above. Decently made part and definitely a "real" digital compass compared to the other suggestions.

    The only issues I can think of:

    - You'll need to calibrate it (no big deal)
    - For some reason, you can't use the Stamp I2C commands with the Devantech unit. Someone correct me, but I think this might be a Stamp issue more than anything
    - Like all compasses, if you're robot goes over major terrain, consider building a gimbal to compensate for roll and yaw

    One final question: do you really need a compass? Most folk really only want to know relative heading (followed by dead reckoning), not absolute. If so, consider a MEMS gryoscope, too. They're much smaller in footprint and easy to use.

    -marc
  • bishopbishop Posts: 82
    edited 2005-04-17 22:46
    yeah..now that i think about it...really i'm only interested in relative heading. without wheel encoders (bot will be tracked) i'm interested in making definitive turns (x amount of degree, despite traction slip). maybe i'll explore the idea of mems now.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
  • bishopbishop Posts: 82
    edited 2005-04-17 22:57
    maybe i'm misinformed...but how can i get a positional turn bearing from a gyro? doesnt that measure only angle velocity?
    i've not worked with them before, so maybe i'm not seeing something here....

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-17 23:13
    By integrating the signal you can derive the angle.

    If you do a constant rate of rotation it only requires the start time, stop time and the constant angular velocity: Θ = (delta time)∙α.

    For non-constant it requires to minuature summations of angles using what is called Euler's method of linear aproximation and is explained rather well here: http://www.ugrad.math.ubc.ca/coursedoc/math100/notes/mordifeqs/euler.html
    by subdividing the total angle into many peices you construct a peicewise linear reconstruction of the angle by assuming the change in angular velocity between your present position and the previous position is linear. This is true if the 3rd derivative of the angular·position is 0,·IOW acceleration is constant over the time period.


    Post Edited (Paul Baker) : 4/17/2005 11:27:52 PM GMT
  • bishopbishop Posts: 82
    edited 2005-04-17 23:31
    hmmm...
    well here's an interesting problem. a tracked robot doesnt turn at a constant rate. so I'd have to use Eulers method in figuring the linear displacement. but with a cursory look thru the equation, i'm not really sure that I'm finding how the gyro data will figure in. keep in mind, i've never touched a gyro, so i'm not really sure what kind of information i'm going to get back to the stamp. maybe i should pick up one of those first, tie it in to the stamp and then go from there.
    thanks for the info..i'm sure its going to be needed in the immediate future.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-18 00:01
    The ADRXS series from Analog Devices is highly recomended. The only problem is they are in BGA packages, but www.sparkfun.com has a board using it, the ACL-IMU-320 has an ADRXS401 and ADXL320 accelerometer for <$100.

    Heres a drawing explaining eulers method pictorally, it will explain much of the concept to you.

    attachment.php?attachmentid=37602

    The black line is the actual angular velocity over time, the vertical red lines represent when you aquire data and the lines connecting·your measured values·is the assumption of Euler and the resultant error is the difference between the red and black lines. For the first two time periods it does quite well estimating the actual curve but doesn't come close later on. By taking more samples you get closer and closer to the curve. To calculate the delta Θ over the time period you compute the area created by the trapezoid for the time interval of the current sample and the previous sample and keep a running sum of these areas, this sum is your angle.

    Post Edited (Paul Baker) : 4/18/2005 12:08:14 AM GMT
    494 x 253 - 12K
  • bishopbishop Posts: 82
    edited 2005-04-18 00:48
    yeah..that did help for clarity....thanks for the extra effort!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-04-18 12:07
    No problem, its a handy graph to have in my repertoire, this question comes up occasionally on the boards. This method will also work with determining extra data from accelerometers such as velocity and position (position would require performing this method twice, or deriving a second order differential equation and using Euler to approximate its numerical solution to perform a direct conversion from acceleration to position)
  • bobledouxbobledoux Posts: 187
    edited 2005-04-18 12:58
    Geez, that was the method used to explain calculus integration to my advanced high school class, 40 years ago. They didn't call it Euler's method back then. Now, let's talk about limits....
  • Ken GraceyKen Gracey Posts: 7,386
    edited 2005-04-18 14:51
    Parallax is manufacuring a digital compass product using a Hitachi part designed for automotive use. The finished compass will cost $29.95 and have an SPI interface. Our current lead time of 100 days is expected to end in about 40 days, at which time we will have the parts in stock. They'll be a DIP module much like the Memsic 2125.

    Ken
  • bishopbishop Posts: 82
    edited 2005-04-18 16:51
    Ken: thats really cool.
    any kind of stats or info yet?


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
  • geekythinggeekything Posts: 53
    edited 2005-04-18 22:04
    Ken: aren't most automotive compasses fairly low resolution? i.e. 8 or 16 points?

    -marc
  • bishopbishop Posts: 82
    edited 2005-04-19 18:41
    yeah..kinda like the dinsmore series, from the sounds of it. i think they're manufactured for automotive purposes.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    **************

    daniel woolston
    Teksystems Inc.
    www.danwoolston.com
    **************
Sign In or Register to comment.