Every time you turn your phone and the picture flips from portrait to landscape, a chip barely more than two millimetres across makes the call. It does not look at the screen or query the network: it measures how a silicon mass suspended in mid-air is moving, so tiny that its displacement is counted in nanometres. And it gets it right almost every time, even when you are lying on the sofa.
It measures acceleration, not position
A phone’s accelerometer does not know where the handset is or which way it points. It measures proper acceleration: the force per unit mass borne by the casing, expressed in g (1 g = 9.81 m/s²). When the device sits still on a table, that reading is 1 g pointing upwards, because the table pushes the chip up while gravity pulls it down. That is the whole basis on which the system works out its local “down”.
The catch is that Galilean relativity does not distinguish a gravitational field from acceleration: to the sensor, leaving the phone on the table and pushing it upwards at 9.81 m/s² produce exactly the same signal. That is why the accelerometer is only trustworthy over the long term and at relative rest. As soon as the handset travels in a car, a lift or the hand of someone walking, gravity is buried under vibration and braking.
A mass on springs, and two combs facing each other
The heart of the sensor is built with the same techniques as an integrated circuit, but by carving silicon in three dimensions. On a wafer, a movable mass of about one square millimetre is defined, tethered to the substrate by monocrystalline silicon springs a few microns thick. Dozens of conductive fingers extend from its sides, and other fingers fixed to the substrate slip between them. Together they form an interdigitated capacitor: two combs whose teeth overlap without touching, separated by gaps of one or two microns.
When the chip accelerates, the mass shifts, and the moving fingers close in on some fixed fingers and draw away from others. The capacitance of each pair changes by a minute amount, on the order of attofarads (10⁻¹⁸ F), and that difference is read by a capacitive front end wired as a bridge. To keep the measurement linear and stable, many designs use closed-loop operation: electrostatic feedback pulls the mass back to its central position, and the voltage needed to do so is the measure of acceleration. A sigma-delta modulator turns that analogue signal into a bitstream, and the following digital filter delivers a value already expressed in g.
The numbers help. A phone sensor typically has a ±2 g full scale for orientation and ±16 g for impact detection, with a typical noise density of 100 µg/√Hz. Across 100 Hz of bandwidth that leaves an effective noise of one milligram, enough to notice a tilt of a tenth of a degree.
The gyroscope does not measure rotation: it measures a force that appears when you rotate
Knowing where “down” is does not suffice to track a fast turn or stabilise video. That is the job of the gyroscope, which does not measure angles either: it measures angular rate in degrees per second. Its principle is the Coriolis force, the same one that bends winds in the atmosphere. If a mass vibrates at a known frequency and the assembly rotates, a force appears on it perpendicular both to the motion and to the axis of rotation, proportional to the rate of turn: F = 2m·v×Ω.
In practice, a MEMS gyroscope is a structure with two coupled vibration modes: a drive mass oscillating in-plane at tens of kilohertz and a sense mass that moves out of plane when the chip rotates. The displacement is read capacitively once again, with the added difficulty that it is minute compared with the quadrature error, a mechanical coupling between the two modes that produces a signal 90° out of phase and is removed by demodulating in phase with the excitation.
Even so, the gyroscope drifts. Its offset voltage changes with temperature and with the ageing of the silicon, and integrating that rate to obtain an angle lets any small error accumulate relentlessly. An uncalibrated phone can wander by several degrees per minute.
The filter that blends two half-truths
Hence sensor fusion: if the accelerometer is good over the long term and poor in the short term, and the gyroscope is the other way round, they are combined. The simplest approach is a complementary filter, which passes the gyroscope signal through a high-pass filter and the accelerometer signal through a low-pass one before adding them. The usual choice in a phone is a Kalman filter, which estimates the state (orientation and gyroscope bias) and updates each sensor’s uncertainty according to its known noise.
The accelerometer then corrects the gyroscope’s drift, while the gyroscope covers the accelerometer’s noise during fast movement. When the device is still, the system takes the opportunity to measure the gyroscope’s actual bias and subtract it, a technique known as zero-rate update. And if there is a magnetometer — high-end phones carry a Hall-effect or magnetoresistive compass — it adds an absolute reference for heading in the horizontal plane, with the caveat that any nearby speaker or steel structure will distort it.
From the chip to the screen that turns
With orientation now computed as quaternions, the software projects the gravity vector onto the phone’s axes and decides whether the long axis points more upwards than sideways. That is where thresholds and hysteresis come in: without them, the screen would flip every time the handset crossed 45 degrees. The same pipeline feeds the pedometer, which looks for acceleration peaks at a plausible cadence and discards those that do not fit; the floor counter, which combines the barometer with gravity; and fall detection.
In photography, the gyroscope runs at more than a thousand samples per second to move the lens or the sensor itself and cancel hand shake. In augmented reality, the camera supplies visual landmarks and the IMU fills the gaps between frames: that is the visual-inertial odometry ARKit and ARCore use to keep an object anchored to the floor while you walk. All of it happens on tens of microamps, because the sensor stays on and batches samples in an internal queue that the processor drains in bursts.
Next time the screen turns by itself, remember the chain: a silicon mass moving a thousandth of a millimetre, two combs measuring attofarads, a feedback loop, a Kalman filter and a calibration somebody performed at the factory. Quite a lot of work for something that looks like magic.






