Features

Turn your phone sideways and the picture turns with it. No camera is involved, and nothing is looking at the room. A chip smaller than a grain of rice is feeling gravity, and doing the geometry.

Features — 238

Why your phone knows which way is up

Filed UnderPhones, Everyday Science
Read Time~3 minutes
PublishedNovember 13, 2026 at 11:02 PM
Hands holding a smartphone tilted sideways, its screen showing a photo
Photo: Line Knipst / Pexels

          Your phone has no eyes and no sense of balance, yet it always knows which way you're holding it. Tilt it and the screen follows. Set it flat and it stops guessing. The trick is a pair of microscopic sensors that never stop measuring two things: which way gravity is pulling, and how fast the phone is turning.
          The sensors are called MEMS — micro-electromechanical systems — tiny machines etched into silicon. Your phone carries at least two of them, and they work together the way your inner ear works with your eyes: one reports direction, the other reports motion, and the phone fuses both into a single answer.

A weight on springs, smaller than sand
          The first sensor is the accelerometer, and at its heart is a proof mass: a microscopic slab of silicon suspended on tiny springs, free to shift a fraction of a hair's width in any direction. When gravity pulls on it, the mass sags toward the ground, and the chip measures the sag electrically, as a change in capacitance between the mass and fixed plates beside it.
          At rest, the accelerometer feels the full pull of gravity — 9.8 meters per second squared — and it can tell which of its three axes the pull is running along: up-down, left-right, or forward-back. Hold the phone upright and gravity runs along one axis. Turn it sideways and the pull moves to another. The chip reports the direction of "down" continuously, hundreds of times a second, and the operating system rotates the screen to match.
          Shake the phone and the mass jiggles from the shaking too, which is why an accelerometer on its own would be easy to fool. It can't tell the difference between gravity and a bump. That's what the second sensor is for.

“ Your phone doesn’t see which way is up. It feels gravity pulling, and does the geometry.”

The gyroscope keeps score
          The second sensor is the gyroscope, and it measures rotation: how fast the phone is turning, and around which axis. Its MEMS heart is a tiny vibrating structure, and when the phone rotates, the Coriolis effect — the same effect that curves weather systems — nudges the vibration sideways. The chip reads the nudge as a rotation rate.
          The phone combines the two signals in a process engineers call sensor fusion. The accelerometer gives a steady reference — gravity always points down — and the gyroscope fills in the fast movements between readings. Together they track orientation smoothly even while you're walking, waving the phone around, or riding in a car, where acceleration alone would be hopelessly confused.

Why it gets confused in bed
          The system has one blind spot, and you've met it: lying on your back, phone held above your face, the screen flips to landscape when you wanted portrait, or refuses to rotate at all. When the phone is flat and facing up, gravity points straight through the screen, along the axis the accelerometer reads as forward-back. The pull on the other two axes drops to nearly zero, and the phone loses the information it needs to tell portrait from landscape.
          At that point the direction of "up" on the screen is genuinely ambiguous — the gravity vector gives no answer — so the phone guesses from small tilts and recent motion, and guesses wrong half the time. The orientation lock exists for exactly this moment: it tells the phone to stop asking a question gravity can't answer.

Enjoying the magazine?

A new story goes up every night at midnight. Find your next one by section.

Browse the sections