AnsweredAssumed Answered

Filtering out gravity, datasheet problems (LIS331HH)

Question asked by kerin.britton on Apr 14, 2014
Latest reply on Apr 26, 2014 by Wapers
First I like this part and I LOVE the interface code that comes with it
(stsw-mems004.zip from this page:
http://www.st.com/web/catalog/tools/FM147/CL1818/SC1885</a>)

Actaully that's for a slightly different part the LIS331 DLH but it was easy
to adapt.  I didn't find such a source code for the LIS331HH.  I sure hope you
aren't not doing these lovely C interface files anymore, they are sooo nice so
much better than just datasheet or 'go use our IDE' junk that you so often get.

There are a few small problems that I noticed with the datasheet/interface file:

* I believe section 2.5.1 should refer to subtracting 'absolute' value of
the larger magnitude output from absolute value of other direction one, it
doesn't make sense otherwise (just gives a -2g large value).  Fairly obvious
but its best to be pedantic.

*  In the LIS331HH datasheet, Table 22 first and third rows are identical.
This does not seem right, they get different entries in the LIS331DLH_HPFMode_t
type in the header file.

* I haven't been able to make sense of the filter functionality.  I would
expect that by enabling the high-pass filter I should be able to filter
out gravity, so to speak, but I wasn't able to do so.  Besides the above
mentioned problem with Table 22, the description of the REFERENCE register
in section 7.7 in inadequate.  This code:

  // Enable high-pass filter.  This makes gravity go away :)
  LIS331DLH_SetFDS (MEMS_ENABLE);
  LIS331DLH_SetHPFMode(
LIS331DLH_HPM_REF_SIGNAL);
  // This ends up meaning 2.5 Hz when a 1000Hz data rate is being use;
  // see Table 23 of the LIS331HH datasheet.
  LIS331DLH_SetHPFCutOFF(LIS331DLH_HPFCF_3);
  LIS331DLH_SetReference (10);

definitely has an effect on sunsequent accelerations readings, but the
relationship between the value of the argument to LIS331DLH_SetReference()
and the resulting filtering functionality is unclear.  More generally,
its not obvious what a reference is in the context of a high-pass filter.
Please explain?

* Finally, the output ranges are themselves not discussed.  They can easily be
inferred by measuing one gravity (from which I conclude that in 6g full-scale
mode the LIS331HH output is 0.0295 g per unit).  But it would be nice if the
datasheet described this explicitly.  It seems likely that the interpretation
of the REFERENCE register described above relates to this matter (though
its not obvious how since one is an 8 bit and the other a 16 bit type).

Any advice with the above problems would be greatly appreciate, and I
really hope you will make these small improvements to the datasheet for this
lovely product.

Thanks,
  Britton

Outcomes