Chris Collins

Tools · sensors

Phone seismograph

Your phone's accelerometer as a seismograph: a live three-axis trace with gravity and tilt filtered out, a helicorder (drum) view, an STA/LTA trigger with an event log, peak ground acceleration in g with the approximate Modified Mercalli intensity, a spectrum to see what is shaking (footsteps, a washing machine), and recordings saved as CSV or WAV. A demo mode makes synthetic earthquakes on a desktop.

Added

How to use it

Lay the phone flat on a solid floor or a heavy table and tap Start the seismograph. On iPhone and iPad, Safari asks for motion access (it asks again each time the page is loaded); on Android it starts by itself. Laptops and desktops have no accelerometer a browser can read: the page says so, and Demo mode feeds it synthetic signals instead.

How to use it

  • Trace — the last 10, 20 or 60 seconds of the x, y and z axes, high-pass filtered (0.5 Hz by default, a 4th-order Butterworth) so the steady 1 g of gravity and slow tilt disappear and only shaking is left. The scale follows the signal, or fix it at ±2 mg … ±1 g.

  • Meters — the peak ground acceleration over the last 10 seconds and for the session, in g (1 mg = 0.001 g ≈ 1 cm/s²), and the approximate Modified Mercalli intensity that much acceleration usually goes with, from the Worden et al. (2012) relation USGS ShakeMap uses. It is a rough guide: intensity describes effects on people and buildings, and a phone on a table is not a free-field instrument.

  • STA/LTA trigger — the classic way seismic stations detect events: the short-term average of the signal energy (1 s) divided by the long-term average (30 s). When it jumps past the “on” level (4) an event starts; it ends when the ratio falls back (1.5). Each trigger goes in the log with its length, peak acceleration, intensity and dominant frequency, and is marked on the helicorder.

  • Helicorder — the drum recorder view: one line per minute (or 2, 5, 15), the newest at the bottom, for the vector sum of the axes or one axis.

  • Spectrum — an FFT of the last few seconds of each axis. Footsteps show as a ringing floor (often 10–25 Hz) repeated about twice a second, a washing machine as a sharp line at its spin speed (800 rpm = 13.3 Hz), a building swaying below a few hertz. Phones sample at about 60 Hz on iOS and 50–200 Hz on Android, so nothing above half that rate can be seen.

  • Record — up to 30 minutes of raw and filtered samples, saved as CSV (time, raw m/s², filtered g) or as a three-channel 16-bit WAV at the sample rate (the full scale in g is written in the file’s comment), which Audacity, Python or ObsPy can read.

  • Demo mode — buttons for a nearby and a distant earthquake (with the P wave arriving before the bigger S wave), a strong 0.25 g quake, footsteps, a washing machine and a slammed door.

What it can and cannot record. A phone accelerometer’s noise is around a milli-g, a hundred to a thousand times worse than a real seismometer, so it will catch a strong local earthquake, trucks, doors and people walking, but not a distant earthquake. For what has happened around the world, see Earthquakes, live. Compass and level uses the same sensors for tilt; the sensor data logger records an accelerometer on an Arduino or ESP32; the audio scope does the same spectrum for sound.

Browser support

DeviceMotion: Safari on iOS/iPadOS 13+ (after the permission prompt), Chrome, Edge, Samsung Internet and Firefox on Android. It needs a secure (https) page. Keep screen awake uses the Screen Wake Lock API where available; if the screen locks, the browser stops sending motion data.

Privacy

Everything happens on the phone: no readings, recordings or triggers leave the browser. The trigger log (the last 50) and your settings are kept in this browser’s local storage.

Runs entirely in your browser; nothing you type leaves this page.