Shop OBEX P1 Docs P2 Docs Learn Events
sensing tilt in two axis using inclinometers — Parallax Forums

sensing tilt in two axis using inclinometers

nvg_indnvg_ind Posts: 1
edited 2009-08-03 05:59 in Accessories
I am using a dual axis mems based accelerometer... The problem is that I want to find two axis tilt for a platform that has two degrees of freedom...but while using accelerometer to find tilt the problem is that if there is already a tilt in one axis the other axis shows incorrect tilt..
Is there any mathematical solution to the same....

Comments

  • kwinnkwinn Posts: 8,697
    edited 2009-08-01 23:32
    As long as the third axis is fixed and known you can correct mathematically.
  • cessnapilotcessnapilot Posts: 182
    edited 2009-08-03 05:59
    Hi nvg_ind

    The angles PHI and RHO are the angles that the X and Y accelerometer axes make with the fixed reference XY plane. When the sensor is horizontal, both Ax, Ay are zero, so are PHI and RHO. Basic tilt angles can be generated from the accelerometer outputs using the next equations since the X- and Y-axes follow the sine function. It should be noted that these angles are not (!) the pitch and roll angles typically used in aeronautics, nor are they the direction cosine angles for describing which direction a vector is pointing. When g = 1·

    PHI = ARCSIN(Ax)
    RHO = ARCSIN(Ay)

    Better to use 3-axis accelerometer for tilt sensing, as you can combine the Z-axis data to obtain maximum and uniform·sensitivity.

    PHI = ARCTAN(Ax/SQRT(Ay*Ay+Az*Az))
    RHO = ARCTAN(Ay/SQRT(Ay*Ay+Az*Az))

    By monitoring the sign of the Z-axis output, you can tell which quadrant the accelerometer is being
    tilted, consequently indicating inversion. The next table shows the expected signs for he X-axis and the Z-axis in each quadrant.

    Quadrant·· Ax······ Az
    ·· 1·········· +······· +
    ·· 2········· ·+······· -
    ·· 3··········· -······· -
    ·· 4··········· -······· +

    And, of course, all these are valid only when your sensor is at rest.

    Cheers,


    Istvan
Sign In or Register to comment.