Helps needed regarding readings from LSM303DLM Accelerometer

Hello,

I am relatively new to the Arduino platform and has never used an accelerometer before. I got the “obsolete” LSM303DLM 3D Compass and Accelerometer Carrier board from Pololu for a project that needs acceleration measurements. I have some questions regarding the readings from the LSM303DLM chip on Arduino.
_Using the Arduino Uno board and Pololu’s Serial Arduino sketch, with the board/IC chip placed upright, I got positive values for acceleration along the Z-axis (the board and the chip datasheet indicate positive Z as going up) and negative values when the board is upside down . When I tilted the board so that the chip’s positive X-axis aligned with gravity (straight down), I also got negative acceleration readings along X. The same thing happened along Y-direction as well. Basically, for some reasons, all my gravitational acceleration readings have opposite directions of what they are supposed to be! Could there be something wrong with the chip/sketch? (I did not modify the original sketch)
_Secondly, I am trying to convert the acceleration serial readings into g’s and according the instructions from http://www.instructables.com/id/Accelerometer-Gyro-Tutorial/step1/The-Accelerometer/, I need the zero-g voltage and linear acceleration sensitivity of the chip. However, the datasheet for the LSM303DLM does not explicitly state these values (at least none that I could find). Does anyone have these values handy that they could share? :smiley:

Any helps are greatly appreciated. Thanks in advance!
John

The accelerometer measures the difference in acceleration between the actual sensor (which can be thought of as a mass suspended from a spring) and the package containing the sensor. When the package is sitting on the table, the Earth’s gravity applies 1 g downward on everything, including the sensor, while the table pushes up with 1 g on the package. Perhaps that will help you to think about the signs.

However, keep in mind that the signs of the acceleration values may be changed by whatever program you are using to display the values.

To calibrate the accelerometer properly, you need to determine the offsets and scale factors for each axis. My favorite approach is very well documented at sailboatinstruments.blogspot.com … ation.html

The blog describes calibration of the magnetometer, but the same procedure works for the accelerometer as long as everything is held still while the data point is being collected.