2021-09-21 6:15 PM
2021-09-30 1:57 AM
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
2021-10-05 8:14 PM
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
2021-10-06 2:00 AM
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
2022-01-23 2:54 PM
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.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.