2025-03-18 8:32 AM
Hi,
I read the LSM6DSV on the STEVAL SMKI239AA using a Raspberry Pi Pico running Circuit Python. The CTRL1 register is set to 0x07 (240 Hz ODR, high performance). My output is converted to m/s^2 and looks like that when I move the sensor board slowly:
Xacc: -8.6479 | Yacc: -1.3192 | Zacc: 5.5958 | sum: 10.38456
Xacc: -8.6479 | Yacc: -1.3120 | Zacc: 5.6042 | sum: 10.38817
Xacc: -9.1219 | Yacc: -2.3511 | Zacc: 6.3375 | sum: 11.35342
[snip]
Xacc: -6.9216 | Yacc: -5.3630 | Zacc: 6.2219 | sum: 10.74166
Xacc: -9.1081 | Yacc: -6.2662 | Zacc: 6.7229 | sum: 12.93914
Xacc: -10.0293 | Yacc: -5.9400 | Zacc: 8.0236 | sum: 14.15091
Xacc: -6.5439 | Yacc: -4.0893 | Zacc: 9.1746 | sum: 11.98826
Xacc: -7.0288 | Yacc: -3.8098 | Zacc: 9.6672 | sum: 12.54482
Xacc: -7.5543 | Yacc: -3.9289 | Zacc: 10.4986 | sum: 13.51752
[snip]
Xacc: -5.1715 | Yacc: 5.1571 | Zacc: 14.4975 | sum: 16.23320
Xacc: -4.8076 | Yacc: 4.4610 | Zacc: 15.3564 | sum: 16.69827
Xacc: -3.3956 | Yacc: 3.4147 | Zacc: 17.1664 | sum: 17.82908
Xacc: -2.8964 | Yacc: 2.2152 | Zacc: 17.5279 | sum: 17.90321
Xacc: -2.0045 | Yacc: 4.5508 | Zacc: 18.0397 | sum: 18.71252
The fourth column is the vector sum of the three axes. As can be seen, X and Y look credible; Z, however, runs up to twice the gravitational acceleration all by itself. When the sensor is positioned horizontally, Z is about zero (but should be -1g / -9.81 m/s^2). When the sensor is inverted (upside down), Z grows to about 2g / 19.6 m/s^2 (but should be +1g / 9.81 m/s^2). I would like Z to behave like the two other axes. I can fake it by subtracting the 9.81 m/s^2, but I prefer to get correct values in the first place.
What setting did I screw up? I only set CTRL1 and leave all others with their default setting.
Regards,
Peter