I've recently been constructing an arduino project that utilizes an accelerometer for its function. I know how an accelerometer works and what it is able to measure. In my application, I need to be able to measure acceleration on the X, Y, and Z axes, but ignore the rotation and orientation of the accelerometer. I've noticed that whenever I tilt the sensor, each axis becomes manipulated. I need a static way to measure acceleration without the influence of rotation. As I am unsure of how I would go about compensating for the rotation, any feedback is appreciated.
You need to add a gyroscope to get 6 degrees of freedom. You can then calculate the acceleration in you original axes by turning the acceleration vectors according to the rotation measurement.
Thanks for the feedback. Do you know of any documentation that explains this setup? This is what I initially had in mind, but I am not exactly sure how I would go about expressing this compensation in math.
A common acrynym here is IMU - inertial measurement unit. To determine attitude (and thus to be
able to convert readings between different inertial frames) you need 9DoF IMU, or if you don't
care about z-rotation, 6DoF IMU. Only by combining full 3D acceleration and gyroscope data can
one correct for rotation. Add a (calibrated) 3D magnetometer and you can get absolute orientation,
the accelerometer gives the gravity vector, the magnetometer the magnetic vector and the gyro
handles rapid rotation.
Fortunately these days it can all be one tiny MEMS package and very cheap...
If you are at or near the magnetic poles you cannot get absolute orientation as the magnetic and
gravity vectors become parallel - but few people try to fly quadcopters at the poles!!