Phone sensor test

The sensors that decide whether your screen rotates, whether maps point the right way and whether a game steers. A spirit level and three live numbers show whether they are answering and whether they are answering correctly.

What each reading is

Tilt is two angles: how far the phone is pitched front to back, and how far it is rolled left to right. Flat on a table both should sit close to zero.

Compass is the direction the top of the phone points. On iOS this is a true heading; elsewhere the browser only gives a rotation from an arbitrary starting point, so it is marked as relative.

Movement is total acceleration including gravity. Sitting still it reads around 9.8 metres per second squared — that is gravity, and seeing it is how you know the accelerometer is alive rather than stuck at zero.

Screen orientation is what the system currently believes, which is worth having next to the raw tilt when rotation is misbehaving.

Reading the spirit level

Lay the phone flat: the bubble should sit in the middle. Tip it in each direction and the bubble should move with it, smoothly and immediately.

What the bubble does What it means
Follows smoothly, centres when flat Working
Follows but never quite centres Small calibration offset — usually normal
Lags or moves in steps The sensor is reporting slowly, often thermal
Jumps or drifts while still A failing sensor, or something magnetic nearby
Does not move at all No sensor, or permission was refused

The two things worth trying before blaming the phone

Calibrate. Figure of eight, a few seconds, away from magnets. This fixes a surprising share of compass complaints outright.

Take the case off. Cases with magnetic closures, and every magnetic car mount, sit within centimetres of the magnetometer. It is the most common reason a compass is confidently wrong.

Common questions

Why does the page ask permission?

On iPhone and iPad, motion and orientation data are behind an explicit grant that can only be asked for from a tap. That is a privacy measure: the tilt of a phone is enough to infer a surprising amount, including keystrokes in some research. Android browsers deliver the events without asking. Nothing is sent anywhere either way — the numbers are read and displayed in the page.

The compass shows a number but it is not north.

Only iOS reports a true compass heading. Elsewhere the browser gives a rotation relative to wherever the phone happened to be when the page started, so it is labelled relative here rather than dressed up as a bearing. A relative number that changes smoothly as you turn is the sensor working correctly.

How do I calibrate the compass?

Move the phone in a figure of eight, rotating your wrist as you go, for a few seconds. This is not folklore — it gives the magnetometer readings from several orientations, which is what it needs to work out the local magnetic offset. Do it away from anything magnetic: laptop speakers, a case with a magnetic closure, a car dashboard.

Nothing happens at all on my computer.

Expected. Desktops have no accelerometer, gyroscope or magnetometer, so there is nothing to report. A few laptops and convertibles do have them and will work here.

My screen does not rotate but the numbers move.

Then the sensor is fine and rotation is locked. On iPhone that is the lock in Control Centre; on Android it is the auto-rotate toggle in quick settings. The numbers here move whether or not rotation is locked, which is exactly what makes them useful for telling the two apart.

The tilt numbers are offset by a few degrees when the phone is flat.

A small offset is normal and is present in most phones from new — the sensor is calibrated in the factory to a tolerance, not to perfection. A large or drifting offset is different, and usually shows up alongside a phone that has been dropped.

Other checks for this device

  1. Touchscreen test
  2. Multi-touch test
  3. Vibration test