How Earthquake Early Warning Works: P-Waves vs S-Waves Explained
Earthquake early warning systems work by detecting fast-moving P-waves (5–8 km/s) before the destructive S-waves (3–5 km/s) arrive. Because electronic alerts travel at the speed of light — nearly 300,000 km/s — a sensor that detects a P-wave can warn people hundreds of kilometers away before either wave reaches them. The core detection algorithm is STA/LTA (Short-Term Average / Long-Term Average), which identifies sudden spikes in ground acceleration against background noise. Japan's EEW system, credited with saving thousands of lives during the 2011 Tōhoku earthquake, is the gold standard: it detects events in 2–3 seconds and covers the entire country. Denser sensor networks reduce detection time because the warning clock starts the moment the first sensor triggers — every sensor placed closer to a potential epicenter shortens that delay. With community networks like GeoShake, this life-saving technology is now accessible to anyone. When it comes to earthquakes, every second counts.
Somewhere deep underground, a fault line slips. In that instant, two kinds of seismic waves start racing outward through rock — one fast and gentle, the other slow and violent. Earthquake early warning systems exploit the speed gap between these two waves to give you precious seconds of warning before the destructive shaking arrives.
It's not earthquake prediction — nobody can tell you when a quake will happen. But early warning systems can tell you that one is already happening, fast enough for you to take cover, for hospitals to lock down elevators, and for gas lines to shut off automatically.
Here's exactly how it works, why those seconds matter, and how GeoShake's community-powered sensor network is making this technology accessible to everyone.
The Race Underground: P-Waves vs S-Waves
Every earthquake generates multiple types of seismic waves. The two that matter most for early warning are P-waves (Primary waves) and S-waves (Secondary waves). They're fundamentally different in how they travel, how fast they move, and how much damage they cause.
P-Waves
- Speed: 5–8 km/s (fastest seismic wave)
- Motion: Push-pull, like a slinky
- Damage: Minimal — mostly a rumble
- Travels through: Solids, liquids, gases
S-Waves
- Speed: 3–5 km/s (about 40% slower)
- Motion: Side-to-side shear, like shaking a rope
- Damage: Severe — the destructive shaking
- Travels through: Solids only
Think of it like thunder and lightning. Lightning (the P-wave) arrives first because light travels faster than sound. Thunder (the S-wave) follows — and the gap between them tells you how far away the storm is. Earthquake early warning works on exactly the same principle, except the "lightning" is a gentle rumble, and the "thunder" is violent shaking.
Why the Speed Gap Matters
P-waves race ahead at 5–8 km/s. S-waves follow at 3–5 km/s. That 2–3 km/s difference doesn't sound like much, but over distance it adds up fast. At 100 km from the epicenter, P-waves arrive roughly 10–15 seconds before S-waves. At 200 km, it could be 25–30 seconds. And electronic signals travel at the speed of light — nearly 300,000 km/s — which means a sensor that detects the P-wave can alert someone hundreds of kilometers away before either wave reaches them.
"The earthquake travels at the speed of rock. The warning travels at the speed of light." — Commonly cited in earthquake early warning research
How Earthquake Early Warning Systems Work
The concept is deceptively simple. Execution requires sophisticated engineering:
Fault Rupture
A fault slips underground. P-waves and S-waves begin radiating outward from the epicenter simultaneously.
P-Wave Detection
The nearest sensors detect the fast-moving P-wave. Accelerometers measure the ground acceleration and send data instantly to processing servers.
Rapid Analysis
Algorithms estimate the earthquake's location, magnitude, and expected shaking intensity in milliseconds. No human in the loop.
Alert at the Speed of Light
If the earthquake exceeds a threshold, electronic alerts are pushed to phones, apps, automated systems — all at the speed of light, outrunning the seismic waves.
S-Wave Arrives
The destructive S-wave shaking reaches your location. But you've already taken cover, gas valves have closed, and elevators have stopped at the nearest floor.
The key algorithm used in many systems — including GeoShake's sensors — is called STA/LTA (Short-Term Average / Long-Term Average). It continuously compares the current ground motion to the recent background noise. When the ratio spikes suddenly, the system knows an earthquake has begun.
How Much Warning Time Do You Actually Get?
This is the most common question, and the answer is: it depends on your distance from the epicenter.
| Distance from Epicenter | Approximate Warning | What You Can Do |
|---|---|---|
| 0–10 km | 0–2 seconds | Very limited — automated systems only |
| 10–50 km | 2–10 seconds | Drop, cover, hold on. Move away from windows. |
| 50–100 km | 10–20 seconds | Evacuate dangerous areas, protect children, stop vehicles. |
| 100–200 km | 20–40 seconds | Full protective action. Shut off gas, stop surgeries, secure equipment. |
| 200+ km | 40–60+ seconds | Ample time for all actions, though shaking may be mild at this distance. |
There's a fundamental trade-off: people closest to the epicenter need the warning most, but get the least time. This is why dense sensor networks are so important — the more sensors near a fault, the faster the initial detection happens, and the more time everyone gets.
EEW Systems Around the World
Earthquake early warning isn't science fiction. Several countries already operate nationwide systems:
- Japan (UrEDAS / JMA) — The gold standard. Operational since 2007, covers the entire country. Alerts appear on TV, phones, and building systems seconds before shaking. Japan's system is credited with saving thousands of lives during the 2011 Tōhoku earthquake.
- United States (ShakeAlert) — Covers California, Oregon, and Washington. Sends alerts through the Wireless Emergency Alert (WEA) system and dedicated apps like MyShake.
- Mexico (SASMEX) — One of the oldest EEW systems, operational since 1991. Covers Mexico City and other major urban areas with up to 60 seconds of warning.
- Turkey (AFAD) — Uses a dense network of strong-motion sensors. Turkey's location on the North Anatolian and East Anatolian fault zones makes EEW critical.
- Taiwan (CWB) — Highly advanced system with rapid alerts and integration into high-speed rail safety systems.
But these government systems have a limitation: they rely on expensive, professionally installed sensor networks. Coverage gaps exist, especially in developing countries and rural areas where the seismic risk may be just as high.
Community-Powered EEW: The GeoShake Approach
This is where citizen science changes the equation. GeoShake is building a community-powered earthquake early warning network using affordable, open-source hardware.
Why Community Networks Matter
Professional seismic networks have stations spaced 20–50 km apart. GeoShake's goal is to create hyper-dense networks — with sensors every few kilometers — using hardware that costs a fraction of professional equipment:
- Traditional seismic station: $10,000–$50,000 per unit, requires professional installation
- GeoShake T1 sensor: €199, plug-and-play, anyone can deploy one at home
More sensors = faster detection = more warning time for everyone. A dense community network captures P-waves sooner because there's always a sensor close to the epicenter.
How GeoShake's Architecture Works
The GeoShake T1 sensor uses an ESP32-S3 microcontroller with four LSM6DSO MEMS accelerometers, sampling at 208 Hz. When it detects a seismic event using the STA/LTA algorithm, it sends the Peak Ground Acceleration (PGA) value to the cloud via MQTT protocol — not the full waveform. That's a critical design choice: transmitting a single number is orders of magnitude faster than streaming waveform data.
When multiple sensors across a region report elevated PGA values, the network can triangulate the earthquake's location and estimated magnitude, then push alerts to all users via the GeoShake live map and mobile app.
What to Do When You Get an Earthquake Alert
Whether you get a warning from ShakeAlert, GeoShake, or any other system, the response protocol is the same:
When You Feel the Alert
- DROP — Get down on your hands and knees. This prevents being knocked down during shaking.
- COVER — Get under a sturdy desk or table. Protect your head and neck with your arms.
- HOLD ON — Hold onto the furniture until the shaking stops. If it moves, move with it.
Do NOT run outside (falling debris is the #1 cause of injury), stand in a doorway (a myth), or try to use an elevator.
If you have more than 10 seconds of warning:
- Turn off stoves and gas lines
- Move away from large windows and glass
- Move to a safer room if needed
- Alert others around you
- If in a vehicle, pull over safely and stop
Frequently Asked Questions
How much warning time do you get before an earthquake?
Warning time depends on your distance from the epicenter. You might get 5 to 60 seconds. The further you are from the earthquake's origin, the more time you have because P-waves outrun S-waves by about 3–4 km/s. At 100 km distance, expect roughly 10–20 seconds.
What is the difference between P-waves and S-waves?
P-waves are compressional waves that travel at 5–8 km/s and cause mild back-and-forth motion. S-waves are shear waves that travel at 3–5 km/s and cause the violent side-to-side shaking that damages structures. P-waves arrive first, giving early warning systems a head start.
Can earthquake early warning systems predict earthquakes?
No. They detect earthquakes as they happen by sensing P-waves, then rapidly send alerts before the destructive S-waves arrive. Prediction implies knowing when and where a quake will occur in advance, which is currently impossible.
How does GeoShake detect earthquakes?
GeoShake T1 uses an ESP32-S3 microcontroller with four LSM6DSO MEMS accelerometers sampling at 208 Hz. When the STA/LTA algorithm detects a spike in ground acceleration, it sends the PGA value to the cloud via MQTT protocol, enabling faster-than-seismic-wave alerting.
Start Listening to the Earth
Earthquake early warning technology has moved from government labs to your living room. The science is clear: detecting P-waves and alerting before S-waves arrive saves lives, protects infrastructure, and gives communities the seconds they need to respond.
With GeoShake, you don't have to wait for a government system to reach your area. You can deploy your own sensor, contribute to a global network, and help create a denser, faster early warning system — one sensor at a time (€199).
Ready to join the network?
Get the GeoShake T1 sensor and start detecting earthquakes at home.
Related Articles
DIY Seismograph with ESP32: How to Build a Home Earthquake Sensor
Learn about PGA, the GeoShake T1 architecture, and how to build your own seismic station.
GeoShake vs Raspberry Shake: Cost, Accuracy & Use Case Comparison
Detailed comparison to help you choose the right earthquake sensor for your needs and budget.
Sources & References
- USGS Earthquake Hazards Program — U.S. Geological Survey earthquake science, wave speed data, and hazard research
- JMA — Japan Meteorological Agency: Earthquake Early Warning — Official documentation of Japan's EEW system, detection timelines, and broadcast methods
- USGS ShakeAlert — West Coast U.S. earthquake early warning system details, sensor network, and alert distribution
- Aki, K. & Richards, P.G. Quantitative Seismology (2nd ed., University Science Books, 2002) — Standard reference for P-wave and S-wave velocity models (P: 5–8 km/s, S: 3–5 km/s in crustal rock)
- Allen, R.V. (1978) "Automatic earthquake recognition and timing from single traces." Bulletin of the Seismological Society of America, 68(5), 1521–1532 — Original paper introducing the STA/LTA (Short-Term Average / Long-Term Average) detection algorithm