ADXL 345 - Meassure rotation angle no matter sensor angle


I have been searching and looking for a way to calculate an X degree rotation on the center of the ADXL, no matter what tilt of the ADXL.

So even if the chip is in a 32 degree angle, i can not figure out how to calculate the rotation.


I don't see the problem yet. If the absolute angle was 32° before and 66° after the "event" the rotation angle was 34°, so the difference between the two values.
Maybe you're looking for something completely different but I didn't find out yet what it is.

Hi, i might just be complicating it all in my mind - Lets say i have a robot arm, and the chip is mounted on the arm itself, as the arm raise and lowers the tilt of the chip is changing - And when the arm then rotates, i need the X angle change in rotation - So the rotation compated to the earth surface no matter the tilt of the sensor.

Thanks mate, i am looking at it as we speak.

Looks interesting, but from the article i would need the Yaw now the roll - Maybe i can use same calculation?

No, an accelerometer can measure only tilt angles with respect to gravity: pitch and roll.

To measure yaw you need a magnetometer (electronic compass), and to do that irrespective of tilt, you need both (search for "tilt-compensated compass").

I see your point, and i understand my gray hairs better now.. I guess that would also be the case even if the chip was not mounted in the center of the the rotation?

The chips can be mounted any way you like, and do not have to be mounted at the "center of rotation" to measure a rotation angle.

Of course orientation matters when you interpret the measurements, but in a sophisticated system, there should be a method to "tare" or define zero rotation regardless of how the sensor is mounted.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.