± 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
50
of
73
2
Embedded Applications
2.1
Orientation Detection Feature
The orientation detection feature of the KX132-1211 will report changes in face up, face down, ± vertical and ± horizontal
orientation. This intelligent embedded algorithm considers very important factors that provide accurate orientation
detection from low cost tri-axis accelerometers. Factors such as: hysteresis, device orientation angle and delay time
are described below as these techniques are utilized inside the KX132-1211.
Hysteresis
A 45° tilt angle threshold seems like a good choice because it is halfway between 0° and 90°. However, a problem arises
when the user holds the device near 45°. Slight vibrations, noise and inherent sensor error will cause the acceleration
to go above and below the threshold rapidly and randomly, so the screen will quickly flip back and forth between the 0°
and the 90° orientations. This problem is avoided in the KX132-1211 by choosing a 30° threshold angle. With a 30°
threshold, the screen will not rotate from 0° to 90° until the device is tilted to 60° (30° from 90°). To rotate back to 0°, the
user must tilt back to 30°, thus avoiding the screen flipping problem. This example essentially applies ± 15° of hysteresis
in between the four screen rotation states. Table 17 shows the acceleration limits implemented for
T
=30°.
Orientation X Acceleration (g) Y Acceleration (g)
0°/360°
-0.5 <
a
x
< 0.5
a
y
> 0.866
90°
a
x
> 0.866
-0.5 <
a
y
< 0.5
180°
-0.5 <
a
x
< 0.5
a
y
< -0.866
270°
a
x
< -0.866
-0.5 <
a
y
< 0.5
Table 17:
Acceleration at the four orientations with ± 15° of hysteresis
The KX132-1211 allows the user to change the amount of hysteresis in between the four screen rotation states. By
simply writing to the HYST_SET register, the user can adjust the amount of hysteresis up to ± 45°. The plot in Figure 2
shows the typical amount of hysteresis applied for a given digital count value of HYST_SET.
Figure 2:
HYST_SET vs Hysteresis
HYST_SET vs Hysteresis
0
5
10
15
20
25
30
35
40
45
50
0
5
10
15
20
25
30
HYST_SET Value (Counts)
H
y
s
te
re
s
is
(
+
/-
d
e
g
re
e
s
)
Hysteresis