MMA8452Q
Sensors
Freescale Semiconductor, Inc.
13
5.5.2
Motion Detection
Motion is often used to simply alert the main processor that the device is currently in use. When the acceleration exceeds a
set threshold the motion interrupt is asserted. A motion can be a fast moving shake or a slow moving tilt. This will depend on the
threshold and timing values configured for the event. The motion detection function can analyze static acceleration changes or
faster jolts. For example, to detect that an object is spinning, all three axes would be enabled with a threshold detection of > 2g.
This condition would need to occur for a minimum of 100 ms to ensure that the event wasn't just noise. The timing value is set
by a configurable debounce counter. The debounce counter acts like a filter to determine whether the condition exists for
configurable set of time (i.e., 100 ms or longer). There is also directional data available in the source register to detect the
direction of the motion. This is useful for applications such as directional shake or flick, which assists with the algorithm for various
gesture detections.
5.6
Transient Detection
The MMA8452Q has a built-in high-pass filter. Acceleration data goes through the high-pass filter, eliminating the offset (DC)
and low frequencies. The high-pass filter cutoff frequency can be set by the user to four different frequencies which are
dependent on the Output Data Rate (ODR). A higher cutoff frequency ensures the DC data or slower moving data will be filtered
out, allowing only the higher frequencies to pass. The embedded Transient Detection function uses the high-pass filtered data
allowing the user to set the threshold and debounce counter. The Transient detection feature can be used in the same manner
as the motion detection by bypassing the high-pass filter. There is an option in the configuration register to do this. This adds
more flexibility to cover various customer use cases.
Many applications use the accelerometer’s static acceleration readings (i.e., tilt) which measure the change in acceleration
due to gravity only. These functions benefit from acceleration data being filtered with a low-pass filter where high-frequency data
is considered noise. However, there are many functions where the accelerometer must analyze dynamic acceleration. Functions
such as tap, flick, shake and step counting are based on the analysis of the change in the acceleration. It is simpler to interpret
these functions dependent on dynamic acceleration data when the static component has been removed. The Transient Detection
function can be routed to either interrupt pin through bit 5 in CTRL_REG5 register (0x2E). Registers 0x1D – 0x20 are the
dedicated Transient Detection configuration registers. The source register contains directional data to determine the direction of
the acceleration, either positive or negative. For details on the benefits of the embedded Transient Detection function along with
specific application examples and recommended configuration settings, please refer to Freescale application note, AN4071.
5.7
Pulse Detection
The MMA8452Q has embedded single/double and directional pulse detection. This function has various customizing timers
for setting the pulse time width and the latency time between pulses. There are programmable thresholds for all three axes. The
pulse detection can be configured to run through the high-pass filter and also through a low-pass filter, which provides more
customizing and tunable pulse-detection schemes. The status register provides updates on the axes where the event was
detected and the direction of the tap. For more information on how to configure the device for pulse detection, please refer to
Freescale application note, AN4072.
5.8
Orientation Detection
The MMA8452Q has an orientation detection algorithm with the ability to detect all 6 orientations. The transition from portrait
to landscape is fixed with a 45° threshold angle and a ±14° hysteresis angle. This allows the for a smooth transition from portrait
to landscape at approximately 30° and then from landscape to portrait at approximately 60°.
The angle at which the device no longer detects the orientation change is referred to as the “Z-Lockout angle”. The device
operates down to 29° from the flat position. All angles are accurate to ±2°.
For further information on the orientation detection function refer to Freescale application note, AN4068
.
shows the definitions of the trip angles going from Landscape to Portrait (A) and then also from Portrait to
Landscape (B).