Home / Hardware y Moviles / The three hanging masses that tell your phone where the ground is

The three hanging masses that tell your phone where the ground is

You turn the phone and the screen settles by itself. There is no pendulum inside pointing to the ground and no compass with a needle: there are three pieces of silicon the size of a grain of salt that weigh almost nothing and yet keep the screen in place while you walk, play or drive. They are called MEMS inertial sensors (Micro Electro Mechanical Systems: moving structures built with the same techniques as a chip), and they are the reason your phone always knows which way gravity falls.

A mass hanging from silicon springs

An accelerometer does not sense speed or position: it measures proper acceleration, that is, every force other than gravity acting on a proof mass. The trick is to build that mass inside the silicon itself. A central piece, the proof mass, is etched and left held by extremely thin sheets that work as springs. Around it, thousands of microscopic fingers interlock into an interdigitated comb: two sets of electrodes, one fixed and one attached to the moving mass, so close that a measurable electrical capacitance appears between them.

Capacitances that fall out of balance

When the phone accelerates, the mass shifts by a few picometres and the gap between fingers changes. One side of the comb brings its plates closer and the other pulls them apart, so one capacitance rises while its twin falls. A conditioning circuit turns that difference into a voltage proportional to acceleration. Three combs sit on perpendicular axes, so the sensor outputs three numbers: the full acceleration vector. Consumer parts work in ranges from ±2 g up to ±16 g; the wider the range, the more shock it survives, but the less resolution it keeps. Its typical noise is measured in thousandths of a g per root hertz, a figure that decides whether the step counter gets the stride right or makes it up.

Measuring rotation with nothing truly spinning

Acceleration alone is not enough: if you slide the phone flat across a table, the vector changes and the system thinks you tilted it. That is why a gyroscope exists, and it has no spinning wheels either. It is a silicon tuning fork: two masses vibrate in opposite directions at tens of kilohertz, and when the assembly rotates, the Coriolis force pushes each mass perpendicular to its vibration. That sideways push is read the same way, through a capacitance change, and is proportional to angular velocity. The trade-off is drift: the zero point wanders with temperature and ageing, and every unit ships with a calibrated correction table.

Nobody uses a single sensor: fusion

A third part, the magnetometer, measures the Earth’s field to give a heading, but it lives surrounded by speakers, magnets and metal cases that bend it; hence the figure-of-eight calibration the system sometimes asks for. With all three sensors, the software performs fusion: it uses the accelerometer as a long-term reference for the vertical, the gyroscope for fast, short movements, and the magnetometer for north. A Kalman filter or a complementary filter weights each source by its noise and estimates orientation as a quaternion (four numbers describing a rotation without the pitfalls of matrices and without angle lock-ups). That quaternion is what the system exposes as a rotation vector and what lets augmented reality pin a virtual object to the floor without jitter.

The sensor that never sleeps

Counting steps cannot cost battery. Today’s phones do not wake the main processor for that: they carry a small sensor hub, a low-power microcontroller with its own memory, which reads the accelerometer and gyroscope at a fixed rate, filters the noise, detects the signature of walking and keeps the count. It only notifies the system when something relevant happens, such as a sudden change of orientation or a free fall. Camera optical stabilisation, gesture triggers and turning the screen off when you bring the phone to your ear all use the same scheme of continuous watch with minimal drain.

Why it sometimes gets it wrong

If you shake the phone hard, the screen does not rotate: the system requires the tilt to hold for a moment and applies thresholds with hysteresis so it does not flip back and forth. If the phone hits the ground, the sensor may saturate and lose its scale, and it will be back to normal within seconds. And in a car, fusion blends the vehicle’s real acceleration with gravity, so the estimated position drifts away from the truth as time passes. That accumulated error, drift, is exactly the problem GPS and inertia solve when they work together: one provides an absolute reference now and then, the other fills the gaps at high speed. All modern navigation, from the phone in your pocket to a drone, is that conversation between a signal that never stops and another that arrives in bursts.