English
Language : 

ADXL346 Datasheet, PDF (28/32 Pages) Analog Devices – 3-Axis, ±2 g/±4 g/±8 g/±16 g Ultralow Power Digital Accelerometer
ADXL346
ORIENTATION SENSING
The orientation function of the ADXL346 reports both 2-D
and 3-D orientation concurrently through the orient register
(Address 0x3C). The V2 and V3 bits (Bit D6 and Bit D3 in the
orient register) report the validity of the 2-D and 3-D orientation
codes. If V2 or V3 are set, their respective code is a valid
orientation. If V2 or V3 are cleared, the orientation of the
accelerometer is unknown, such as when the orientation is
within the dead zone between valid regions.
For 2-D orientation sensing, the relation of the x- and y-axes to
gravity is used to determine the accelerometer orientation (see
Figure 42 and Table 23). Portrait positive corresponds to the x-axis
being most closely aligned to the gravity vector and directed
upwards, opposite the gravity vector. Portrait negative is the
opposite of portrait positive with the x-axis pointing downwards
along the gravity vector. Landscape positive corresponds to the
y-axis being most closely aligned with the gravity vector and
directed upwards, away from the gravity vector. Landscape
negative is the orientation opposite landscape positive. The
dead zone regions are shown in the orientations for portrait
positive (+X) and portrait negative (−X) of Figure 42. These
regions also exist for landscape positive (+Y) and landscape
negative (−Y), as shown in Figure 42.
In 3-D orientation, the z-axis is also included. If the accelerometer
is placed in a Cartesian coordinate system, as shown in Figure 41
of the Tap Sign section, the top of the device corresponds to the
positive z-axis direction, the front of the device corresponds to
the positive x-axis direction, and the right side of the device
corresponds to the positive y-axis direction.
The states shown in Table 24 correspond to which side of the
accelerometer is directed upwards, opposite the gravity vector.
As shown in Figure 41, the accelerometer is oriented in the top
state. If the device is flipped over such that the top of the device
is facing down, towards gravity, the orientation is reported as
the bottom state. If the device is adjusted such that the positive
x-axis or positive y-axis direction is pointing upwards, away
from the gravity vector, the accelerometer reports the
orientation as front or left, respectively.
The algorithm to detect orientation change is performed after
filtering the output acceleration data to eliminate the effects of
high frequency motion. This is performed by using a moving
average filter of a depth set by the divisor bits (ORIENT_CONF
register, Address 0x3B). The orientation register is updated at
the same rate as the data rate set in the BW_RATE register, but
is effectively bandwidth limited to the accelerometer bandwidth
divided by the depth set by the divisor bits. To eliminate most
human motion, such as walking or shaking, the value in the
divisor bits should be selected to effectively limit the orientation
bandwidth to 1 Hz or 2 Hz.
Preliminary Technical Data
PORTRAIT
POSITIVE (00)
NEGATIVE (01)
+X DEADZONES
+Y
+Y
+g
+g
+X
LANDSCAPE
POSITIVE (10)
NEGATIVE (11)
+Y
+g
+X +X
+g
+Y
Figure 42. 2-D Orientation with Corresponding Codes
The width of the dead zone region between two or more
orientation positions is determined by setting the value of the
dead zone bits in the ORIENT_CONF register (Address 0x3B).
The dead zone region size can be specified with a resolution of
3.6°. The dead zone angle represents the total angle where the
orientation is considered invalid. Therefore, a dead zone of
10.8° corresponds to 5.4° in either direction away from the
bisector of two bordering regions. An example with a dead zone
region of 10.8° is shown in Figure 43.
PORTRAIT
POSITIVE
50.4°
45°
39.6°
LANDSCAPE
POSITIVE
DEADZONE
+Y
+X
+g
Figure 43. Orientation Showing a 10.8° Dead Zone Region
By setting the INT_ORIENT bit of the ORIENT_CONF register
(Address 0x3B), an interrupt can be generated when the device is
placed into a new valid orientation. Only one mode of orientation
detection, 2-D or 3-D, can generate an interrupt at a time. The
orientation detection mode is selected by setting or clearing the
INT_3D bit of the ORIENT_CONF register (Address 0x3B). For
more details, refer to the description of the ORIENT_CONF
register.
Rev. PrC | Page 28 of 32