Skip to content

GeoShake/geoshake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Status License Platform Version

GeoShake

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.

How GeoShake Works

πŸ“· Hardware Gallery

GeoShake Device GeoShake PCB GeoShake Assembly

GeoShake Sensor GeoShake Complete LSM6DS3 Sensor

πŸ—ΊοΈ Live Stations Map Preview

GeoShake Stations Map


πŸš€ What Is This?

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

✨ Features

  • 🎯 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

πŸ› οΈ Hardware

Components Needed

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

Pin Configuration (ESP32-S3)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           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                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Pin Configuration (ESP8266 NodeMCU β€” I2C)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         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, try 0x6A (jumper setting on some breakout boards).

Coordinate System (ENU Standard)

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)

πŸ“‚ Repository Structure

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

⚑ Quick Start

1. Flash the Firmware

  1. Open firmware/ESP32_LSM6DS3_SPI_2XSENSOR/ in Arduino IDE or PlatformIO

  2. Install required libraries:

    • ArduinoJson
    • PubSubClient
  3. 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

  4. Upload to your ESP32-S3

2. WiFi Provisioning

On first boot (or if WiFi fails):

  1. πŸ“‘ Device creates "GeoLink-216" hotspot
  2. πŸ“± Connect your phone to this network
  3. 🌐 Open http://192.168.4.1 in browser
  4. πŸ” Enter your home WiFi credentials
  5. βœ… Device reboots and connects to your network

3. Verify Connection

Watch the serial monitor for:

[OK] WiFi connected!
IP: 192.168.x.x
[OK] MQTT connected to HiveMQ Cloud
[OK] Calibration loaded from EEPROM

πŸ“Š MQTT Topic Structure

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

Telemetry Payload Example

{
  "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
}

πŸ§ͺ How It Works

PGA Detection Logic

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

STA/LTA Wave Discrimination

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

Arias Intensity

Ia = (Ο€ / 2g) Γ— ∫ aΒ²(t) dt

Calculated using a circular buffer of 200 samples with running sum optimization.


🌐 Join the Network

GeoShake stations form a distributed seismic intelligence network. The more nodes, the better the coverage!

Options:

  1. πŸ›’ Buy a ready-made device β€” Plug & play, pre-configured
  2. πŸ”§ 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


πŸ“œ License & Legal Notice

Open-Source Software

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

Hardware & Pre-Built Devices

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.


🀝 Contributing

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

πŸ“ž Support


🌍 Built by makers, for the planet. 🌍

Every node counts. Together, we feel the Earth.

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages