2020-05-08 09:17 AM
I am using the ST LIS3DH sensor, and would like to try the low power operation mode, but the results I see on the display are not what I expected, since at rest, instead of seeing values of + -1g, I see values of + -3g, with a full scale of 2g.
And I would also like to know when in the data sheet that says READ REFERENCE, what does the default value of the REFERENCE record mean?
2020-05-08 11:53 AM
Could someone help me?
2020-05-08 01:47 PM
If you don't care translating your texts, then why should others care investing their time in helping you?
2020-05-08 01:57 PM
It's already changed to English, it was put in Spanish by mistake, sorry for the inconvenience. Would you know what's going on with the sensor or did you just comment that you don't want to see questions in Spanish?
2020-05-11 09:39 AM
Hi @EEstr.1 , can you pls share the register configuration you used for the LP mode setting on LIS3DH? I can suggest you to check the standard C drivers for the LIS3DH configuration and data reading on github (LINK). For example, the following one is the function for the conversion of the raw data in LP 2g FS into mg:
float lis3dh_from_fs2_lp_to_mg(int16_t lsb)
{
return ( (float)lsb / 256.0f ) * 16.0f;
}
Regarding the second question, the "REFERENCE" is a register used for the High-pass filter mode reset (p. 36 of the datasheet).
Regards
2020-05-14 01:19 AM
Hello! Yes, thank you, I have looked at the Githug and it has solved some doubts for me.
On the other hand, I have a doubt in the example of wake-up interrupt, because I don't understand why in the threshold if we want it to have 250mg we put in the register 0x10(16 in decimal).
2020-05-14 03:23 AM
Hi @EEstr.1 , you should calculate the threshold from the selected Full scale FS, and divide it for 2^8 (eight bits). For example, for +-2g full scale you will have the following LSB value:
and, setting 10h into INT1_THS register this will led to:
Regards
2020-05-14 07:55 AM
Hello Eleon! Thank you very much for your help, I understand the problem of the threshold.
On the other hand, I would like to know why in the LIS3DH project configuration and data reading in GitHub (drivers), for example to calculate the value read with 2g FS in Normal mode you do the following operation:
I mean, I don't understand why you divide by 64 and multiply by 4. Wouldn't that be multiplying by 4000 and dividing by 65536?
Thanks in advance.
Regards
2020-05-18 07:57 AM
Hi @EEstr.1 , this formula is a direct consequence of the info reported in the datasheet:
So, to get the physical units from the LSB you have to undergo the following operations (e.g. for the X-axis data):
Regards