Xiao Sense Accelerometer Examples and Low Power

Hi there,
AFAIK , the kalman filter I think it is , is used to take the raw accelerometer & gyro data and give back the Pitch and Yaw. you calculate the tilt angle. There is no Magnetometer so it’s not an IMU* persay. , The thresholds basically set sensitivities etc. and generate the interrupt when data is available. But Generally,
Accelerometers can be used for measuring both dynamic and static measurements of
acceleration. Tilt is a static measurement where gravity is the acceleration being measured.
The highest degree resolution of a tilt measurement, a low-g, high sensitivity accelerometer is desired.
The Xiao has the “LSM6DS3TR-C” capable of Significant motion and tilt function according to data sheet. So most of the work is done for you. accelerometers are good
solutions for XY and XYZ tilt sensing and will experience
acceleration in the range of +1g to -1g as the device is tilted
from -90 degrees to +90 degrees. based on 1g = 9.8 m/s

How you mount it will be key. Check the demo on Park Demo on here, the orientation portion
can be used to show the tilt angle , then just set the interrupt to occur if it’s exceeded.
for a door handle the Y is fixed, more or less, to the origin. So the X axis vs, the ground plane or my choice , I think LOL :thinking:Z would do it.

like this

noting the position of the IMU* on the Xiao.(page 18) LSM6DS3TR-C
ps from pg 17 By default, the AWT algorithm is applied to the positive X-axis.
HTH
GL :slight_smile: PJ :v: