Cannot get the “Output Axis” to work


I have a Virtuabotix MMA7361 Three Axis Accelerometer Module that I am trying to use to detect tilt. It works, but only for two axes at a time. It doesn't matter which way I try to flip or turn the board, but no matter what, the "Output Axis"(shown in the picture below) will not work. Am I mixing an axis up or messing up the orientation somehow? The spin and and the input axis seems to work no matter the orientation. I've tried twisting it and turning it, but out of X,Y and Z, only two of them work at any given time, with the last one staying near-constant.

The second picture is of the board I have. I am using an Uno to read the values.

enter image description here

enter image description here

Best Answer

You could use either a magnetometer, or a gyro to detect rotation around an axis parallel to the Earths surface.

If you offset an accelerometer from rotation axis, you could get some information to estimate a rotation angle, but it would be quite hard to do adequately (depending on how good it needs to be), and inferior to the other two sensor types.

I strongly recommend watching Sensor Fusion a google tech talk by InvenSense.

Among many things, it explains how to do what you describe.

There are some issues with sensors for only one of the phenomena (e.g. only magnetometer, or only gyro) for example drift from integrating gyro's. So "Sensor Fusion" is an approach, using a set of algorithms which derive better results by using values from different types of sensors together.

You don't need to buy an InvenSense sensor, though they are pretty low-cost on 'sales' web sites, often from China. Other companies make comparable devices, and there Open Source algorithms on the web.