PGA DIY Tutorial

ESP32 earthquake sensor: build a DIY seismograph that actually detects shaking

• Updated • 18 min read • By Levent Ozturk
GeoShake DIY seismograph device for earthquake monitoring
Key Takeaway

You will build an ESP32-S3 earthquake sensor from about $25 in parts, in one evening, with no soldering. It runs the same STA/LTA detection algorithm as GeoShake stations and proves it at boot with golden test vectors. It is a learning instrument: not calibrated, not validated by other stations, and not a warning you can rely on.

Prefer a finished board?

The GeoShake T1 Maker Edition is the same seismic electronics that go into every GeoShake T1: an ESP32-S3 with four LSM6DSO sensors, assembled, tested and with the firmware already on it, for $99.99. Want it ready out of the box? The complete GeoShake T1 is $199.99.

See the Maker Edition

Plenty of tutorials read an accelerometer and print numbers. Detecting an earthquake is a different problem, and the standard answer is a specific algorithm called STA/LTA. We publish ours under the GPL, so this build runs the real thing instead of an approximation, and it can prove that it does.

This guide is the on-site version of our DIY write-up on GitHub. Every measurement in it was taken on real hardware: our own bench build. Expect one evening, no soldering and about $25 in parts.

What you are building, and what it is not

What you get: a device that feels the ground, decides when the shaking is real, and shows you the waveform around each detection, including the moment before it fired.

What you don't get: a calibrated instrument, a validated event, or a warning you can rely on. One sensor on a breadboard cannot tell a truck from a tremor with any confidence, and nothing here is checked against other stations. If a notification wakes your family at 3am, it should come from something better than this.

Be clear about the limits before you start. Your build cannot:

  • Tell an earthquake from a truck. It detects shaking. Classification needs either a much better noise floor or corroboration from other stations. You will get triggers from footsteps, doors and the washing machine.
  • Confirm anything. A single station has no way to know if a signal is local or regional. Real networks confirm an event by seeing it at several stations with arrival times consistent with a common epicenter. One sensor can't.
  • Measure absolute ground motion accurately. Nothing here is calibrated. PGA numbers are indicative, not metrological.
  • Warn you reliably. No redundancy, no watchdog, no signed updates. If the Wi-Fi drops or the sketch hangs, nothing tells you it stopped.

None of this is a flaw in the build. It is what separates a learning instrument from a monitoring instrument. Build it to understand how earthquake detection and early warning work. That is a genuinely good reason.

How an earthquake sensor decides: P-waves, S-waves and STA/LTA

An earthquake sends out two waves that travel at different speeds:

  • P-wave: fast (about 6 km/s), arrives first, usually harmless. A sharp little jolt.
  • S-wave: slower (about 3.5 km/s), arrives second, does the damage.

Both start at the same instant from the same place. Because one is faster, a gap opens between them that grows with distance. 50 km out, that gap is around 6 seconds. That gap is the whole idea behind earthquake early warning: detect the P-wave, and you have until the S-wave arrives to act. How many seconds that leaves depends on your distance from the epicenter, and close to it there can be none. Our guide to P-waves and S-waves goes deeper into the physics.

So the job is: notice the P-wave, fast, without crying wolf every time a door slams.

STA/LTA: how the decision gets made

The classic answer, used by real seismic networks, is a ratio of two moving averages of signal energy:

  • STA, the short-term average over about 0.5 s, reacts fast: "what is happening right now?"
  • LTA, the long-term average over about 30 s, reacts slowly: "what is normal around here?"

Divide one by the other. In a quiet room both are similar and the ratio sits near 1. When something starts shaking, STA shoots up while LTA barely moves, and the ratio spikes. Cross a threshold (this build uses 6) and you have a detection.

The method is self-calibrating. A noisy workshop and a quiet basement have very different absolute vibration levels, but in both places the ratio sits near 1 when nothing is happening. You don't tune it per room; the LTA learns the room for you.

Three details separate a working implementation from a toy, and all three are in the code you are about to flash:

  1. Warm-up. The LTA needs about 30 s of data before it means anything. Trigger before that and you fire on your own power-up transient.
  2. LTA freeze. Once triggered, the LTA stops updating. Otherwise a long earthquake raises its own baseline and de-triggers itself mid-shaking.
  3. Hysteresis. The detector re-arms at a lower ratio (2) than it triggers at (6). Without that, one event produces fifty detections.

Parts list

The whole build comes to about $25. Prices are approximate.

Part Notes Approx. price
ESP32-S3 dev board Any S3 board: DevKitC, XIAO ESP32-S3 and similar $8-12
LSM6DS3 breakout Or LSM6DS3TR-C, or LSM6DSO. SparkFun, Seeed Grove or generic clones $10-13
Jumper wires One per connection in the wiring table below $1
Breadboard Optional, but easier $3
Second sensor (optional) Averaging two sensors lowers your noise floor: in theory by about √2, and our quiet-room run came close. See Add a second sensor. +$10-13

Any 6-axis IMU from ST's LSM6 family works: the driver accepts the WHO_AM_I values 0x69 (LSM6DS3), 0x6A (LSM6DS3TR-C) and 0x6C (LSM6DSO). We used two LSM6DS3. If you are still comparing parts, see our roundup of accelerometers for DIY earthquake sensors, and ESP32 vs Raspberry Pi for the choice of board.

Why an accelerometer and not a "real" geophone? Cost, mostly. A research seismometer resolves ground motion a thousand times finer than this. But for early warning, dense beats precise: twenty cheap sensors spread across a city catch a P-wave sooner than one expensive one across town, because the race is against distance, not against noise.

Wiring

This build uses SPI, not I²C, for two reasons: each extra sensor needs only one more chip-select line (instead of fighting over I²C addresses), and the timing is deterministic enough to sample several sensors inside one sample period.

Sensor pin ESP32-S3 Note
VDD / VIN 3V3 Not 5V
GND GND The single most common failure is a missing ground
SCL / SPC GPIO 12 SPI clock (SCLK)
SDA / SDI GPIO 11 MOSI. Yes, the pin says SDA; in SPI mode it is data-in
SDO / SA0 GPIO 13 MISO
CS GPIO 9 Sensor 1
CS GPIO 10 Sensor 2 (if you have one)

Both sensors share SCLK, MOSI and MISO. Only CS is unique to each sensor.

Wiring diagram: two LSM6DS3 sensors sharing power, clock and data lines with an ESP32-S3, each with its own chip-select line
Two LSM6DS3 sensors on one SPI bus. Pin numbers are ESP32-S3 GPIO numbers. On a phone, swipe sideways to see all of it.

Running a single sensor? Leave out sensor 2 and its GPIO 10 chip-select wire, and change one line in geoshake_diy.ino:

static const int CS_PINS[] = {9};   // was {9, 10}

The trap that will cost you an hour

On these parts the CS pin also selects the protocol: held high, the sensor speaks I²C; pulled low, it speaks SPI. A sensor wired for SPI is therefore completely invisible to an I²C scanner. You get a clean "no devices found" from perfectly good hardware. If you are unsure how yours is wired, flash firmware/spi_probe: it sweeps the likely MISO pins and tells you exactly what answered where.

Flash the firmware

The firmware lives in the diy folder of the GeoShake repository. The commands below use arduino-cli with the ESP32 Arduino core; the Arduino IDE works too.

git clone https://github.com/GeoShake/geoshake.git
cd geoshake/diy/firmware

arduino-cli compile --fqbn esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc geoshake_diy
arduino-cli upload -p /dev/cu.usbmodemXXXX --fqbn esp32:esp32:esp32s3:USBMode=hwcdc,CDCOnBoot=cdc geoshake_diy

Replace /dev/cu.usbmodemXXXX with the port your board appears on. Then open the serial monitor at 115200 baud.

Second trap: the empty serial monitor

If you are plugged into the S3's native USB port (the one that shows up as usbmodem), you need USBMode=hwcdc,CDCOnBoot=cdc. In the Arduino IDE that is Tools → USB CDC On Boot: Enabled. Without it the sketch runs fine but Serial output never reaches USB, and you stare at an empty monitor wondering what you broke. Nothing. It's this setting.

Verify your build with golden vectors

Before you trust a detector, prove its maths is right. This is the part most projects skip.

The reference implementation ships with golden vectors: fixed input sequences with known outputs, locked to full float precision. They are what keeps the production firmware honest, and your build runs them at boot:

GeoShake DIY seismometer
========================
Golden vector self-test ... PASS
  -> bit-compatible with the reference DSP, on this chip

If that says PASS, your STA/LTA produces bit-identical results to the algorithm running on real GeoShake stations. Not similar: identical, to the last digit. If it fails, the firmware refuses to run, because a detector you can't trust is worse than no detector.

You can also run the vectors on your PC, without any hardware. From the diy folder of the repository (one level above firmware):

cd firmware/test
c++ -std=c++11 -O2 -I../geoshake_diy golden_host_test.cpp -o golden_test && ./golden_test
golden 1: identical sensors        PASS
   sta   got 0.00024528734454568979
         want 0.00024528734454568979
golden 2: differing sensors        PASS
behaviour suite                    PASS

Worth knowing: the ESP32-S3's FPU is single-precision, so the double maths here is emulated in software, and it still matches exactly. That is why the code says, in two places, not to switch to float. It would be faster, and it would silently stop matching.

What you should see

After boot there are about 30 seconds of warm-up while the LTA fills:

[warmup] n=569   rate=104.0 Hz  ratio=6.51  noise=0.00332  triggers=0
[warmup] n=1089  rate=103.6 Hz  ratio=3.30  noise=0.00438  triggers=0
[warmup] n=2025  rate=103.6 Hz  ratio=1.97  noise=0.00541  triggers=0

Look at the first line: the ratio reads 6.51, above the threshold, and nothing fires. That is the warm-up rule ignoring the power-up transient.

noise is √LTA: the RMS of your background vibration, in m/s². This is your noise floor, measured. On our workbench in a quiet room it settled around 0.009 m/s², and climbed past 0.04 m/s² when something in the building started vibrating. A concrete floor will read lower; a spot next to a road, higher.

Once the log says [armed], knock on the bench next to the sensor:

*** SHAKING DETECTED ***
  trigger #3
  STA/LTA  12.02  (threshold 6.0)
  PGA      0.2489 m/s^2

Our own bench test, as an example: 150 seconds, 7 triggers, zero false positives. Ratios at trigger ranged from 6.18 to 12.02 and PGA from 0.064 to 0.249 m/s². In between, sitting quietly, the ratio wandered between 0.3 and 1.4, nowhere near the threshold. That margin is what a working detector looks like. It is one run in one room; your numbers will depend on yours.

Sample rate and the parameter maths

The detector constants assume a sample rate of about 109 Hz. The firmware prints the rate it actually measures; ours ran at a steady 103.6 Hz. If yours differs a lot, this is how the numbers are derived:

alphaHp       = 2π · fc / fs        high-pass coefficient, fc ≈ 0.2 Hz
nSta          = 0.5 s · fs          short window, in samples
nLta          = 30 s  · fs          long window, in samples
warmupSamples = nLta                don't trigger before the LTA is full

The high-pass filter is what removes gravity. Your sensor reads about 9.81 m/s² on one axis all the time; without removing that DC component, the "energy" would be dominated by the Earth simply existing.

Don't change the constants casually. The golden vectors encode these exact values: change one and the self-test fails, and you lose the ability to say your build matches the reference. Our 103.6 Hz instead of 109 stretches the 0.5 s STA window to about 0.53 s. Harmless. Leave it. If your rate is far off, the parameter calculator in the repository (tools/calculator.html, open it in any browser) computes alphaHp, nSta and nLta for any sample rate.

Read the waveform

After each trigger the firmware dumps about 2 seconds of buffered waveform as CSV. Because it comes from a ring buffer, the dump contains the moments before the trigger fired. Here is the STA/LTA profile from the strongest detection in our bench test:

i= 99   ratio=  0.86   quiet
i=104   ratio=  0.82   quiet
i=109   ratio= 12.02   ← TRIGGER FIRED
i=119   ratio= 50.78
i=136   ratio= 72.13   ← peak of the shaking

Look at the gap: the alarm fired at sample 109 and the shaking peaked at sample 136. That is 27 samples, about 0.26 seconds of lead, on a knock, where the P-wave and S-wave are essentially on top of each other.

In a real earthquake the equivalent gap is the P-to-S separation, and it grows with distance from the epicenter: seconds, sometimes tens of seconds, and close to the epicenter none at all. The mechanism you are watching in that CSV is the same one earthquake early warning is built on; a knock just has a much smaller gap to work with.

tools/plot_waveform.py turns any dump into a picture. It has no dependencies and writes an SVG. Save the serial output to a file (here serial.log) and run, from the diy folder:

python3 tools/plot_waveform.py serial.log -o waveform.svg
Three-axis acceleration and STA/LTA ratio around a knock: the detector fires 0.26 seconds before the shaking peaks
A knock on our test bench, not an earthquake: the strongest detection from our bench test, plotted with plot_waveform.py. On a phone, swipe sideways to see all of it.

Read it top to bottom. The three acceleration traces are quiet, then the knock arrives. The red line is the moment STA/LTA crossed 6 and the detector fired. The dashed line is where the shaking actually peaked. The shaded band between them is the lead time. Remember that this is a knock on our test bench, not an earthquake.

Across the seven triggers in our bench test the lead ranged from 0.26 s to 1.01 s, depending on how sharply the knock started. A gentle onset gives the detector more room; a sudden bang gives it less.

Add a second sensor

A second LSM6DS3 on its own chip-select line (GPIO 10) is the most useful upgrade in this build. The firmware averages the sensors, and averaging treats noise and ground motion differently:

  • Sensor noise is uncorrelated. The two parts' errors are unrelated, so averaging cancels some of it: by about the square root of two (√2 ≈ 1.414).
  • Ground motion is correlated. Both sensors feel the same shake, so averaging preserves it fully.

Better signal-to-noise, from nothing but arithmetic. The averaging happens inside the reference DSP itself, which expects four sensors; with two, each fills two slots, and the maths is untouched.

Measure it with the array_gain sketch

firmware/array_gain runs three detectors in parallel on the same samples: sensor 0 alone, sensor 1 alone, and both averaged. Running them at the same time matters. Background vibration changes minute to minute, so measuring one after the other would compare different rooms rather than different sensor counts.

Flash it, leave the bench alone for seven minutes, and read the result. This is one run on our bench build, in a quiet room, over 30 clean windows:

  single-sensor noise floor : 0.009295 m/s^2
  two-sensor  noise floor   : 0.006638 m/s^2
  measured array gain       : 1.402x   (theory for uncorrelated noise: 1.414x)
  clean windows averaged    : 30
  discarded (room moved)    : 0

Theory says about √2. Our quiet-room run came close. Your result depends on your room, and the room is exactly what limits it.

A noisy room caps the gain

Averaging only cancels noise that is uncorrelated between the two parts. Their own electronic noise is uncorrelated, so it drops by about √2. A vibrating bench or floor is correlated: both sensors see it identically, so averaging preserves it, exactly as it preserves an earthquake. A noisy room therefore does more than raise your noise floor: it also caps how much a second sensor can help.

We learned this the hard way. Our first two runs on the bench read lower, about 1.35x. One was contaminated by someone bumping the bench, the other by a vibration source that appeared mid-measurement and pushed the noise floor from 0.012 to 0.045 m/s². The shortfall was never a deep truth about the building. It was the room, and the fix was to actually be quiet.

Two practical consequences:

  • Your measured gain is a quietness score. Close to 1.41 means what is left is mostly sensor noise. Down near 1.1 means your surroundings dominate: move the sensors to a concrete floor, against a wall, away from anything with a motor in it.
  • Don't trust a run with discards. The sketch flags any window where the STA/LTA ratio crosses 2.5 and leaves it out of the average. If more than a couple are discarded, the number is not real yet. Its blind spot: continuous vibration raises the LTA too, so the ratio stays low and the window passes. A noise floor that drifts upward across the run is the giveaway.

Why the T1 uses four

Why would a commercial station bother with four accelerometers when one detects shaking fine? Because the noise floor decides how small an event you can see at all, and array gain is the cheapest way to lower it. In the same arithmetic, four sensors buy a factor of 2 over one, which is why the GeoShake T1 has four. The Maker Edition board carries the same four-sensor LSM6DSO array, assembled and tested.

The built-in web dashboard

Flash firmware/webui instead of geoshake_diy and the device serves its own interface: live waveform, detector state, noise floor, and every detection with a downloadable waveform. No app, no cloud, no account.

The DIY sensor's own web dashboard showing live three-axis ground motion, the STA/LTA detector state and a table of detections
The real dashboard, caught mid-detection: the badge reads DETECTING because someone knocked on the bench while the page was open. It works on a phone too.

First boot: with no Wi-Fi saved, the device opens its own access point called GeoShake-DIY. Join it, open http://192.168.4.1, enter your Wi-Fi network, and the device restarts and connects. After that it is at http://geoshake-diy.local, and the serial monitor also prints its IP address.

A few things it does deliberately:

  • Sampling runs on its own core. The detector sits in a high-priority task pinned to core 1; Wi-Fi and HTTP live on core 0. A page load can take tens of milliseconds, which at 104 Hz would drop samples, and a detector that stops detecting while someone opens a browser tab isn't a detector.
  • No libraries to install. WiFi, WebServer, Preferences and mDNS all ship with the ESP32 core. The page is plain HTML, CSS and JavaScript served from flash.
  • It works with no internet. Your router doesn't need a WAN connection. A seismic station that needs the cloud to show you its own data is the wrong design.
  • Every detection is downloadable as the same CSV the serial dump produces, so tools/plot_waveform.py works on it directly.

The dashboard costs about 300 KB of flash over the plain build, and there is still room.

Where to put it

For building and testing, a workbench is fine: you knock next to the sensor and watch the serial monitor. Every measurement in this guide was taken on our workbench during the build.

Once the build works and you want it to record the ground, move it. A sensor measures whatever it is coupled to, so a sensor standing on furniture records the furniture, not the ground. Put it on a solid floor, ideally against a wall, and away from anything with a motor in it. A concrete floor will read a lower noise floor than a spot next to a road.

If it triggers constantly, it is sitting on something that vibrates: move it to the floor. With two sensors, the measured array gain tells you how quiet the spot is. For more on choosing a spot at home, see our home earthquake monitoring guide.

What PGA means

Every trigger in this build prints a PGA value. Peak ground acceleration is the maximum ground acceleration recorded at a specific location during shaking. It is usually given in units of gravity (g), where 1 g equals 9.81 m/s². Your build prints it in m/s², so divide by 9.81 to compare it with the table below. PGA tells you how hard the ground jerked, not just how far it moved.

Magnitude describes the total energy an earthquake releases at its source. PGA is a local intensity measure: it answers how hard did the ground shake right here? Two towns an equal distance from the same earthquake can shake very differently, depending on local soil. A single station reports shaking (PGA), not magnitude.

Peak Ground Acceleration (PGA) measurement concept diagram

To put PGA values in context, this is roughly how they map to felt shaking:

Instrumental intensity PGA (in g) Perceived shaking Potential damage
I < 0.0005 Not felt None
IV 0.003 to 0.028 Light None
VI 0.115 to 0.215 Strong Light
VIII 0.401 to 0.747 Severe Moderate to heavy
X+ > 1.39 Extreme Very heavy

A shallow earthquake close to a sensor can produce a much higher PGA than a far bigger but distant or deep one. The 2008 Iwate-Miyagi earthquake in Japan registered 4.36 g, while the magnitude 9.2 Alaska earthquake of 1964 produced about 0.18 g at a recording site. Keep in mind that the PGA from this build is indicative, not calibrated.

DIY build, Maker Edition board or GeoShake T1

Everything you flash in this guide comes from the GeoShake T1's firmware, which is open source. What differs is everything around the detector. Here is an honest comparison:

This build (about $25) Maker Edition board ($99.99) GeoShake T1 ($199.99)
What it is A breadboard learning instrument you wire and flash yourself The same seismic electronics as every T1: assembled, tested, firmware already on it The complete unit: enclosure assembled, tested and ready to plug in
Sensors ESP32-S3 with 1-2 LSM6DS3 ESP32-S3 with four LSM6DSO ESP32-S3 with four LSM6DSO, array gain
Soldering None None: nothing on the board is soldered None: ready out of the box
Detection Same STA/LTA code, checked by golden vectors Same firmware as the T1 STA/LTA, on the T1 firmware
Build and test You wire and verify it yourself. PGA readings are indicative, not calibrated Assembled and tested on the same line as the T1 Finished unit: assembled, tested and ready to plug in
Enclosure 3D print ours (CC BY-SA) You print it: files are open, CC BY-SA 4.0 Included, injection moulded and tested
GeoShake network Not as built here. This firmware runs stand-alone, and a single station cannot confirm an event Yes. Ships with an issued station identity and appears on the map like any T1 Yes. Multi-station confirmation, live on the world map
GeoShake app Not connected: no app, no cloud, no account Set up with the same free app as the T1 Notifications reach your phone. The seconds of warning depend on your distance from the epicenter, and can be none
Updates No signed updates: you reflash it yourself Lifetime firmware updates, free for the life of the device Signed OTA updates (RSA-3072, A/B rollback)
Help This guide and the write-up on GitHub The community on Discord, and us by email Live support

The DIY build teaches you the physics. The T1 gives you the network. What you pay for is not the hardware; it is the validation and the other stations. The Maker Edition board sits in between: the same electronics as the T1 and on the network from day one, but you print the enclosure, supply a USB-C cable and power source, and set it up yourself.

Troubleshooting

Symptom Cause
Serial monitor completely empty USB CDC On Boot is not enabled. See Flash the firmware.
"NONE FOUND", and an I²C scan is also empty The sensor is in SPI mode (CS pulled low), so an I²C scan can't see it. Run spi_probe.
spi_probe finds nothing Ground. Then SCLK and MOSI swapped. Then MISO on an unlisted pin.
Golden self-test FAILS float snuck in somewhere, or -ffast-math is on.
Triggers constantly The sensor is on something that vibrates. Move it to the floor, ideally against a wall.
Never triggers Still warming up (about 30 s), or knock harder: you need a ratio of 6 or more.
Rate reads far from about 104 Hz Check that CTRL1_XL is 0x40. Recompute the constants (see the parameter maths).

FAQ

Can an ESP32 detect earthquakes?

An ESP32-S3 with an LSM6DS3 accelerometer can detect shaking. This build runs the STA/LTA detector at about 104 Hz and fires when the ratio crosses 6. On its own it cannot tell an earthquake from a truck, and nothing checks it against other stations, so treat every detection as shaking, not as a confirmed earthquake.

Which accelerometer should I use for an ESP32 earthquake sensor?

Any 6-axis IMU from ST's LSM6 family works with this firmware. The driver accepts the WHO_AM_I values 0x69 (LSM6DS3), 0x6A (LSM6DS3TR-C) and 0x6C (LSM6DSO). We built ours with two LSM6DS3 breakouts wired over SPI, not I²C.

What is the STA/LTA algorithm?

STA/LTA divides a short-term average of signal energy (about 0.5 seconds) by a long-term average (about 30 seconds). In a quiet room the ratio sits near 1; when shaking starts, the short average jumps and the ratio spikes. This build triggers at a ratio of 6 and re-arms at 2, after a warm-up of about 30 seconds.

How accurate is a DIY ESP32 seismograph?

Its detection maths is exact: at boot it runs golden test vectors and refuses to run unless its results are bit-identical to the reference DSP on GeoShake stations. Its measurements are not calibrated, so PGA values are indicative. How small a shake it can see depends on its noise floor, and that depends on where you put it.

Can a DIY build join the GeoShake network?

Not as built here. The firmware in this guide runs stand-alone, with no app, cloud or account connection. The supported way onto the GeoShake network is the GeoShake T1 Maker Edition board ($99.99) or the complete GeoShake T1 ($199.99). If you have built your own station and want it on the map, tell us about it through the join the network form.

Licence and what is open

The code in the diy folder is GPL-3.0-or-later, because it derives from the GeoShake firmware's published DSP reference (firmware/shared/src/stalta.ts). The write-up it comes with is CC BY-SA 4.0.

The firmware, the DSP reference, the enclosure designs and the seismic data are open for real. The T1's PCB and schematics are not published, so the T1 as a whole is not open-source hardware, and we don't describe it that way. The Maker Edition board uses the same PCB. The sentence we use everywhere is:

Open source firmware, open enclosure designs, open data. PCB design and cloud backend are proprietary.

What's open is open; what isn't, we say so. The full reasoning is in what we opened, what we didn't, and why.

Ready to get your own sensor?

Join the GeoShake network with a pre-assembled GeoShake T1 earthquake sensor.

Get GeoShake T1

Share this article:

Sources & References

  1. GeoShake DIY seismometer: write-up, firmware and tools on GitHub. The source for every pin, command, log line and measurement in this guide. Code GPL-3.0-or-later, write-up CC BY-SA 4.0
  2. USGS Earthquake Hazards Program: Peak Ground Acceleration. USGS reference for PGA definitions, ShakeMap methodology, and ground motion measurement standards
  3. STMicroelectronics LSM6DSO Datasheet. Official datasheet for the 6-axis iNEMO inertial module (accelerometer + gyroscope) used in the GeoShake T1, including noise density and full-scale range specifications
  4. Espressif ESP32-S3 Technical Reference Manual. Microcontroller specifications for the processing platform used in this build and in the GeoShake T1
  5. USGS: Modified Mercalli Intensity Scale. Official USGS description of the MMI scale, correlating PGA values to felt shaking intensity and damage levels
  6. 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) P-wave detection algorithm

Correction

11 August 2026. An earlier version of this article stated that the GeoShake T1 samples "at 100 Hz with a 23 Hz hardware low-pass filter." That was wrong. The firmware configures the LSM6DSO accelerometers with CTRL1_XL = 0x40 — a 104 Hz output data rate at ±2 g, with the optional second-stage low-pass filter (LPF2) disabled. Field measurements independently confirm it: the observed noise floor matches the wider bandwidth that follows from LPF2 being off, and would be roughly a third lower had the 23 Hz filter actually been engaged. The text above has been corrected. Our thanks to the internal review that caught it.

14 November 2026. This article was rewritten as a step-by-step build guide based on our published DIY write-up.

Get earthquake insights in your inbox

One short email a month — new guides, network updates, real detection stories. No spam, unsubscribe anytime.