How Earthquake Early Warning Works: P-Waves vs S-Waves Explained
Earthquake early warning systems work by detecting fast-moving P-waves (about 6 km/s) before the destructive S-waves (about 3.5 km/s) arrive. Because electronic alerts travel at close to 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 national system, public since October 2007, is the best-known example: in the 2011 Tōhoku earthquake it issued its public warning 8.6 seconds after the first P-wave was detected. Denser sensor networks reduce detection time: an alert needs several sensors to agree, so the closer those sensors are to where an earthquake starts, the earlier the alert goes out. 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. For the physics in more depth, see P-waves vs S-waves explained.
P-Waves
- Speed: about 6 km/s in the crust (fastest seismic wave)
- Motion: Push-pull, like a slinky
- Damage: Minimal, mostly a rumble
- Travels through: Solids, liquids, gases
S-Waves
- Speed: about 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 about 6 km/s. S-waves follow at about 3.5 km/s. That 2.5 km/s difference doesn't sound like much, but over distance it adds up fast. At 100 km from the epicenter, P-waves arrive about 12 seconds before S-waves. At 200 km, about 24 seconds. And electronic signals travel at close to 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 close to the speed of light.
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 simultaneously from the point underground where the rupture starts.
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 within a few seconds, and keep updating as more sensors report. No human in the loop.
Alert at the Speed of Light
If the earthquake exceeds a threshold, electronic alerts are pushed to phones, apps and automated systems, far faster than the seismic waves travel.
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 sensor reports a trigger. An earthquake is declared only when several sensors agree.
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. The table assumes the alert reaches you 5 to 10 seconds after the earthquake starts.
| Distance from Epicenter | Approximate warning | What You Can Do |
|---|---|---|
| 0 to 10 km | None | Drop, Cover, Hold On as soon as you feel shaking |
| 10 to 50 km | 0 to 9 seconds | Drop, cover, hold on. Move away from windows. |
| 50 to 100 km | 4 to 23 seconds | Drop, cover, hold on. Protect children, stop vehicles. |
| 100 to 200 km | 18 to 52 seconds | Full protective action. Shut off gas, stop surgeries, secure equipment. |
| 200 to 300 km | 47 to 80 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 public systems:
- Japan - The best-known system. Public nationwide since October 2007. Alerts appear on TV, phones, and building systems seconds before shaking. In the 2011 Tōhoku earthquake it warned the Tohoku region before the strong shaking arrived.
- United States (ShakeAlert) - Covers California, Oregon, and Washington. Sends alerts through the Wireless Emergency Alert (WEA) system and dedicated apps like MyShake.
- Mexico (SASMEX) - Running since 1991 and public since 1993. Gives Mexico City about a minute or more for distant earthquakes on the Pacific coast, and little or nothing for earthquakes close to the city.
- Taiwan (Central Weather Administration) - 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.
Türkiye has no nationwide public early warning system yet, although the North Anatolian and East Anatolian fault zones make one critical.
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 sensors running open source firmware.
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 home earthquake sensor: $199.99, plug-and-play, anyone can deploy one at home
More sensors mean earlier detection and more warning time for people farther away. A dense community network captures P-waves sooner because a sensor is more likely to be close to where the earthquake starts.
How GeoShake's Architecture Works
The GeoShake T1 sensor uses an ESP32-S3 microcontroller with four LSM6DSO MEMS accelerometers, sampling at 104-110 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 several sensors across a region trigger, the network locates the earthquake from the times at which they triggered, then pushes alerts to all users via the GeoShake live earthquake 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: it can be tens of seconds far away, a few seconds closer in, or none near the epicenter. The farther you are, the more time you have, because the S-wave (about 3.5 km/s) falls further behind the P-wave (about 6 km/s). At 100 km, that is roughly 18 to 23 seconds if the alert reaches you 5 to 10 seconds after the earthquake starts.
What is the difference between P-waves and S-waves?
P-waves are compressional waves that travel at about 6 km/s and cause mild back-and-forth motion. S-waves are shear waves that travel at about 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 104-110 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.99).
Ready to join the network?
Put a home earthquake sensor on the network: the GeoShake T1 plugs in and goes live in minutes.
Related Articles
Sources & References
- USGS, "Seismographs - Keeping Track of Earthquakes": P-waves usually travel at less than 6 km/s in the Earth's crust, and S-waves at barely more than half that speed
- ak135 reference Earth model, Kennett, Engdahl and Buland (1995), Geophys. J. Int. 122, 108-124: velocity table behind the average crustal speeds used here, about 6 km/s for P-waves and 3.5 km/s for S-waves
- JMA, "Earthquake Early Warning System": Japan's public warning service was launched on 1 October 2007
- JMA, "Information on the 2011 Great East Japan Earthquake": the warning was issued 8.6 seconds after the first P-wave was detected at the nearest station
- Kodera et al. (2021), Front. Earth Sci. 9:726045: in 2011 the system issued a public warning for the Tohoku region before the S-wave hit
- JMA, "Limitations of the Earthquake Early Warning": a warning gives seconds to a few tens of seconds, and close to the focus it may not arrive before strong shaking
- Given et al. (2018), USGS Open-File Report 2018-1155: ShakeAlert alerts may arrive before, during, or after strong shaking, with little or no warning near the epicenter
- Suárez (2022), Front. Earth Sci. 10:827236: review of Mexico's alert system, which has broadcast public alerts since August 1993; on 19 September 2017 the alert was heard in Mexico City at the same time as the strong shaking or a few seconds after it
- Seismological Society of America release on Suárez et al. (2018), Seismol. Res. Lett.: almost two minutes of warning in Mexico City for the distant Tehuantepec earthquake of 7 September 2017
- Finazzi, Bossu and Cotton (2024), Sci. Rep. 14, 4878: Türkiye does not have a national public earthquake early warning system
- Central Weather Administration, Taiwan: the Central Weather Bureau became the Central Weather Administration on 15 September 2023
- 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
Get earthquake insights in your inbox
One short email a month — new guides, network updates, real detection stories. No spam, unsubscribe anytime.