Skip to main content
Visitor II
June 5, 2017
Question

LIS3DH Z output noisy

  • June 5, 2017
  • 2 replies
  • 1544 views
Posted on June 05, 2017 at 11:40

I am trying to measure a machine's vibration using LIS3DH sensor. 

I set the LIS3DH in low power mode and 5.376 kHz sampling frequency which outputs 8 bit output. I use spi to get the data from the sensor. I changed this raw output into �g' using the sensitivity value given in the datasheet.

My problem is: The sensor shows a fluctuation in its output of Z axis even when there is no vibration applied and the sensor is fitted on a horizontal surface. The range of this fluctuation is approximately from 0.6g to 1.2g. I have attached a image that shows such output. (X axis is time and Y axis is vibration in terms of g)

Can someone please help me to interpret why this is happening ? Is there a method to somehow remove this noise from the output ?

Please help.0690X00000607ETQAY.png

#lis3dh-spi #lis3dh #mems-accelerometer
    This topic has been closed for replies.

    2 replies

    ST Employee
    June 5, 2017
    Posted on June 05, 2017 at 15:42

    The fluctuation is really big, it is not correct.

    Can you please share your sensor configuration and the code how do you convert the raw data into acceleration in g?
    Visitor II
    June 6, 2017
    Posted on June 06, 2017 at 02:27

    Thank you for your reply. I do not understand what you mean by sensor configuration. I am using LIS3DH sensor in low power mode. The sampling frequency is 5.376 kHz and the output is 8 bit long.The range of output is +/- 4g. I use FIFO stream mode and watermark interrupt to accumulate the data. After reading the data from the FIFO I multiply it by 0.032 to convert it into g. I use Raspberry PI to process the data via SPI communication. I am unable to show you the code right now due to some technical difficulties.

    Visitor II
    July 3, 2017
    Posted on July 03, 2017 at 10:33

    Please try the following and see if you still get the same noisy output:

    Verify that the x and the y axes do not show the same noisy output.

    Set the sensitivity to 2g.

    Set high precision mode on.

    Set the sample rate to something like 10/50/100hz (I've tried these rates and they work well for me)

    Turn off FIFO mode and try to sample the acceleration values directly from the 28-2D registers.

    Try reading both the low and the high bits as a 16 bit value. You then need to change the scaling factors to get the correct g value.

    I found this thread because I was seeing more noise in the z axis on my sensor than on the x or y. However, the maximum deviation from the mean is only about 0.05g (x and y tend to stay within about 0.025g).