Seismometer Project

A friend asked me if I had a seismometer. Nope. But I might be able to build one…

One approach would be to build a more traditional weight-and-spring kind of thing, but I thought I could do it more easily with a MEMS accelerometer. I had one laying around, so I decided to try it out.

I hooked up an LSM303DLH 6DOF accelerometer/magnetometer to an ESP-01 running an ESP8266 processor.

There are a few points of interest / investigation in this project:

  • What is the frequency response of this kind of accelerometer?
  • What are the frequencies of interest to this friend?
  • What sampling rates are possible for this device?
  • How to filter / smooth the raw data
  • Is calibration required?
  • How to present the data?

In this post, I’m just going to address one possibility for the last item. I will eventually log the data with timestamps into a file on a removable drive, but right now I want to see the data.

Cutting to the chase, here’s what it looks like. Click on it to see the chart move. (Whee!)

The web page is restricted to my home network, but you are welcome to the code.

Here’s a snapshot of the main Arduino program. The functions updateWebPage_root, updateWebSocket, and updateWebSocketArray are the ones you want to look at.