Shop OBEX P1 Docs P2 Docs Learn Events
Using an H48C accelerometer — Parallax Forums

Using an H48C accelerometer

pjrpjr Posts: 14
edited 2009-05-08 16:33 in Propeller 1
I'm starting a prop based project, that among other devices, will interface to a H48C 3-axis accelerometer.
Going through the spin object that interfaces to the Parallax module (#28026), I've noticed that besides retrieving the G's for each axle, you can also get angles between them (Theta's)...
However, I couldn't understand what they represent, and what could they be used for. Any ideas ?

Thanks

Comments

  • Beau SchwabeBeau Schwabe Posts: 6,568
    edited 2009-05-08 16:19
    pjr,

    Welcome aboard!

    The theta returned is a 13-Bit angle that is derived from the "RAW" X,Y and Z values.

    A 13-Bit angle simply means that instead of 0 to 359, the values range from 0 to 8191. To convert the 13-Bit angle into Deg ...

    Deg = ({13-Bit Angle} * 45 ) / 1024

    Angles are derived by combining only two of the X,Y, and Z coordinate values into a Cartesian to polar conversion routine that results in the equivalent deg.

    Theta A - uses the XY Cartesian coordinate plane to derive a 13-bit angle
    Theta B - uses the XZ Cartesian coordinate plane to derive a 13-bit angle
    Theta C - uses the YZ Cartesian coordinate plane to derive a 13-bit angle

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.

    Post Edited (Beau Schwabe (Parallax)) : 5/8/2009 4:24:23 PM GMT
  • pjrpjr Posts: 14
    edited 2009-05-08 16:33
    Beau,

    But what do the angles mean ?
    For instance, Theta A: does it mean the current angle just described in the XY plane by the H48C chip ?


    Paulo
Sign In or Register to comment.