An Accelerometer is a commonly used electronic device to measure acceleration. It is useful for sensing vibrations in systems or orientation applications. When installing the accelerometer, sometime it may feel difficult to identify the correct sensing axis directions for your device.
The following may help you to identify its axis directions.
Find the sensing directions from datasheet
For example, the datasheet for Analog Devices’ ADXL344 accelerometer shows its sensing directions of X-, Y- and Z-axis in the package with the help of the pin assignment on the actual component. If you know where Pin 1 is, the datasheet tells you where each sensing axis is for the part.
Check the output with gravity
Typically, an accelerometer has an output response when sensing a gravity, including regular old Earth gravity. By checking the output response in different physical chip orientations compared to Earth’s gravity, you can identify each sensing axis on the accelerometer.