I am working on a project that is using LIS2DH sensor for measuring the acceleration along the X,Y and Z-axis. I have configured the IC as per the following configurations:-
1>Using the 8-bit resolution to capture the data of X,Y and Z-axis.
2>we have enabled the low power mode of this sensor.
3>We have set the ODR as 50 Hz.
when we set the full scale value as +/-4g, then we get the default value for OUT_X register as 0, OUT_Y register as 0 and OUT_Z register as 30 since there is a constant acceleration along Z direction with magnitude of 1g due to gravity when the device is static. Since we are using 8-bit register the range can be vary from -128 to +127, so the default magnitude that can be achieved is 32*30 (1LSb = 32mg as per data sheet) i.e. 0.96g which is approximately equals to 1g.
When we set the full value to +/-8g then the default value when the device is static along the Z-axis is 15 so 15*64 (1LSb = 64mg as per datasheet ) i.e. 0.96g which is approx equals to 1g.
And when we set the full scale value to +/-16g then the default value when the device is static along the Z-axis is 5 so 5*192 (1LSb = 192mg as per data sheet) i.e. 0.96g which is approx 1g too but here when we calculate the full scale value by multiplying 192*127(because maximum value that can be set in 8-bit signed register is +127) i.e. 24.34g which is much far greater than the set full scale value i.e. +/-16g but in the above two cases i got the correct full scale values FS=+/-4g (127*32) i.e 4.064g and when FS=+/-8g (127*64) i.e 8.1g, so why i got the calculated full scale value much above the set full scale value i.e +/-16g ?
The datasheet and the section that is refer here is "LIS2DH MEMS digital output motion sensor:ultra low-power high performance 3-axis “femto” accelerometer" and section 2.1 "Mechanical characteristics" respectively.