Raspi-powered seismometer/seismograph


38 posts   Page 1 of 2   1, 2
by pishboy » Tue Mar 06, 2012 3:08 pm
I have been thinking of creating a seismograph for some time now, but studies blocked my way and the project was put on hold.

Now that it's almost summer, i'm thinking of making it as a summer project and bringing it back to life.

I'm thinking of creating a Lehman seismograph and having a magnet on the beam brush past a coil (similar to this setup: http://www.vaxman.de/projects/.....meter.html ) and because i'm planning to have a raspi NFS server online 24/7, i could probably use an interface of some sort and have it log the data.

Being in the Philippines, which is situated in the Pacific ring of fire, i'm expecting alot of seismic activity. I have everything planned out in my mind, the only problem i have is the interface from the coil to the raspi

I was thinking of having it connected to a USB sound card microphone jack then record it 24/7 with an audio recorder (i've been looking hours on the net to find a soundcard-based seismometer data logger to no avail) and view the waveform later on. But because it's the Raspberry Pi, i can probably use a gertboard then have a seismograph recorder of some sort record the signal (again WHERE IS THE PROGRAM D: )

The interface part is a tough nut to crack, so i will need some help with it.

Thanks in advance :D
Posts: 19
Joined: Sun Jan 01, 2012 7:11 am
by Gert van Loo » Tue Mar 06, 2012 7:16 pm
What kind of precision are you looking for?

The Gertboard has a two-channel analog to digital converter but the board was mainly designed for educational purposes so I did not put a very high precision AD converter on it. So it is only 10bits and only ~100Ksamples/sec.
User avatar
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2099
Joined: Tue Aug 02, 2011 7:27 am
by pishboy » Wed Mar 07, 2012 9:13 am
so far as my researched data goes, I don't really need 100k samples/s because a seismic wave detected by this wouldn't really reach more than 100Hz.  The 10 bits might be a little problematic though, but i think i can get over it. are there any pin-compatible ADC chips out there that are a bit more sensitive? like, 16 bits?
Posts: 19
Joined: Sun Jan 01, 2012 7:11 am
by bjs » Thu Mar 08, 2012 11:04 am
Your problem is one of the dynamic range of your electronics. This is common to a lot of scientific instruments like gas chromatographs and mass spectrometers. The usual trick is to use a programmable gain amplifier to match the ADC to the signal size. That way you make best use of the resolution of your ADC and can record large seismic events in the presence of a quiet background. 16bit ADCs get seriously expensive so its worth doing a google around since there must be loads of GS and Mass Spec circuits around on the net.
Posts: 26
Joined: Thu Mar 08, 2012 10:51 am
by winwaed » Thu Mar 08, 2012 2:21 pm
I come from a geological / geophysical background, as well as a member of GeolSoc (so put "FGS" after my name! lol);  so this is the first RasPi educational project I've seen that I could really get behind.

As with most people here I dabbled with electronics as a kid but I'm probably not up to speed on the latest A/D etc, however the GertBoard does seem like a beginning.

Sample speeds: Yes passive seismometers typically have resonant frequencies measured in seconds (ranging from tenths up to perhaps a minute or two - but even longer periods are now available). When I was working in the (active) seismic exploration business the standard sample rate for processing was 4ms - but active seismology is much higher frequency (shorter distance and higher freq => better image resolution). For passive seismology (earthquakes) the higher frequencies are quickly attenuated.

You're in a better place for this kind of thing - lots of activity (and also lots of vertical component waves!) and you probably have bed rock that you can anchor to. I'm in the middle of the Dallas Fort Worth metro area (Texas,US) with no real bed rock, lots of urban noise and under the flight path for a major international airport. We do get intraplate earthquakes but they're not as common as what you'll get. We were also in the middle of one of the first frack provinces (=>anthropogenic earthquakes) but activity has since subsided as natural gases prices collapsed and the 'easy' stuff was drilled.

Low pass filters will help remove a lot of the noise, but I would have my work cut out for me. If I was to build something, I would also probably want to try and build a three-component seismometer. However, a single vertical component (as you're describing) would probably be ideal for a school project. Keep it simple,etc.
Posts: 16
Joined: Wed Mar 07, 2012 9:13 pm
by pishboy » Fri Mar 09, 2012 7:29 am
winwaed said:


If I was to build something, I would also probably want to try and build a three-component seismometer. However, a single vertical component (as you're describing) would probably be ideal for a school project. Keep it simple,etc.



I'm actually planning to make a horizontal one :P

I'm currently building the unit from some wood scraps i had lying around, an aluminum rod and a concrete weight i made a few years back when i was experimenting with concrete. i'm planning to have a period of 8 seconds or less, and will (as of now) record the data on a spool of paper rotated with an outlet timer. The timer originally ran at 50Hz but we get 60Hz here so it should run a bit faster.

winwaed said:


Sample speeds: Yes passive seismometers typically have resonant frequencies measured in seconds (ranging from tenths up to perhaps a minute or two – but even longer periods are now available).



LOL, thats why i had alot of noise when i was testing a coil, i filtered the audio with a lowpass filter down to 5Hz only. :P

I'll try with a filter of .3Hz
Posts: 19
Joined: Sun Jan 01, 2012 7:11 am
by pishboy » Wed Mar 21, 2012 2:48 pm
OK, so i'm having some calibration issues with my big lehman seismometer. Also, i think it would be hard to interface it and give me usable data :/

I'm thinking, is it possible to hook up an accelerometer to the GPIO? I mean, I don't need 3 space-consuming units to check for the X, Y and Z axes, i can just have a tiny 5mm chip. + side for me as i might move into a condominium soon.

Is it feasible? Also, what accelerometer do you recommend?

EDIT: I found some accelerometers i can sample for checking them out. There's one thing i don't get: How do you read stuff off the GPIO? I mean, for example i want to write a script (or program. Whatever, i'm not used to programming in linux) that can grab data from the I^2C or SPI pins, format the data then save it in a .txt file for later graphing on my desktop. Or better yet, emulate a serial port using those pins?
Posts: 19
Joined: Sun Jan 01, 2012 7:11 am
by Andre_P » Thu Mar 22, 2012 7:26 am
pishboy : Seeing as you are in a seismically active zone how are you going to calibrate your project ? From my completely ignorant point of view that would be an interesting problem in itself :) .

Good luck, this is the second scientific instrumentation project I've heard of and you will be following in a long and honourable tradition :) .
Posts: 241
Joined: Sun Aug 28, 2011 7:57 am
by pishboy » Thu Mar 22, 2012 7:44 am
i'll wait until an earthquake rolls by :D
That waiting period can be anywhere from 1 month up to a few years
Posts: 19
Joined: Sun Jan 01, 2012 7:11 am
by Chris.Rowland » Thu Mar 22, 2012 8:55 am
There are small three axis accelerometers that can connect using the I2C bus that's available on the GPIO port. There will be a library to communicate with it because this will be a popular way to connect sensors.

But will the sensitivity of a small accelerometer be good enough? It will obviously detect major earthquakes but smaller ones?
Posts: 239
Joined: Thu Jan 12, 2012 5:45 pm
by jamesh » Thu Mar 22, 2012 12:23 pm
Andre_P said:


pishboy : Seeing as you are in a seismically active zone how are you going to calibrate your project ? From my completely ignorant point of view that would be an interesting problem in itself :) .

Good luck, this is the second scientific instrumentation project I've heard of and you will be following in a long and honourable tradition :) .


Just put it on a jiggle table thingy. We have one here for testing cameras, can run from 0.1Hz to 10Hz I think at variable amplitude, in two axis (pitch and yaw). Mind you, it did cost 20kEuro. Bit of a rip off I reckon.
Volunteer at the Raspberry Pi Foundation, helper at Picademy September and October 2014.
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 12149
Joined: Sat Jul 30, 2011 7:41 pm
by en4rab » Mon Mar 26, 2012 10:17 am
I know it isnt very DIY buy you might want to take a look at the quake catcher network at stanford http://qcn.stanford.edu/ their sensor costs $49 *However!* from what i have seen it isnt currently supported under linux, a quick search suggests it appears as a serial tty device and linux has drivers for it and it seems the coms protocol is simple enough:

http://qcn.stanford.edu/sensor.....php?id=730 see this thread.

It might be worth looking at though as if the drivers for the onavi device get updated and boinc will run on the raspberrypi you could maybe have not just you own seismometer but also be feeding that data back to the quake catcher network.
Posts: 2
Joined: Mon Sep 12, 2011 11:09 am
by jbeale » Thu Apr 12, 2012 4:28 am
A while ago, for fun I made a horizontal seismograph (swinging-door type)  out of wood, a copper coil, and magnets from a hard drive. The period was a few seconds. Problem is I live in an urban area and almost all the signal was from traffic outside, A/C in the building, etc.

On the subject of A/D converters, you can get 18 bit A/D converters fairly cheaply, for example the MAX11209  is about $6. Main problem for a hobbyist is it comes in a tiny QSOP package; hard to hand solder (although I did it!- using a QSOP-DIP adaptor). It has configurable gain, and can do 120 samples per second (actually up to 480 sps, but in that mode each sample is not truly independent). I put some test data from that ADC here: http://dangerousprototypes.com.....038;t=3818

There are cheap high-resolution audio A/D devices, but few or none of those have DC response, which you probably want. Unless you are getting fancy and modulating your signal, and then using a lock-in detector approach.  That's feasible, but complicated.
User avatar
Posts: 2099
Joined: Tue Nov 22, 2011 11:51 pm
by El Berto » Thu Apr 12, 2012 7:25 am
Hi, I don't know what do you expect from your "home made" seismometer, but I work in a Seismological Research Center (I work on maintenance).

You could make your seismometer... just for fun: I know in your area there are strong hearthquakes, but you can only detect hearthquakes through "broad-band" seismometers (really hard to build), we use ADC starting from 20 bits ap to 24 bits.

So, the only one thing you can do (I still talk as "professional" point of view) is to use accelerometers. I've seen on the web a lot of projects of low-cost accelerometers for seimic use, made through MEMS accelerometers (like LIS3LV02DQ from ST). If you prefear there are also the analog-output version you can read with ADC.

Then, you also need a software to "detect" seismic wave from "others" waves.

Keep in mind, if you'll build a "serious" seismometer, it will be very sensible to external "noises", like steps, cars, and so on.

We are studying a seismometer based on the vibrations of a liquid, probably you'll find some interesting documentation around the web of something similar.

I hope to have been useful (sorry, I don't speak english so well).
Posts: 9
Joined: Thu Apr 12, 2012 6:04 am
by piface » Tue May 15, 2012 10:32 am
by pishboy » Wed Mar 07, 2012 10:13 am
so far as my researched data goes, I don't really need 100k samples/s because a seismic wave detected by this wouldn't really reach more than 100Hz. The 10 bits might be a little problematic though, but i think i can get over it. are there any pin-compatible ADC chips out there that are a bit more sensitive? like, 16 bits?


Don't imagine you can just plug in 16 bit accuracy. To achieve that (which is probably a minimum for you project, 10 bit is not even worth looking at) you will need to make all of your analogue circuitry that accurate. Look at component accuracy, thermal drift, environmental electronic noise ...

What you are looking at is serious instrumentation quality electronics.

I get the impression you don't appreciate what you're getting into. So I suggest you look into those issues if you don't understand them.

Learning could be fun but do your homework before wasting a lot of time making something that will not do the job.

Hope that helps.
Posts: 4
Joined: Tue Mar 27, 2012 3:03 pm
by dgoadby » Sat Jun 09, 2012 3:52 pm
I am building a Shackleford-Gunderson Seismometer. I am also proposing to use a RPi to do the data capture and storage with a small HTTP server providing a web-page with recent plots.

The route I chose was not to do audio capture but use the I2C interface to an A->D converter IC. I haven't selected the actual device yet but there are a number to chose from. A likely candidate is the MCP3423 which has 18 bits with 2 channels but there are others. If you don't like soldering SM chips then there a quite a few I2C A->D modules available for not too much money. If you are happy to go down to 12 bits then there are some DIP packaged IC's you can use more easily on strip-board.

Although I will get a lot of noise using 18 bits, I am going to carry out software filtering and it is easier to drop bits than gain them. ;-)

The seismometer and electronics are nearly done, I have some I2C / A->D IC's and I now have some RPi's to work with so I will probably be building the interface any day now.

I will keep an eye on this thread to see what others discover.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by jbeale » Sat Jun 09, 2012 4:12 pm
dgoadby wrote: A likely candidate is the MCP3423 which has 18 bits with 2 channels but there are others.


According to the specs
http://www.microchip.com/wwwproducts/De ... e=en538233
that chip in 18-bit mode only does 3.75 samples per second (and half that if you want two channels), is that enough?
User avatar
Posts: 2099
Joined: Tue Nov 22, 2011 11:51 pm
by dgoadby » Mon Jun 11, 2012 2:48 pm
You are right, but, since I live near the sea I am also interested in the changes in the earth tilt due to the tides. To do this I will be monitoring very slow moving data. I also have one to hand as it happens. ;-)

The general consensus seems to indicate that we are only interested in frequencies below 10Hz; in fact my design has a 6 pole filter with a 10Hz cut-off. A popular electronic design by Infiltec for Lehman seismometers uses sampling at 34 SPS with 16 bit resolution; I'm using that as my initial baseline requirement.

My current A->D chip of choice is the Texas ADS1114. Although it is an MSOP package it has 16 bit resolution, I2C and is cheap. It also has built-in variable gain. (PGA) which might help with scaling later on.

Although SMD devices are a bit of a pain when prototyping, Farnell have an MSOP adaptor PCB available to make things a little easier when using Veroboard.

Of course, I2C is not available in the stock RPi software yet so I am currently following the I2C activities on bootc.n. I have been getting some success with their updated kernel using simple I/O devices. I will be happier once the official RPi release has I2C included but at least I can now test the A->D's later this week. If folks are interested I will post my findings here.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by wallabybob » Wed Jun 13, 2012 2:05 am
dgoadby wrote:If folks are interested I will post my findings here.

Yes please.
Posts: 17
Joined: Thu Aug 18, 2011 2:08 am
by superpat999 » Fri Jun 15, 2012 2:40 pm
Why don't you let Google be your friend!

1. http://www.circuitlake.com/long-period-seismometer.html

more details at

2. http://www.infiltec.com/seismo/inf-qm10.htm

Although this gentleman sells modules and kits, he does also publish the circuit schematics for his design, they are on the site but a bit hard to find.

This is for a PIC controller, but I am sure you can use your pi instead, if you really need to!

cheers

Patrick
Posts: 14
Joined: Fri May 25, 2012 12:46 pm
by dgoadby » Fri Jun 15, 2012 6:02 pm
Thanks for the information. I am aware of the Infiltec design but there is no software source so it's going to cost at least $210 + import duties which is a lot more than my parts to-date. However, I do like the use of the MAX7401 filter and may use it as it will save on parts and it is easy to change the corner frequency.

The main reason for not considering the Infiltec unit is my seismometer uses a capacitive detector which is not compatible with the Infiltec coil/magnet design.

The mechanical hardware is at the point where I can test the basic displacement circuits. This means I am not too far from needing to sort out the I2C A->D converter. :roll:
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by macsmith » Wed Jun 20, 2012 4:05 pm
Hi,

just spotted this thread. You should have a look at the Public Seismic Network site, http://psn.quake.net/ which is dedicated to home brew seismometers. It's been going for decades and even has Dr Lehman posting from time to time. There's a wealth of information there on all aspects.

For local quakes you need to capture signals up to 10 Hz.
For tidal effects (microseisms), they are usually around 0.17 Hz
For international quakes (teleseismic), they're between 1 to 0.01 Hz, generally, for us amateurs.

For plotting, have a look at PGPLOT, though there may be something easier these days.

I use a mixture of soft and hardware filtering. For software filtering, you need to oversample by several factors (so you'll need a faster A/D) and I'm not sure if the raspberry pi is up to it. Perhaps best to let it do the acquisition and network the data to a 386 machine for the rest.

I've got a 16 bit national instruments pci a/d in a 386 machine. For each "sample" I sample at 3 different gains and select the one with the highest gain that hasn't saturated. This is a cheat to get it up to around 21 bits of resolution.

I post the results to http://www.iasmith.com/ Currently the sensor driving the lower graph is broken (a 4 Hz geophone) and I think a spider has gotten into my Lehman enclosure (top graph).

Enjoy!
Posts: 12
Joined: Fri Dec 30, 2011 5:12 pm
by dgoadby » Thu Jun 21, 2012 1:02 am
Hi,

Thanks for your input. I do have the materials for a Lehman but decided on the Shackleford-Gunderson design as it's smaller footprint suited my initial location. As I am in an area the does gets quakes (Gwynedd North Wales) the higher frequency response is something I will have to cater for.

Once I have a stable system I will try something like you are using with different gains. Apart from basic filtering I want the PC's to do the rest of the work where possible.

The main use for the RPi is the data collection and buffered raw storage and I think it should be up to it. Another Linux system will be doing the bulk storage, analysis and plotting. I want run the seismometer and the RPi off a battery/PV panel power supply and wifi link it to my network. This will allow me to locate it in the corner of my field where the only other noises might be the odd sheep...

Thanks for the info on the Public Seismic Network I will join them once I have something to offer.

I am just manufacturing the sensor plates and plan to do some basic testing with a 14 bit USB datalogger that I have to hand before completing the capture system. I'm looking forward to my first event capture sometime next month.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by pdenton » Thu Jul 05, 2012 1:08 pm
its great to see people interested in homebuilt seismometers. You might like to check out some of the resources that we have made available at http://www.bgs.ac.uk/ssp this is an education outreach project aimed at helping schools set up their own seismic monitoring station (although there are a few amateur enthusiasts involved as well). On the website you can also exchange data that you have recorded with other users in the UK/Ireland/USA and europe Most schools have been using the SEP seismomeetr system http://www.mindsetsonline.co.uk/product ... ts_id=9047 although we are trying to encourage schools to make their own. You can also by the SEP digitser box on its own (x100-x500 gain 16bitADC 20sps rs232 output £109 ) which would interface well with your homemade seismometer. we use the free amaseis software for data logging (windows only) although apltaform independent java replacement for this is due for Beta release this summer.

Since hearing about the raspberry pi system I have thought that it would make an ideal platform for a seismic datalogger (there is no point running a desktop PC 24/7 just to record data ). We already have some python based code which will take data from a local port and either record it locally or stream via ethernet to another computer (or via http push to an external website) . If you would be interested in getting this system running on a RPI I can send you a copy (it is GNU open source) . You might also be interested in the obspy project for seismic software http://obspy.org/

Paul Denton
Posts: 3
Joined: Thu Jul 05, 2012 12:52 pm
by dgoadby » Fri Jul 06, 2012 3:23 pm
Good to hear from you Paul; thanks for the information. I will see what the local schools are doing too and maybe offer some input to them as we are in a 'quake zone.

To your code offer then yes please. I use Python a lot in my day job so I was hoping to keep to a language I have the tools for. I will have a look at the data collection module as it will save some work and we do have a serial port after all.

As I have the parts I will still make an I2C interface as, if it works, it will be a cheaper option for RPi owners. I was looking at post-capture processing in Python/C as well with the RPi serving a web page for a complete system. If the I2C unit works well enough then I am considering making a pre-built I2C interface available.

A platform neutral version of amaseis is something that will go down well so I will keep an eye on this too.

All in all I'm having a lot of fun with this project.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm