# How does your phone know which way is up?

> Not GPS, and not magic. A speck of silicon on springs gets pulled sideways, and the chip measures how far it moved.

https://learnfold.app/wait-how/how-your-phone-knows-which-way-is-up/ · Updated 2026-11-01

Your phone knows which way is up because of a tiny weight on springs. It sits inside a chip called an accelerometer. When you tilt the phone, gravity pulls that weight to one side, the springs give a little, and the chip measures how far it moved. What it measures is pull, gravity included, which leads to two odd results. A falling phone's accelerometer reads zero. And on its own, the chip can't tell a tilt from a shove, so phones add a gyroscope and software to sort them out.

## It isn't GPS

GPS is a common guess, and a reasonable one, since it's the sensor people hear about most. But GPS.gov describes the system as providing positioning, navigation and timing. It can tell your phone where it is and how fast it's going. It has no idea whether the screen is facing the ceiling or the floor. ([How GPS works](/wait-how/how-gps-works/) is a story about clocks in orbit, not about tilt.)

Tilt is felt from inside the phone, by something that has weight.

## A weight on springs, carved out of silicon

An accelerometer in a phone is a MEMS device, short for micro-electro-mechanical system. It's a mechanical part, built with chip-making techniques, small enough to sit on a chip.

A UCSB engineering lecture walks through a classic example, Analog Devices' ADXL50. Its moving part is a small slab of polysilicon the lecture calls a shuttle, which acts as the proof mass, the weight. Folded springs hold it, anchored to the chip only at a few points, so the shuttle can shift slightly. Thin fingers stick out from the shuttle, and each one sits between two fixed electrodes. The ADXL50 repeats that finger arrangement 42 times.

When the shuttle moves, every moving finger gets closer to one fixed electrode and further from the other. Each gap acts as a capacitor, and capacitance depends on the gap. So one capacitance goes up while its partner goes down. The chip drives the electrodes with an electrical signal and reads the difference. At rest the difference is zero, and the bigger the shift, the bigger the signal.

That's an old textbook part. Phone chips are newer and their designs differ, but the principle is the same. A mass moves, gaps change, and the chip turns the change into a number.

## It measures pull, not speed

A common second guess is that the chip measures speed. It doesn't. It measures the force needed to keep that tiny weight moving along with the phone, and gravity never switches off.

Android's developer documentation puts it plainly. When a phone is sitting on a table and not accelerating, its accelerometer reads 9.81 m/s², the full strength of gravity. The table is holding the phone up, and the springs are holding the weight up, so the chip feels that support.

Phone accelerometers measure along three axes, roughly across the screen, along it, and through it. Lay the phone flat and the whole pull lands on the axis through the screen. Tilt it and the same pull spreads across the axes, a little more on one and a little less on another. NXP's application note on tilt sensing (written by Mark Pedley when the company was Freescale) shows how to turn those three numbers into pitch and roll angles. It also names the most common use of accelerometers in consumer electronics. That's deciding whether a screen should show in portrait or landscape.

## Drop the phone and the weight floats

Here's the strange part. Android's documentation says that when a device is in free fall, its accelerometer reads 0 m/s².

That sounds backward, since a falling phone is speeding up. But gravity pulls on the tiny weight and on the rest of the chip equally, so they fall together. Nothing has to hold the weight back, the springs relax, and the gaps go back to even. Speeding up isn't what the chip measures. It measures how hard the springs have to work.

You don't need to test this by dropping your phone.

## A shove looks just like a tilt

So the chip measures gravity plus any other acceleration, added together, and it gets no separate label for each. The NXP note spells out what that means. A gravitational pull to the left and an acceleration of the phone to the right both push the weight to the left. The weight has no way to tell which one happened.

That's why the tilt math comes with a condition. The note's equations assume the phone isn't otherwise accelerating, and it warns that hand shake or any other movement will put errors into the angle. Brake hard in a car with your phone on the seat, and for that moment the accelerometer feels a pull toward the windshield. That's exactly what it would feel if the phone were tipped forward.

There's a second blind spot. The same note says accelerometers can't sense rotation around the direction of gravity. Spin a phone that's lying flat on a table and the pull through the screen doesn't change at all, so the accelerometer feels nothing.

## So phones add a gyroscope and software

A gyroscope measures something different. Android's documentation says it reports the rate of rotation, in radians per second, around each of the phone's three axes. A shove without a turn shows up on the accelerometer but not on the gyroscope. A spin on the table shows up on the gyroscope alone.

Try both below. Tilt the phone to 30 degrees and note the sideways pull. Then reset and shove it. The weight moves the same way, by the same amount, but only the tilt registers on the gyroscope. Drop it to watch both readings fall to zero.

Gyroscopes have a weakness too. Android offers an uncalibrated gyroscope reading that comes with an estimate of its drift, small errors that build up when the phone adds rotations together to track its angle. Gravity, by contrast, is always there and never drifts. Software can lean on each sensor where the other is weak.

You can see that division of labor in Android's sensor list. The documentation describes two filters for an accelerometer on its own. A low-pass filter isolates gravity, and a high-pass filter removes it to leave the phone's own movement. Android also offers ready-made gravity and linear acceleration sensors. The standard Android versions of those use the gyroscope as well, and on a device without one they aren't available.

How any particular phone blends its sensors isn't public, and it varies. What is clear is that "which way is up" is a calculation the phone keeps doing, not something one sensor simply knows.

## Try it on your own phone

On an iPhone, Apple's Level is in the Measure app. Open Measure, tap Level and lay the phone flat on a table. Apple calls the readings approximate, which is fair given everything above. Now slide the phone sharply across the table without tilting it, and watch whether the reading jumps. A raw accelerometer would be fooled by that shove. If the level barely flinches, that's the software doing its job.

## From a weight on springs to a gyroscope with nothing spinning

The good follow-up questions come quickly. How does a gyroscope on a chip sense rotation when nothing inside it spins? How does the compass find north, the one direction the accelerometer can't feel? Learnfold turns a question like that into a planned course, and each follow-up becomes a linked page, so a [curiosity rabbit hole](/use-cases/follow-your-curiosity-rabbit-hole/) gets a map. Building a course from your own question is part of Learnfold's paid subscription. It's an AI tutor and can be wrong, so [check its explanations](/guides/check-ai-explanations-for-mistakes/) against sources like the ones below.

## Quick answers

**Does my phone use GPS to know when I tilt it?**

No. GPS gives positioning, navigation and timing, so it can say where you are, but it can't feel which way the phone is facing. Tilt comes from the accelerometer, a tiny weight on springs inside a chip, with help from the gyroscope.

**Why does an accelerometer read zero in free fall?**

It measures the pull on its tiny internal weight relative to the chip around it. In free fall the weight and the chip fall together, so nothing holds the weight back and the springs aren't stretched. Android's developer documentation says a device in free fall reads 0 m/s2.

**Can an accelerometer tell tilting from moving?**

Not on its own. A sideways shove and a tilt can push the weight the same way. Tilt calculations assume the phone isn't accelerating, so phones add a gyroscope and software to separate the two.

**What does the gyroscope do that the accelerometer can't?**

The gyroscope measures how fast the phone is rotating around each of its three axes. That lets software follow a turn even while the phone is being jostled, and catch rotations the accelerometer can't see, like spinning a phone that lies flat on a table.

## Sources

1. [Tilt Sensing Using a Three-Axis Accelerometer (AN3461), by Mark Pedley](https://www.nxp.com/docs/en/application-note/AN3461.pdf), Freescale Semiconductor (now NXP)
2. [MEMS Case Study: A Capacitive Accelerometer (ME 141B lecture), by Sumita Pennathur](https://sites.engineering.ucsb.edu/~sumita/courses/Courses/ME141B/ME141B_lecture_11_F10.pdf), University of California, Santa Barbara
3. [SensorEvent](https://developer.android.com/reference/android/hardware/SensorEvent), Android Developers
4. [Motion sensors](https://developer.android.com/develop/sensors-and-location/sensors/sensors_motion), Android Developers
5. [GPS](https://www.gps.gov/gps), GPS.gov
6. [Use iPhone as a level](https://support.apple.com/guide/iphone/use-the-level-iphbd435673d/ios), Apple Support
