Raspi-powered seismometer/seismograph


45 posts   Page 2 of 2   1, 2
by pdenton » Mon Jul 09, 2012 12:25 pm
The python based scripts (called miniseis)were written by Jon Gilbert last year as part of his coursework at Edinburgh University. They take data from an SEP digitiser (which just produces a stream of 16 bit numbers 20 times per second onto a serial port). The code was originally written to work with the SHEEVA plug computer (an embedded linux system). The serial data comes into the SHEEVA through a USB-serial convertor. I see no reason why this should not port easily to the RasPi ( do not know whether we would need to use a USB-serial convertor or if the RAspi could read serial data directly on GPIO pins.)

The raw data is stored locally in both raw binary format (as read by Amaseis software) and also as a compressed format called miniseed (as used by seismologists all over the world). The code also broadcasts data live over a TCP connection using the same server-client protocols that AMaseis uses. It can also send data in packets to a remote web server using HTTP push. The software makes use of the Obspy python package for writing miniseed and some other functions

http://www.mutzi.co.uk/docs.tar
http://www.mutzi.co.uk/miniseis.tar
http://obspy.org

also see http://alomax.free.fr/seisgram/SeisGram2K.html for platform independant (java) seismic analysis code which reads seismic data in miniseed format

All code is open source

please feel free to email me directly if you have any queries or just to let me know how you are getting on (pdenton@bgs.ac.uk)

you might also be interested in Graeme Keon's work on using soundcards to record seismic signals
http://motivationtolearn.org/wordpress/ ... #more-1100. He uses a uses a 555 chip to modulate an audio frequency carrier with low frequency seismic signals and then record them on a cheap soundcard.
Posts: 3
Joined: Thu Jul 05, 2012 12:52 pm
by dgoadby » Tue Jul 10, 2012 6:29 pm
All good and gratefully received.

I already have the RPi serial port sorted out but I really want to use the I2C interface for capture if possible to simplify the process as much as possible. One option is to use the RPi with I2C to capture, filter and store the data and then the serial interface to emulate the SEP digitiser and feed it to an Amaseis. I will also be able to create data in miniseed format for compatibility with other systems when I reach the sharing stage.

Some of the code looks like it could be real time-saver. All of my code will also be available as open source and I will submit any changes/derivatives to the source groups as well.

The seismometer hardware is now done and I am just sorting out the low volume airtight lid before starting sensor tests. The electronics will be ready soon afterwards and then the RPi fun starts ;-)

I will contact you directly about items not relevant to this list.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by allenfr » Sun Dec 16, 2012 1:10 am
Progress on this topic at all ?
Posts: 2
Joined: Sun Dec 16, 2012 12:47 am
by dgoadby » Sun Dec 16, 2012 12:34 pm
Oh yes; I'm still tweaking the mechanics and the electronics to try and get a stable platform. I think I'm about there so the RPi interface is now on the bench.

I have a Wifi AP in range of where the seismometer will be permanently sited and a large solar cell designed for charging car batteries which should keep the whole thing running 365/24/7.

I will post an update once I have the RPi side up and running.
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by allenfr » Sun Dec 16, 2012 2:10 pm
Good to know. I would be interested in your mechanical side.
Posts: 2
Joined: Sun Dec 16, 2012 12:47 am
by dgoadby » Mon Dec 17, 2012 1:43 am
It's a version of a fairly standard design called a Shackleford-Gundersen Seismometer. This is a 1975 design but I have updated the electronics and done all of the later improvements. A lot of folks build what is called a "swinging gate" design attributed to Lehman and it works well too but the SG unit has a smaller footprint and I just like the design better.
Once things are starting to "join up" convincingly I will post more along with some photos and, of course, the source code.

David
Posts: 8
Joined: Sat Mar 03, 2012 2:49 pm
by ChucktheTinkerer » Thu May 02, 2013 11:44 pm
Hi Folks:
I hope you have a good experience putting together an earthquake seismometer.
This link,
http://www.jsasoc.com/diamagnetic_suspe ... smomet.htm
describes a VERY SIMPLE novel seismometer, using a pure graphite rod suspended
in a strong magnetic field. It responds to displacement, not velocity.
There are several design issues that need to be solved to make this work properly.
I tinkered with this but lost interest. I hope someone else takes up the project.

BTW I don't think you need lots of dynamic range in your ADC. Just look at (analog) earthquake records from years ago. They managed just fine with line widths of about 1 mm and chart widths of
about 300 mm, which is equivalent to about 8 bit resolution.
In modern times there are lots of interesting cheap ways to do the ADC.

ChucktheTinkerer
Posts: 6
Joined: Thu May 02, 2013 11:28 pm
by meltwater » Thu Feb 27, 2014 12:06 pm
The schools seismograph project at http://www.bgs.ac.uk/ssp looks really promising.

I'm interested to see what electronics could be produced in order to support it and produce a low cost circuit to provide input into the Raspberry Pi (I imagine such a circuit could have multiple uses - ECGs etc). Imagine what could be done with the data using the new wolfram mathematica support.

@pdenton - ( do not know whether we would need to use a USB-serial convertor or if the RAspi could read serial data directly on GPIO pins.)
Yes - You can read serial data directly on the GPIO pins (P1 TX Pin8 and RX Pin10 are serial pins), you just need to disable the serial console first.

Interested to know what solutions would work well with this, would a multi-channel lower resolution ADC work, where each channel is set to sample specific ranges. Also what circuits are suitable for amplifying the original seismograph signal.
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam
User avatar
Posts: 1009
Joined: Tue Oct 18, 2011 11:38 am
by pdenton » Thu Mar 06, 2014 2:10 pm
@meltwater
we are getting there slowly with the raspberry pi seismograph. At the moment we have datalogging/viewing and analysis code running on the Raspi taking data from a USB ADC system produced by http://www.mindsetsonline.co.uk product SEP064 £59.95 The input into this ADC can be a simple homemade seismometer (at the moment I am using a simple mas on a spring design using a 0.5m perspex tube, a mini-slinky with a magnet/weight on the end and a simple coil as the sensor) The system works well as a 1hz seismometer and detects UK earthquakes very well... it can aslo detect large (>M7) events on the other side of the world but only the P waves. Seismometers like this can easily be made at home or made for about £20. We would like to reduce the cost of the ADC system and are working with mindsets to try and halve the cost of their ADC (and make it fit to the GPIO rather than USB) The adafruit 16bit ADC is very nearly good enough but lacks sensitivity for the signals we are measuring.

We will be trialling this kit in some local schools over the next couple of months and hope to be able to promote widely later on this year.

If you know of anyone interested in testing or helping development of this system please put them in touch. (either via this forum or direct to schoolseismology(_at_)bgs.ac.uk
Posts: 3
Joined: Thu Jul 05, 2012 12:52 pm
by BryanKerr » Mon Mar 10, 2014 6:29 am
@pdenton
I'm in the States, but I'd be interested in helping out anyway I can. I've just requested that our school K-12 school purchase one of the TC-1 slinky seismometers. If I don't get it approved, I just might build it myself anyway. I'm just about to start to diving into the Raspi, but I've got an MS in geophysics, and worked on several passive and active imaging survey's when I was in school.
Posts: 1
Joined: Mon Mar 10, 2014 6:13 am
Location: California, USA
by jbeale » Tue Mar 11, 2014 12:31 am
pdenton wrote: The adafruit 16bit ADC is very nearly good enough but lacks sensitivity for the signals we are measuring.

Is it the minimum-signal sensitivity or the dynamic range that is limiting you? If the latter, you need more ADC bits but if the former, op-amps are pretty cheap and can bring up your signal level before the ADC, unless you are already near full-scale with the ambient background signal.
User avatar
Posts: 2475
Joined: Tue Nov 22, 2011 11:51 pm
by ChucktheTinkerer » Sun May 18, 2014 12:52 pm
Hi:

I followed with great interest your account of developing an earthquake seisimograph.
I enjoy making geophysical equipment, especially with the new little computers.

This fellow is recording his seismic signals using an Arduino. The Arduino has the advantage
of 1. built in ADC, 2. Easy to operate without a terminal. He has a good explanation of his signal processing.
https://www.physics.auckland.ac.nz/rese ... 52_1-1.pdf

This fellow built a nice simple seismograph and records on a PC. But you have to deicate the PC to the task.
http://motivationtolearn.org/wordpress/ ... #more-1285
hardware details are at http://motivationtolearn.org/wordpress/?p=530

I think the Arduino is a better choice than the Raspberry Pi.

Chuck Young
Posts: 6
Joined: Thu May 02, 2013 11:28 pm
by meltwater » Sun May 18, 2014 2:37 pm
Possibly an Arduino in combination with a Raspberry Pi would be suitable, with the Raspberry Pi taking over the role of the PC in your example.
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam
User avatar
Posts: 1009
Joined: Tue Oct 18, 2011 11:38 am
by ChucktheTinkerer » Sat Dec 13, 2014 3:22 pm
Hi:

I don't know if you are still working on your earthquake seismometer, but here are a couple URLs I found that
look promising:

Lehman style seismometer and a clever way to do the analog to digital conversion using the sound input to the computer:
http://motivationtolearn.org/wordpress/?p=1285

Seismometer sensor using a weight on a "slinky" spring:
http://scholarworks.boisestate.edu/cgi/ ... eo_facpubs

Chuck
Posts: 6
Joined: Thu May 02, 2013 11:28 pm
by Elven Decker » Sun May 03, 2015 10:04 pm
I have created a small seismograph using a speaker coil and have been storing information on an RPi for a few months now.

Signal comes to the RPi through a BEHRINGER U-PHONO UFO202 USB interface set to receive phonograph data (the Behringer thinks it's processing phonograph data), and is parsed through a SOX command from the following script that runs once every 24 hours:

#!/bin/bash
#get a file name
filename="raw_data/"`date --rfc-3339 date`".wav"
# script to record 24 hours minus a second from the usb sound input
arecord -D hw:1,0 -d 119054 -f S16_LE -t raw | sox -b 16 -e signed-integer -r 11025 -t raw - -r 20 $filename

You can read the .wav files directly in audacity or convert them to text files for analysis.

I haven't been using it for much once I realized that my house was vibrating constantly due to a nearby highway. :)

Hope this can help someone.
Posts: 1
Joined: Sun May 03, 2015 9:45 pm
by meltwater » Mon May 04, 2015 1:04 pm
Excellent projects, certainly would be great to give these a try. Please post more info if you write these projects up.
Thanks.
______________
http://www.themagpi.com/
A Magazine for Raspberry Pi Users
Read Online or Download for Free.

My new book: goo.gl/dmVtsc

Meltwater's Pi Hardware - pihardware.com

Like the MagPi? @TheMagP1 @TheMagPiTeam
User avatar
Posts: 1009
Joined: Tue Oct 18, 2011 11:38 am
by tonystrange » Sun May 31, 2015 4:12 pm
I have been using using the off-the-self solution (mentioned earlier in these posts) of
the Mindset slinky seismometer
the Mindset USB ADC
and jAmaseis (http://www.iris.edu/hq/jamaseis/)

This worked fine with a PC. I wanted to replace the PC as a longer term solution, but I seemed to have difficulties with a Pi 1. However, after some help from BGS (http://www.bgs.ac.uk/schoolseismology) and Redfern electronics, I have managed to see it working apparently successfully on the Pi 2. (a much cheaper and lower powered solution). It was necessary to install jAmaseis
and also librxtx

sudo apt-get install librxtx-java

then
java -Djava.library.path=/usr/lib/jni -cp /usr/share/java/RXTXcomm.jar -jar -Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0 jAmaseis.jar
Posts: 1
Joined: Thu Jul 03, 2014 9:16 pm
by BudBennett » Sun Jun 07, 2015 5:15 pm
I'm ready to begin a seismometer project. I'm trying to keep the cost as low as possible while still yielding a reasonable instrument. My expertise in in electronics but the mechanical stuff is more problematic. So far I have only roughed out a hardware approach -- I'm hoping to use some ready-made piece of code for display/analysis purposes. This is the only post in the forum for seismometers, so I don't think I need a new thread until I get more specific.

Here’s some thoughts on my seismometer project:

General:

A short period seismometer would be easier to manage than a long period. I figure a 1 or 2 second period is acceptable. It might be possible with post-processing to extend the period, but I am not sure about that. I also have no immediate plans to make it into a broadband unit, which would require additional electronics and a motor to keep the mass stationary. The sensor interface that I am planning is generally incompatible with a force-balance approach anyway. I want to keep the cost and complexity of the mechanical system to a minimum -- just to prove the concept of the sensor and it's interface. Later, if things go well, I can splurge on a better mechanical system.

Mechanical.

In keeping with the low cost easy-to-make philosophy, I think that this link (http://www.instructables.com/id/This-Seismometer-is-no-toy/?ALLSTEPS) is an appropriate fist effort. It is a Lacoste pendulum. The post and base are painted wood. the most expensive component is the 1/8” thick aluminum boom and magnets for the damping mechanism.
Lacoste2.jpg
Seismometer plan
Lacoste2.jpg (53.18 KiB) Viewed 650 times

But the sensor magnet would be replaced with the capacitance displacement sensor - probably hanging the middle plate inline with the boom axis (which might cause other problems…) and a lead mass. Dr. Peters patented this sensor in 1995, so it has most probably expired by now. The middle plate must be grounded - this can be accomplished by using the boom as a conductor and just grounding the plate where the hinge is attached. I figure a capacitive displacement sensor will have much better low frequency performance than a magnetic acceleration sensor.

This is Dr. Peters’ Volksmeter link(http://www.rllinstruments.com), where you can find a bit about the theory of his product, including the Synchronous Differential Capacitance sensor. I will be using the AD7745 Capacitance to Digital Converter -- it converts a +/- 4pF range into 24-bits of resolution (ENOB=21bits). It uses the I2C interface of the Pi. The conversion rate can be as high as 10ms, but 62ms is enough to yield a Nyquist rate of 8Hz.

Here's the sensor patent link(http://www.google.com/patents/US5461319). And a link to the AD7745 data sheet (http://www.analog.com/en/products/analog-to-digital-converters/ad-converters/ad7745.html).

I created an spreadsheet that calculates the size of the sensor vs. the required sensitivity. Most of the literature that I’ve read indicates that 1nm displacement resolution is an acceptable goal. I don’t think we can get there with a reasonable size sensor area. My initial calculations show that about 10-20nm displacement is a good first order target.
Spreadsheet.jpg
Capacitor design Spreadsheet
Spreadsheet.jpg (53.71 KiB) Viewed 650 times

I can get 6”x6” single sided FR4/1oz copper boards for about $3 each from Tayda Electronics. The middle sensor requires double sided copper - about $4 for 6”x6” board. I plan to cut the outer plates with an exacto knife and route out the sections of the middle plate. No shielding is planned. If shielding is required a simple faraday cage can be mounted around the five open sides of the sensor unit. This ideal method to create the capacitance sensor is to fabricate them as PCBs, but at $5/sq. inch this becomes very expensive.

Circuit:

The capacitance to digital converter circuit is pretty simple.
schematic2.jpg
Cap2Dig Schematic
schematic2.jpg (52.17 KiB) Viewed 650 times

I will order 2-sided boards from OSH Park - a 0.93”x1.32” board is about $6.14 for 3 copies. Here’s the BOM breakout:

Board - $2
AD7745 - $11.28
LD2981 - $0.66
discretes - $free (I already have all of them in quantity)
2x13 header (stackable) - $0.75
Shipping - $1.18 ($3.54/3)

Total sensor interface cost - $15.87

I am a rank beginner at the seismometer game, so if you see any glaring errors please let me know.

Bud.
Posts: 56
Joined: Fri May 17, 2013 2:45 pm
Location: Westcliffe, Colorado, USA
by danville » Sat Jun 13, 2015 8:46 am
I would also like a copy of any seismic datalogging code for Raspberry Pi. I have given Jamaseis a try on the the Pi 2. However, the lack of ARM support has hindered my progress.
Posts: 1
Joined: Sat Jun 13, 2015 8:41 am
by ChucktheTinkerer » Sat Aug 01, 2015 1:15 am
Progress report for Raspberry Pi seismograph fans:

I just got my ADS1115 ADC from AdaFruit up and running in
a Python program. My prototype program (which needs more work) is detecting
vibrations from a Spregnether 1 Hz geophone on my office floor.
The ADS1115 is available for about $7.59 free shipping from DX Deal Extreme (from China ... slow delivery!)

I recently found an ADC that might be even better and even cheaper.
It is a HX711 and was made to be a strain gauge amp and ADC for digital scales.
I figure you hook up the seismograph as one leg of a resistor bridge.
These have programmable gain of 32, 64 and 128,
sampling rate of 10 or 80 sps, and a 24 bit output. Thus it shouldn't need a preamp.
It looks like you communicate with it with a bash program and it sends the data to your computer as a serial stream.
There is interfacing info at http://hivetool.org/w/index.php?title=I ... X711_to_Pi
Deal Extreme has these for as little as $1.89 (free shipping)!
Mine haven't arrived yet.

BTW someone just sold a Dyneer Sprengnether Instruments Seismometer on EBay for
$75 plus $46 shipping.

Chuck
Posts: 6
Joined: Thu May 02, 2013 11:28 pm