Build a DIY Seismometer: Sensing Ground Motion with a Raspberry Pi and Visualizing Earthquake Data
Raspberry Pi 4 or 5
High-sensitivity accelerometer, ADXL355 or similar low-noise MEMS sensor
Heavy base plate (concrete paver or steel plate) for vibration coupling
MicroSD card, 32GB or larger, for continuous data logging
Enclosure or sealed box to isolate the sensor from air currents
Bubble level for precise mounting
Vibration-damping rubber feet, or sand/foam isolation base
USB power supply for the Raspberry Pi
Prices and availability as of Nov 22, 7:41 AM ET and subject to change. The price shown on Amazon at the time of purchase applies.
A seismometer measures ground motion — ideally motion far too small to feel, on the order of micrometers — and plots it over time as a seismogram. Professional seismic networks run very expensive, exquisitely isolated instruments buried in boreholes, but the basic physics is approachable at the hobbyist level: a sufficiently sensitive accelerometer, bolted to a sufficiently massive, well-coupled base, and logged continuously, can pick up everything from a truck passing outside to genuine regional and (for larger events) global earthquakes.
This build uses a Raspberry Pi and a low-noise MEMS accelerometer to build a basic vertical/horizontal motion sensor, continuously logging to a time-series pipeline you can graph, alert on, and compare against the public seismic record from agencies like the USGS. It's a genuine citizen-science instrument, not a toy — projects like the Raspberry Shake community have built an entire open seismology network on essentially this same approach, and a careful build on this scale can and does detect real earthquakes.
What You're Actually Measuring
Seismic waves arrive in a few recognizable types, and understanding them helps you interpret what you're seeing on a plot rather than just staring at a noisy line:
| Wave type | Characteristic |
|---|---|
| P-waves (primary) | Fastest, arrive first, compressional motion along the direction of travel — usually the first sharp blip on a distant earthquake's record |
| S-waves (secondary) | Slower than P-waves, shear motion perpendicular to travel direction, generally larger amplitude on the record |
| Surface waves | Slowest, largest amplitude, travel along the Earth's surface rather than through the interior — this is usually the big, obvious wobble on a strong regional event |
The time delay between the P-wave and S-wave arrival at your station is actually useful data on its own — it's the basis of how real seismic networks estimate distance to an earthquake's epicenter, and you can do the same rough calculation with your own recorded arrival times.
Sensor Selection and Mounting
The single biggest factor in how useful this instrument is comes down to two things: sensor noise floor and how well the sensor is mechanically coupled to the ground. A low-noise digital MEMS accelerometer like the ADXL355 is specifically designed for this kind of application — it has a noise density low enough to resolve genuinely small ground accelerations, well below what a typical hobby-grade accelerometer (the kind sold for drone flight controllers) can pick out from its own internal noise.
- Bolt the sensor directly to a heavy base — a concrete paving stone or a thick steel plate — rather than mounting it on a lightweight bracket; the base needs enough mass that it moves with the ground rather than vibrating independently of it.
- Locate the whole assembly on a ground-floor slab or a basement floor if at all possible; upper floors of a building amplify and filter the ground motion through the building's own structural resonances, which muddies the signal you actually want.
- Level the base carefully with a bubble level — accelerometer axes need to align predictably with vertical and horizontal for the data to be interpretable, and a tilted sensor bleeds gravity's static 1g reading across axes in a way that complicates analysis.
- Shield the sensor from air currents and temperature swings with a simple enclosed box; thermal drift and air current buffeting on an exposed PCB both show up as low-frequency noise that can mask or mimic real signal.
Wiring and Data Acquisition
The ADXL355 communicates over SPI or I2C, both of which the Raspberry Pi's GPIO header supports directly — wire the sensor's data lines to the Pi's SPI bus for the higher sample rate SPI mode supports, since seismic analysis benefits from a reasonably high sample rate (the ADXL355 supports output data rates up into the hundreds of Hz, well above what's needed for teleseismic events but useful headroom for local, higher-frequency signals).
- Wire the accelerometer breakout to the Pi's SPI pins (MOSI, MISO, SCLK, CS) plus power and ground, double-checking the board's logic level is compatible with the Pi's 3.3V GPIO before connecting.
- Install a Python SPI library and write (or adapt an existing open-source) polling loop that reads all three axes at a fixed sample rate and timestamps each reading.
- Write incoming samples to a local time-series store — InfluxDB running on the same Pi is a natural fit here, mirroring the pattern used in other Pi-based environmental logging projects, since it's built for exactly this kind of continuous, timestamped sensor stream.
- Build a Grafana dashboard against that InfluxDB instance to plot the live waveform, which gives you a continuously scrolling seismogram view essentially for free once the data's flowing.
Filtering Out Noise
Raw accelerometer data is dominated by noise sources that have nothing to do with earthquakes: building HVAC vibration, foot traffic, passing vehicles, and the sensor's own electrical noise floor. A basic signal processing pass makes the data vastly more usable:
| Noise source | Typical frequency range | Mitigation |
|---|---|---|
| HVAC and appliance vibration | Tens of Hz and up | Low-pass filter in software, cutting off well above the frequency range of interest for regional/teleseismic events |
| Foot traffic / local walking | 1-3 Hz, sharp transient spikes | Mount the sensor somewhere with less direct foot traffic if possible; otherwise flag and visually exclude obvious transient spikes from long-term analysis |
| Long-term thermal drift | Very low frequency, minutes to hours | High-pass filter or baseline subtraction over a rolling window |
Comparing Against the Real Record
Once logging is running continuously, cross-reference your local seismogram against the USGS earthquake catalog for events that occurred during your logging window — a moderate-to-large regional earthquake, or a major teleseismic event from anywhere on the globe, should show up as a distinct, out-of-the-ordinary signature against your background noise floor, especially once you've filtered out the routine local vibration sources. Matching a bump on your own homemade instrument's graph to a real, published earthquake event is the payoff moment for this whole build.
From here, the most valuable upgrade path is adding a second sensor axis orientation or a second station entirely — triangulating rough direction and distance to an event gets dramatically more reliable with more than one data point, which is exactly why real seismic networks run dozens to hundreds of stations rather than relying on any single instrument.