cancel
Showing results for 
Search instead for 
Did you mean: 

H3LIS331DL precision / default calibration

PGoud
Associate III

Without any move, my H3LIS331DL on a MKI153V1 kit, and read from and STM32L4 MCU, gives values around X=1,5 / Y=2 / Z=3 G at 200g full scale.

Is that "Zero Offset" normal ?

Should I do anything to get values closer from 0 / 0 / 1

1 ACCEPTED SOLUTION

Accepted Solutions
Eleon BORLINI
ST Employee

Hi @PGoud​ ,

please note that -form datasheet p.9- the TyOff parameter (Typical zero-g level offset accuracy) for the H3LIS331DL in the  ±100g FS case is  ±1g, so in the ±200g FS a double TyOff parameter is plausible, leading to ±2g typical accuracy.

From this consideration, the value you are reading (X=1.5, Y=2, Z=3g) are plausible: this product is namely a high-g accelerometer, that is intended to work for the detection of high-g shock events. To get an "offset" of the same order of magnitude of the sensitivity (about ±0.1g on 12 bits), please consider that the TyOff can be eliminated by enabling the built-in high-pass filter: you won't have any more a "zero g level", but a baseline offset.

Considering the C drivers on Github (h3lis331dl_read_data_polling.c), the hp filter can be set as follows:

  /* Configure filtering chain */
  h3lis331dl_hp_path_set(&dev_ctx, H3LIS331DL_HP_ON_OUT);

In this way you- won't get the steady acceleration (Earth 1g included).

Another possibility is to characterize the sensor TyOff offset by acquiring the data output in steady state at time 0, averaging them and storing the average value in your software, so that you can subtract this value to your acquisition (in real-time or in post processing) and get a manual "offset correction".

Please let me know if these suggestion can be of some help for you and, in positive case, please select this answer as "best".

-Eleon

View solution in original post

2 REPLIES 2
Eleon BORLINI
ST Employee

Hi @PGoud​ ,

please note that -form datasheet p.9- the TyOff parameter (Typical zero-g level offset accuracy) for the H3LIS331DL in the  ±100g FS case is  ±1g, so in the ±200g FS a double TyOff parameter is plausible, leading to ±2g typical accuracy.

From this consideration, the value you are reading (X=1.5, Y=2, Z=3g) are plausible: this product is namely a high-g accelerometer, that is intended to work for the detection of high-g shock events. To get an "offset" of the same order of magnitude of the sensitivity (about ±0.1g on 12 bits), please consider that the TyOff can be eliminated by enabling the built-in high-pass filter: you won't have any more a "zero g level", but a baseline offset.

Considering the C drivers on Github (h3lis331dl_read_data_polling.c), the hp filter can be set as follows:

  /* Configure filtering chain */
  h3lis331dl_hp_path_set(&dev_ctx, H3LIS331DL_HP_ON_OUT);

In this way you- won't get the steady acceleration (Earth 1g included).

Another possibility is to characterize the sensor TyOff offset by acquiring the data output in steady state at time 0, averaging them and storing the average value in your software, so that you can subtract this value to your acquisition (in real-time or in post processing) and get a manual "offset correction".

Please let me know if these suggestion can be of some help for you and, in positive case, please select this answer as "best".

-Eleon

PGoud
Associate III

Thanks for the simple precise response.

I could verify all, and my usecase will be important chocks or vibrations, so basically filtering low frequencies will be OK fo me.