cancel
Showing results for 
Search instead for 
Did you mean: 

LIS3DH The output signal is significantly affected by the resolution !?

Tiberius
Associate

I have set Low-Power Mode (8 bit) respectively High Performance Mode (12 bit) The others parameters are the same: plus, minus 2g range, sampling rate of 10 Hz, FIFO was enabled. I also used a linear actuator to create a similar motion pattern, back and forth. 

The scalar vector is calculated as SQRT (X*X+Y*Y+Z*Z) and plotted as shown in the attachement.

It is obvious that the signal energy is much greater in 8 bit mode than in 12 bit mode.

 Is this "abnormal" behaviour normal? Or am I missing something?

Thank you!

1 REPLY 1
Eleon BORLINI
ST Employee

Hi @Tiberius​ ,

No, it is not normal... are you correctly converting the LSB data into mg, in the two different cases? Can you please check your code with the lines here below (source lis3dh_reg.c)?

  • Low-Power Mode (8 bit)
float lis3dh_from_fs2_lp_to_mg(int16_t lsb)
{
  return ( (float)lsb / 256.0f ) * 16.0f;
}

  • High Performance Mode (12 bit)
float lis3dh_from_fs2_hr_to_mg(int16_t lsb)
{
  return ( (float)lsb / 16.0f ) * 1.0f;
}

The formula for the scalar vector calculation is by the way correct.

If your conversion functions are ok, can you please increase the ODR rate and check if you get the same discrepancy?

-Eleon