A DIY, Open-Source IoT Seismic Monitoring Station
Think of GeoShake as a trained guard dog listening to the Earth's depths. It won't react to ordinary noise (like a passing truck), but when it senses real danger (P and S waves), it doesn't just bark (raise an alarm)βit records how big the threat is and delivers the full report once the connection is restored.
GeoShake is a distributed, real-time earthquake monitoring station you can build yourself! It's designed to be placed in homes, offices, or anywhere you want to contribute to a global seismic monitoring network.
Unlike simple vibration sensors, GeoShake computes professional seismological metrics:
| Metric | What It Measures |
|---|---|
| PGA (Peak Ground Acceleration) | Maximum instantaneous ground acceleration with Richter-scale estimation |
| Arias Intensity | Cumulative energy and destructive potential of shaking |
| P-Wave Detection | Early-arriving vertical compression waves |
| S-Wave Detection | Secondary, more damaging horizontal shear waves |
- π― Real-time MQTT Telemetry β Publishes to HiveMQ Cloud for network-wide monitoring
- π± Mobile WiFi Provisioning β No coding required! Connect via "GeoLink-216" hotspot
- π§ STA/LTA Signal Processing β Industry-standard seismic event detection algorithm
- π Dual-Sensor Noise Reduction β 2x LSM6DS3/LSM6DSOX sensors averaged for cleaner signals
- π‘ Offline Buffering β Ring buffer stores data during connectivity loss
- π Local Web Dashboard β View live data at your device's IP
- π‘ LED Status Indicators β Visual feedback for connection, events, and monitoring
- π Audible Alerts β Buzzer activation on seismic events
- β‘ OTA Updates β Remote firmware updates supported
- π§ Auto-Calibration β 1000-sample gravity baseline calibration stored in EEPROM
| Component | Quantity | Notes |
|---|---|---|
| ESP32-S3-WROOM | 1 | Recommended for dual-sensor SPI setup |
| ESP8266 NodeMCU v3 | 1 | Alternative: dual-sensor SPI setup |
| LSM6DS3 / LSM6DSOX | 2 (min 2 recommended) | |
| LED (any color) | 1 | Status indicator |
| Buzzer | 1 | Optional, for audible alerts |
| Resistors, wires, etc. | β | Standard prototyping supplies |
βββββββββββββββββββββββββββββββββββββββ
β ESP32-S3 WROOM β
βββββββββββββββββββββββββββββββββββββββ€
β SPI Bus: β
β SCK β GPIO 12 β
β MISO β GPIO 13 β
β MOSI β GPIO 11 β
β β
β Sensor 1 (CS) β GPIO 9 β
β Sensor 2 (CS) β GPIO 10 β
β β
β LED β GPIO 48 β
β Buzzer β GPIO 5 β
βββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββ
β ESP8266 NodeMCU v3 β
βββββββββββββββββββββββββββββββββββββββ€
β I2C Bus: β
β SDA β GPIO 4 (D2) β
β SCL β GPIO 5 (D1) β
β β
β Sensor Address: 0x6B (or 0x6A) β
β β
β LED β GPIO 12 (D6) β
β Buzzer β GPIO 14 (D5) β
βββββββββββββββββββββββββββββββββββββββ
π‘ Tip: The ESP8266 I2C variant uses a single LSM6DS3 sensor. If the sensor isn't detected at
0x6B, try0x6A(jumper setting on some breakout boards).
The firmware follows seismological ENU convention:
Up (Z+) β
β
β
North β East
(Y+) ββββΌββββ (X+)
- E (East): Sensor X-axis
- N (North): Sensor Y-axis
- U (Up): Sensor Z-axis (gravity = ~1.0g when level)
geoShakeGithub/
βββ firmware/
β βββ ESP32_LSM6DS3_SPI_2XSENSOR/ # β Primary ESP32-S3 firmware
β β βββ esp32_lsm6ds3_spi_2xsensor.ino
β β βββ SeismicDiscriminator.h # STA/LTA wave detection
β βββ ESP8266_LSM6DS3_I2C_XSENSOR/ # ESP8266 I2C variant
β βββ ESP8266_LSM6DS3_SPI_2XSENSOR/ # ESP8266 SPI variant
βββ hardware/
β βββ pcb/ # PCB design files
β βββ schematics/ # Circuit schematics
β βββ 3dprint/ # Enclosure STL files
βββ README.md
-
Open
firmware/ESP32_LSM6DS3_SPI_2XSENSOR/in Arduino IDE or PlatformIO -
Install required libraries:
ArduinoJsonPubSubClient
-
Update MQTT credentials in the sketch:
const char *mqtt_username = "YOUR_USERNAME"; const char *mqtt_password = "YOUR_PASSWORD";
π Get credentials at: geoshake.org/join-network.html
-
Upload to your ESP32-S3
On first boot (or if WiFi fails):
- π‘ Device creates "GeoLink-216" hotspot
- π± Connect your phone to this network
- π Open http://192.168.4.1 in browser
- π Enter your home WiFi credentials
- β Device reboots and connects to your network
Watch the serial monitor for:
[OK] WiFi connected!
IP: 192.168.x.x
[OK] MQTT connected to HiveMQ Cloud
[OK] Calibration loaded from EEPROM
seismic/stations/{station_id}/
βββ status # Periodic heartbeat (every 30s)
βββ telemetry # Real-time sensor data
βββ events/
β βββ pga # PGA threshold events
β βββ arias # Arias intensity events
βββ commands # Remote control (subscribed)
βββ lwt # Last Will & Testament
{
"station_id": "GEO_S3_a1b2c3d4",
"timestamp": "2025-01-15T14:30:00Z",
"pga": 0.0042,
"arias_intensity": 0.0018,
"axis": {
"east": 0.0012,
"north": -0.0008,
"up": 0.0035
},
"wave_type": "P-Wave",
"richter_estimate": "<2.0",
"rssi": -65
}PGA = sqrt(EΒ² + NΒ² + UΒ²)
Thresholds:
βββ LOW: 0.008g β Minor vibration
βββ MEDIUM: 0.015g β Noticeable shaking
βββ HIGH: 0.030g β Significant event
βββ SEVERE: 0.080g β Major earthquake
The firmware uses a Recursive Short-Term Average / Long-Term Average algorithm:
STA_new = (sample Γ 0.1) + (STA_old Γ 0.9) // ~0.5s window
LTA_new = (sample Γ 0.01) + (LTA_old Γ 0.99) // ~10s window
P-Wave Trigger: (STA_z / LTA_z) > 2.5 // Vertical energy spike
S-Wave Arrival: Horizontal > Vertical Γ 1.2
Ia = (Ο / 2g) Γ β« aΒ²(t) dt
Calculated using a circular buffer of 200 samples with running sum optimization.
GeoShake stations form a distributed seismic intelligence network. The more nodes, the better the coverage!
Options:
- π Buy a ready-made device β Plug & play, pre-configured
- π§ Build your own β Flash firmware, join with your MQTT credentials
οΏ½οΈ View Live Station Map β See all active stations in real-time!
οΏ½π Get Started at geoshake.org
The source code (firmware, software, documentation) in this repository is open source.
You are free to:
- Copy, modify, and distribute the code
- Build your own GeoShake device using these designs
- Create derivative works and improvements
- Use the code for personal, educational, or commercial DIY projects
Caution
GeoShake is the sole authorized manufacturer of pre-assembled GeoShake devices.
The open-source nature of this project applies to the published source materials only. Pre-built devices sold through official channels are proprietary products protected by applicable intellectual property laws.
Pull requests welcome! Some ideas:
- Development of a better algorithms for seismic analysis
- Additional sensor support (ADXL345, MPU6050)
- Machine learning event classification
- Integration with USGS/EMSC APIs
- Mobile companion app improvements
- π Issues: Open a GitHub issue
- π¬ Community: stt.gg/RTrkfwBN
- π Contact: geoshake.org/contact.html
π Built by makers, for the planet. π
Every node counts. Together, we feel the Earth.








