Accelerometer

On this page 7

An accelerometer is a sensor that measures proper acceleration, including the constant pull of gravity, along one or more axes, and in smartphones, tablets and watches it is a tiny three-axis MEMS chip that reports acceleration in meters per second squared. In mobile hardware, it is the basic motion sensor behind automatic screen rotation, step counting, shake gestures, fall detection and the orientation estimates used by games and augmented reality.

Because a device at rest still feels gravity, the accelerometer reads about 9.81 m/s² pointing away from the ground even when nothing moves. That property is what lets a phone know which way is down, and it also explains why separating gravity from real motion is the central problem in processing its data.

How a MEMS accelerometer measures motion

A phone accelerometer is a microelectromechanical system: a tiny proof mass suspended on silicon springs inside a sealed package. When the device accelerates, the mass lags behind and shifts slightly, and interlocking comb-shaped electrodes detect the displacement as a change in capacitance.

An integrated circuit converts that capacitance into a digital value for each of the x, y and z axes, applies factory calibration and delivers samples over a serial bus such as I2C or SPI. Most mobile chips combine the accelerometer with a gyroscope in one inertial measurement unit, and many include a hardware FIFO buffer and simple step or motion detection that run without waking the main processor.

ParameterTypical rangeWhat it affects
Full-scale range±2 g to ±16 g, higher in safety sensorsMaximum acceleration before clipping
Output data rateFrom a few hertz to several hundred hertzAbility to capture fast motion
ResolutionTypically 12 to 16 bitsSmallest detectable change
Noise densityTens to a few hundred µg per root hertzStability of tilt and fine motion readings
Zero-g offsetSmall bias, varies with temperatureAccuracy of tilt and integration
Key accelerometer parameters in mobile devices

What phones and wearables use it for

Most features combine raw acceleration with filtering and often with other sensors. The operating system exposes processed variants so that apps do not need to separate gravity themselves.

FeatureSignal usedProcessing approach
Screen rotationDirection of gravityLow-pass filter and angle thresholds
Step countingPeriodic vertical peaksPeak detection, often in a low-power hub
Shake and tap gesturesShort high-amplitude spikesThreshold and timing rules
Fall and crash detectionVery high impact followed by stillnessHigh-range sensing plus machine learning
Activity recognitionMotion patterns over secondsClassification of walking, running or driving
Common mobile features and how they use acceleration data

Android distinguishes raw acceleration, linear acceleration and gravity as separate sensor types, and iOS offers similar separation through Core Motion. Using the processed signals is usually more reliable than writing custom filters, because the platform fuses data from the gyroscope to separate the two components.

Accelerometer compared with other motion sensors

No single motion sensor gives a complete picture. The accelerometer is excellent for tilt at rest but cannot tell rotation around the vertical axis, while the gyroscope measures rotation rates precisely but drifts over time. Sensor fusion combines their strengths.

SensorMeasuresStrengthWeakness
AccelerometerLinear acceleration and gravityAbsolute tilt referenceNoisy for fast motion, no heading
GyroscopeAngular velocitySmooth rotation trackingDrift accumulates over time
MagnetometerEarth magnetic fieldCompass headingDisturbed by metal and electronics
BarometerAir pressureFloor and altitude changesAffected by weather
Motion and position sensors in mobile hardware

A six-axis combination pairs the accelerometer with a gyroscope; adding a magnetometer gives a nine-axis solution that can estimate full orientation including compass heading. Augmented reality frameworks go further and fuse these signals with camera tracking to correct drift.

Working with accelerometer data in apps

Developers choose a sampling rate that matches the task, because higher rates cost battery and processing time. Since Android 12, apps that request sensor rates above 200 Hz need a dedicated permission, which limits both power use and certain privacy attacks.

TaskSuggested rateReason
Orientation in a user interfaceAbout 5 to 20 HzSlow changes, low battery cost
Games and motion controlAbout 50 to 100 HzResponsive input without lag
Gesture and vibration analysis100 Hz or moreShort events need dense samples
All-day step trackingPlatform step counterHardware hub saves battery
Choosing a sampling approach
  • Unregister listeners when the screen or feature is inactive to avoid background battery drain.
  • Use batched delivery from the hardware FIFO when real-time response is not needed.
  • Account for device coordinate axes, which stay fixed to the device and do not rotate with the screen.

Limitations, errors and privacy concerns

The most common technical misconception is that position can be computed by integrating acceleration twice. In practice, small bias and noise grow quadratically over time, so position error becomes large within seconds unless corrected by GPS, cameras or known constraints such as footsteps.

Accuracy also varies with temperature, mounting stress and manufacturing tolerances, which is why cheap devices may report a slightly tilted flat surface. Low-range sensors clip during hard impacts, so safety features rely on separate high-range sensing.

Motion data is also sensitive information. Research has shown that fine-grained acceleration can reveal activities, typing patterns or device identity through sensor fingerprinting, which is why platforms restrict high-rate access and browsers ask for permission before exposing motion events.

In everyday language

An accelerometer is a tiny part inside a phone that feels movement and gravity, a little like the way your inner ear tells you whether you are standing straight or leaning.

When you turn your phone sideways, it notices that gravity now pulls in a different direction and rotates the screen. When you walk, it feels the regular bumps of each step and counts them. It cannot see where you are, but it is very good at telling how the phone moves and tilts.

Seen in the real world

A developer of a fitness app for older adults wants to detect when a user falls during a walk. The first version simply flags any acceleration above 3 g, but in testing it triggers when users drop the phone onto a table or sit down heavily on a bench.

The improved version looks for a specific sequence: a short free-fall phase close to zero g, a strong impact, and then several seconds of stillness in a lying orientation measured from the gravity direction. It samples at 50 Hz only while a walk is active and relies on the platform step counter the rest of the day. False alarms drop substantially in testing, and the alert gives the user a short countdown to cancel before contacting a family member.