cancel
Showing results for 
Search instead for 
Did you mean: 

Hello; I am using the H3LIS331DLTR to measure impacts up to 200g. We have produced 1000s. We see a range in g-offsets when the unit is static. The offset can range from 0.5g up to 9g. Has anyone seen this before or solved it?

Jsawd.1
Associate
 
4 REPLIES 4
Eleon BORLINI
ST Employee

Hi @Jsawd.1​ ,

0.5g and even 1g are typical values, from datasheet Table 3 (Typical zero-g level offset accuracy).

9g is indeed a bit too high. Do you see these high values placing the board in a steady state, and soon as you start acquiring data for the first time? Or are these values the result of a system degradation?

And are you correctly reading and converting the data from LSB to milli-g? See for example

int32_t h3lis331dl_acceleration_raw_get(stmdev_ctx_t *ctx,
                                        int16_t *val)
{
  uint8_t buff[6];
  int32_t ret;
 
  ret = h3lis331dl_read_reg(ctx, H3LIS331DL_OUT_X_L, buff, 6);
  val[0] = (int16_t)buff[1];
  val[0] = (val[0] * 256) + (int16_t)buff[0];
  val[1] = (int16_t)buff[3];
  val[1] = (val[1] * 256) + (int16_t)buff[2];
  val[2] = (int16_t)buff[5];
  val[2] = (val[2] * 256) + (int16_t)buff[4];
 
  return ret;
}

-Eleon

Jsawd.1
Associate

Hi Eleon;

We are reading the values correctly, some units are fine, all units read large gs ok, its is just the noise on some of them which is an issue. It appears a little random. These are values seen in steady state, the board static.

The high values particularly occur on the z-axis.

Maybe a placement issue?, we don't know and its hard to pinpoint the casue.

many thanks

-Jon

Hi Jon @Jsawd.1​ ,

I'm wondering whether it could be an issue related to the raw data conversion.

Did you enable the BDU bit of the CTRL_REG4 (23h) register? This prevents the output registers to be updated between MSB and LSB reading, avoiding any unwanted overlapping of the data.

-Eleon

TWard.1
Associate II

Hello @Jsawd.1​ - was this the problem?

we are seeing something quite odd with readings - we can run for 24 hours and suddenly, somewhere in the middle the readings will jump from 0.7 G in compeltely static state to 2.4G (after conversion). This seems to be exacerbated by the HP filter, turning it off makes this less likely but not impossible.