Many handheld devices integrate consumer-grade accelerometers into mobile handsets. By incorporating more intelligence from hand gestures, the accelerometer has had a significant impact on the user interaction with handsets. Minimizing the need for buttons has changed the design of the handset interface by including motion inputs such as flicks, taps, shakes and varied orientations, all of which are interpreted by handsets. Further, handsets can provide entertainment in terms of motion-based games. Most motion-based hand gestures and games are derived from analyses of static acceleration. These analyses, in turn, are based on gravity to determine the change in tilt angles. Accelerometers provide a new way for navigating, scrolling and viewing information.
Freescale's MMA8450Q 3-axis low g accelerometer is loaded with smart features with eight selectable and flexible interrupts for motion, freefall, jolt, tap, auto-wake/sleep, data ready, a 32-sample FIFO and orientation detection. This article targets the portrait/landscape orientation detection feature of the MMA8450Q, which has become standard in many handheld electronic devices. Orientation detection is implemented so that images on the screen always appear upright to the user.
Embedded algorithms can save the overall system in two ways. First it can save on current consumption by allowing the main processor to be in a low power mode until an interrupt occurs, and second it saves bus congestion by eliminating continuous processing of X, Y, Z data to analyze the threshold conditions of various orientations. This is done in the logic of the MMA8450Q. There are 10 trip angles to change from portrait to landscape and 10 separate trip angles to change landscape to portrait. This provides a lot of flexibility to set transition points. There are eight selectable Z-axis lockout angles from 25 to 50 degrees. This allows the image to change in a nearly flat (25- degree) orientation from horizontal, while the portrait to landscape and landscape to portrait trip angles remain within a very tight tolerance.
The built-in 32-sample FIFO can be used with an interrupt routine to provide a software-based solution while providing a more efficient data handling process. The MMA8450Q provides flexible solutions to orientation.
Kim Tuck is an applications engineer for Inertial Sensors, Consumer & Industrial for Freescale Semiconductor.