cancel
Showing results for 
Search instead for 
Did you mean: 

I am using LIS3DH for my project. Spike in X,Y or Z axis observed in idle position.

APari.12
Associate II

I have prepared an application in which I am reading accelerometer x,y,z axis data from its registers @every 2 sec. Now what i observed is that if I keep my board at stable position without disturbing board or any surroundings still I see some spike value in one of the axis data. I have kept a threshold value for each axis.

Now due to this spike one of the axis crosses the threshold value. I do not understand that in idle position why such spike is observed.

If required I can share my application in which I have configured the registers at Init time and using X,Y,Z axis registers to read.

Please guide me in this issue.

Thank You,

Arjav Parikh

4 REPLIES 4
AvaTar
Lead

Compared with a known-working reference device (accelerometer) ?

Does the spike move with the axis when you turn the MEMS board ?

Tried a different environment (place) ?

In other words, what if the spike is real ?

Hi AvaTar,

Thank You for your response.

Please find answers inline:

Compared with a known-working reference device (accelerometer) ?

Ans: No. I don't have any working reference board for LIS3DH. I am using it with QCOM APQ8009 SOC.

Does the spike move with the axis when you turn the MEMS board ?

Ans: When I move the board I see the change in Axis value as expected. But in ideal condition (when not rotating the board) also I see spike and then again it gets back to normal.

Tried a different environment (place) ?

Ans: No. What ideal environment shall I check this.

In other words, what if the spike is real ?

Ans: As per my project use In ideal position spike is not expected because in application I have taken a threshold value such that if threshold value is crossed then I will consider it as a theft detection case. So I need to eliminate the spike in ideal condition.

I have not configured Interrupts in LIS3DH. I am just reading the axis values from its registers.

Please let me know in case of any additional information required from my end.

AvaTar
Lead

> Ans: No. I don't have any working reference board for LIS3DH.

> Ans: No. What ideal environment shall I check this.

Have you considered the "spikes" as measurement of real events in your environment ?

Perhaps large machinery, transportation, or mining ?

Avoid hunting phantoms.

If the downward pointing axis measures 1g, and the measurement follows when turning the accelerometer, you are fine.

> Have you considered the "spikes" as measurement of real events in your environment ?

Ans: Yes. I am continuously reading value from registers.

Current environment scenario is accelerometer is mounted on embedded board within room temperature.

Please find below detail for current issue w.r.t application:

At boot time when my accelerometer application starts, I have configured below registers:

Init() {

FIFO_CTRL_REG = 0x80 (Enable Stream Mode)

CTRL_REG0 = 0x90 (SDO/SAO Pull Up Disconnected for I2C)

CTRL_REG1 = 0x77 (ODR is 400 Hz H-RES Mode,X-Axis En, Y-Axis En, Z-Axis En)

CTRL_REG4 = 0x08 (H-RES Mode)

CTRL_REG5 = 0x40 (FIFO ENABLED)

}

Read() /* This function is called every 2 sec */ {

Read : x_axis_lsb = OUT_X_L, x_axis_msb = OUT_X_H

x_axis = (x_axis_msb << 8 | x_axis_lsb);

Read y_axis_lsb = OUT_Y_L, y_axis_msb = OUT_Y_H

y_axis = (y_axis_msb << 8 | y_axis_lsb);

Read z_axis_lsb = OUT_Z_L, z_axis_msb = OUT_Z_H

z_axis = (z_axis_msb << 8 | z_axis_lsb);

}

a. In read function during idle position I get below values for each axis:

x-axis : 0x40 / 0x0, y-axis : 0x40 / 0x0, z-axis : 0x40 / 0x0

b. In same position (no orientation/position change) after some time I get below values:

x-axis : 0xC040 / 0xFFC0, y-axis : 0xC0 / 0x100, z-axis : 0x5780 / 0x1AC0

My expectation is that in ideal condition I should always get values mentioned in case a. Am I doing something wrong while configuring registers?