Raspberry Pi seismometer

About the author

Clovis Parker-Jervis

These programs and instructions were written by Clovis Parker-Jervis as part of a physics project at Oundle School.

Working as part of a team that was tasked with building a simple seismometer, Clovis was responsible for programming the data logging software.

Supervised by Paul Denton, BGS School Seismology project leader, Clovis researched various data structures and techniques that could be used to program a Raspberry Pi-based seismometer using Python.

These programs were initially published to a blog. During his summer vacation of 2015, Clovis spent two weeks at the BGS on work experience doing further work in Python and writing an additional data logging program using Scratch. The Scratch seismometer program used a magnet and accelerometer as a sensor. This was also written up and included within the pages in this section.

The work that Clovis has done on this project has made a positive influence on his choice of degree courses and formed a key part of his UCAS personal statement.

Follow these steps to program a Raspberry Pi in Python to collect and log data from a simple seismometer via an analogue to digital converter (ADC). You will need some experience in Python programming.

Analogue to digital converter (ADC)1) Setting up: printing ADC readings

These programs use an analogue to digital converter (ADC) from Adafruit (the ADS1015) or use our guide for other ADCs.

ObsPy logo2) Saving data with ObsPy & MiniSeed

Saving the data, that our loop was producing, into a file using MiniSeed.

Queue and thread graphic3) Queue and thread

Saving the samples into a queue is a more efficient method for reading. Threading is essential for our queue as it allows multitasking.

Jitter graph4) Jitter and sampling rate

The next step to advance our program is to include another measurement, the jitter. This is a useful measurement as it records how well our program and ADC is functioning.

Filing cabinet
5) Concatenating traces

Combining the traces into files containing a day's worth of blocks, we can quickly find a specific time within our folder, without saving too many files.

Apache feather6) Apache & Ring Server

When you have the MiniSeed files on the SD card, this step makes accessing them easier. Using two different servers to show the data: SeedLink and Ring Server. The other is a simple http file server; using Apache.

Alternative hardware, programming and installations

SEP seismometer analogue to digital converter (ADC)Other analogue-to-digital converters (ADCs)

Instructions on how to use an alternative ADC.

Scratch seismometerScratch seismometer

This shows you how to program a seismometer using scratch with a simple Python script using a Raspberry Pi and a PC.

jAmaSeis logojAmaSeis installation

If you don't want to program in Python, this page shows how to install jAmaSeis on a Raspberry Pi to log data read from a seismometer.