Ian Photo Dr Ian Robinson
Physics Projects 'n Stuff
Home STEM Projects Research Blog Consult Downloads About

Raspberry PI Seismic Monitor Code

Long-term sampling, plotting and storage using a Raspberry Pi - Sept 2020

Overview

This is a fairly straightforward python program which can be left running on an unattended Pi to monitor and plot some signal over an extended period. It has evolved over 3 years and appears stable having run for months without problem on multiple devices.

Code evolved out of Raspberry PI projects to monitor solar wind, solar flares and infrasound. I have noticed others adapting the aurora/infrasound monitoring code for their own projects. In response I have 'generalised' the code, added more comments and here release it in its own right.

The code runs successfully on RPi 3b and 4 and can be left unattended for months or years. A simple separate crontab script may set to periodically (e.g. hourly) upload the plots to a website. Should further analysis be required data-files from the RPi are downloaded for detailed examination with standard seismic software such as ObsPy on a PC. An example of this ObsPy analysis code is also included.

The RPi code is written in python3 and invokes the ObsPy seismic data handling library.

Please feel free to adapt and improve. I would be delighted to hear details of any other projects which use this. Do email me if I can be of any assistance.

Key Features

  • OpenSource.
  • Easily configurable to store data from a variety of sensor inputs.
  • Has run unattended on multiple devices 24/7 for over 3 years with no problems.
  • Produces hourly data-plots for uploading to a webpage.
  • Creates subdirectories for plots and data
  • Data is stored in miniSEED format permitting reading and analysis by standard seismic analysis software such as ObsPy.
  • Hourly timestamps for accuracy.
  • Recovers from power outages.

Available from the Downloads page above.

sample InfraSound Plot
Sample Dayplot from Infrasound Monitor generated by RPi