cancel
Showing results for 
Search instead for 
Did you mean: 

LIS3DH with strange output values

Rafael Costa_2
Associate
Posted on February 02, 2018 at 19:40

Dear all,

    

   For one important project i need to detect the human falls. I am using the LIS3DH accelerometer configured as the following manner:  

        CTRL_REG1=0x77 //ODR=400 Hz, high-resolution mode/normal mode, ZYX axis enabled

        CTRL_REG2=0x01 // High pass filter enabled for AOI function on interrupt 1

        CTRL_REG3=0x40 // IA1 interrupt on INT1

        CTRL_REG4=0x84 // Output register not updated until MSB and LSB reading, high-resolution enabled

        INT1_THS=0x20      // 16mgx32=0,512g

        INT1_CFG=0x2A     // Or combination of interrupt events. Enable interrupt generation on X, Y and Z high event.

When the accelerometer has just the gravity acceleration applied along the z-axis, the output registers OUT_X_L, OUT_X_H, OUT_Y_L, OUT_Y_H, OUT_Z_L have the value 0, the register OUT_Z_H has the value 255.

When i apply acceleration the output registers OUT_X_L,OUT_X_H,OUT_Y_L,OUT_Y_H,OUT_Z_L just assume one of the following values: 64;128,192. The register OUT_Z_H have always the value 255. Obviously the values should vary between 0 and 255. When i apply acceleration is generated one interrupt on the pin INT1 detected by one microcontroller. On attachment i send the values of the output registers and the calculated acceleration.

Any help will be very appreciated.

Best regards,

Rafael Costa

#lis3dh-with-strange-output-values
3 REPLIES 3
Miroslav BATEK
ST Employee
Posted on February 06, 2018 at 21:17

From the screenshot I see the values for other output registers (except 

OUT_Z_H) are always the same, which is strange. Is it like that? I suppose your reading procedure is not correct.

Rafael Costa_2
Associate
Posted on February 07, 2018 at 10:41

Dear Miroslav B,

   My reading procedure was not correct. I want to read the output registers sequentially, but i forget to auto increment the address. To auto increment the address the MSB should be '1', as is explained on the section 6.1.1 of the datasheet.   

Best regards,

Rafael Santos Costa

nagarathna nagu
Associate II
Posted on May 04, 2018 at 08:57

hi,I am workeing with lis3dh accelerometer please can u tell me how to calcuate the raw data to reading