± 2g / 4g / 8g / 16g Tri-axis Digital
Accelerometer Technical
Reference Manual
PART NUMBER:
KX132-1211
Rev. 1.0
31-Jul-2019
36 Thornwood Dr.
–
Ithaca, NY 14850
© 2019 Kionix
–
All Rights Reserved
tel: 607-257-1080 – fax:607-257-1146
893-12874-1907311402-0.17
www.kionix.com -
Page
53
of
73
Threshold Resolution
The motion interrupt threshold values are set by WUFTH<10:0> and BTSTH<10:0> bits in WUFTH, BTSWUFTH,
BTSTH registers. The values in these registers are compared to the top 11 bits of the accelerometer 8g output
(regardless of GSEL<1:0> setting in CNTL1 register. This results in threshold resolution of 3.9 mg/count per Equation
6.
2
11
counts /
8 g
= 2048 counts /
8
g =
256
counts/g or
3.9
mg/count
Equation 6
: Wake-Up / Back-to-Sleep Resolution Calculations
Threshold Calculation
To calculate the desired wake-up threshold (WUFTH) and back-to-sleep threshold (BTSTH), use Equation 7. Please
note that the wake-up engine function is independent of the user selected g-range.
WUFTH (counts) = Wake-Up Threshold (g) x 256 (counts/g)
BTSTH (counts) = Back-to-Sleep Threshold (g) x 256 (counts/g)
Equation 7:
Wake-Up/Back-to-Sleep Threshold
Relative / Absolute Threshold Modes Select
The type of threshold used for motion interrupt is controlled using TH_MODE bit in CNTL4 register. The threshold can
be set to either an absolute acceleration value or a relative acceleration value.
2.2.1.1
Relative Threshold Mode
When KX132-1211 operates in the Relative Threshold mode, the Motion interrupt engine reports qualified changes in
the high-pass filtered acceleration (i.e. acceleration difference between the two consecutive samples) based on the
Wake-Up Threshold (WUFTH) and Back-to-Sleep Threshold (BTSTH). If the high-pass filtered acceleration on any axis
is greater than the user-defined Wake-Up Threshold (WUFTH), the device has transitioned from an inactive state to an
active state. On the other hand, if the high-pass filtered acceleration on any axis is less than the user-defined Back-to-
Sleep Threshold (BTSTH), the device has transitioned from an active state to an inactive state.
To illustrate how the algorithm works, consider the Figure 4 that shows the latched response (active LOW) of the motion
detection algorithm. In this example, the debounce counter (WUFC) is set to 8 counts and the counter mode is set to
reset
(C_MODE = 0). The pointing up red arrow represents the
relative
Wake-Up Function Threshold (WUFTH) value
in units of gravity (g). While the accelerometer data is collected at the output data rate set by OSA<3:0> bits in the
ODCNTL register, the wake-up engine evaluates the acceleration samples at the sampling rate set by OWUF<2:0> bits
in CNTL3 register. Once the algorithm starts to run, on the 1
st
wake-up function ODR clock (WUF ODR) cycle, the
acceleration motion is equal to some
init
value (shown in units of g)
.
On the 2
nd
clock cycle, the motion is still at the
same
init
(g) level. The relative difference between the current (2
nd
clock) sample the previous (1
st
clock) sample, is 0g
and it is below the threshold value. On the 3
rd
clock cycle, the motion has increased by g1 (g) and is equal to
init+g1
(g). The relative difference between the current and previous samples is still below the threshold and thus the debounce
counter remains inactive. Fast forward to the 6
th
clock cycle, the acceleration has increased by
g2
(g) relatively to the
previous sample. Note that
g2
(g) difference is higher than threshold. As a result, the debounce counter begins its count.
The new
reference
sample for the algorithm now becomes the acceleration sample obtained on previous clock cycle 5.
While the debounce counter continues the count, the difference between each
new
acceleration sample and the
reference
sample is calculated and is measured against the threshold. The difference has remained higher than
threshold on the 7
th
clock cycle but below it on the 8
th
clock cycle. This resulted in reset of the debounce counter and