cancel
Showing results for 
Search instead for 
Did you mean: 

Lis3dh reading not repeatable/stable

pthakkar
Associate

Hi

We are developing a project in which we are using LIS3DH to calculate the angle and based on that angle we stop/start an actuator.

The sensor is mounted on a PCB which is aligned along x axis i.e. when stationary the acceleration in x axis is 1g * 9.98 and all other axis are zero (nearly). The movement of the PCB is along x axis.

 
 

lis3dh.png

Now our aim is to stop the movement of the actuator when the angle is 15 deg.

The problem we are facing is that the reading of LIS3DH are not repeatable and not stable.

For e.g. in the Initial Position I am getting the following acceleration values:

X

Y

Z

9.98

0.18

0.18

9.81

0.24

0.24

9.79

0.16

0.12

9.81

0.06

0.06

9.89

0.24

-0.04

9.79

0.16

-0.06

9.71

0.2

0.12

9.85

0.16

0.14

9.83

0.16

0.27

9.9

0.12

0.02

9.89

0.16

0.08

9.9

0.08

0.27

9.81

0.22

0.12

9.92

0.18

-0.2

9.81

0.2

0.18

9.77

0.18

0.1

9.81

0.16

0.18

9.87

0.14

0.33

9.92

0.2

-0.04

9.83

0.18

0.16

9.79

0.18

0.1

9.89

0.18

0.1

9.9

0.18

-0.08

In the final position also we see a lot of variation. The angle variation is around 2-3 deg. So when we stop the actuator after calculating the angles it stops at 2-3 deg below the final position and sometimes 2-3 deg beyond the final position.

I am using the following configuration:

 

 (void)lis3dh_register_write(dev_i2c,LIS3DH_REG_CTRL1 , 0x07); //enable all axis normal mode
  (void)lis3dh_register_write(dev_i2c,LIS3DH_REG_CTRL4 , 0x88);//0x88); //High res & BDU enabled
  (void)lis3dh_register_write(dev_i2c,LIS3DH_REG_CTRL3 , 0x08); //enableDRDY(true, 1)
  (void)lis3dh_register_write(dev_i2c,LIS3DH_REG_TEMPCFG , 0x80); //enable adcs

 

I am using the sensor in 2G range with datarate as 200 hz.

Can someone help as in what can be the issue.

0 REPLIES 0