BudBennett
Posts: 83
Joined: Fri May 17, 2013 2:45 pm
Location: Westcliffe, Colorado, USA

Re: Raspi-powered seismometer/seismograph

Fri Sep 18, 2015 3:04 pm

Also I think that I can reduce the number of magnets by a factor of 2 by locating the damping plate further out on the beam. I believe that the original design needed to keep the damping magnet some distance from the sensing coil to avoid interaction. Since this design is not sensitive to magnetic fields the damping magnet can be located closer to the mass and have more effect.

I'll probably do that if I make another one.

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspi-powered seismometer/seismograph

Tue Sep 22, 2015 12:12 am

If you have two or more devices located some distance apart, and the samples are accurately aligned, you can tell what is a local disturbance and what is not. At this low sample rate, the RPi's own clock ought to be enough. If it is network-connected so NTPD is running, I think the OS clock time is usually accurate within 10 msec.

avrel
Posts: 1
Joined: Mon Feb 01, 2016 9:36 am

Re: Raspi-powered seismometer/seismograph

Mon Feb 01, 2016 10:35 am

tonystrange wrote: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
Thank you for your poste Tonystrange.

I am trying to install jamaseis on raspbian.
Could you indicate the link where you found the jamaseis.rar file you refer to in your code line please ?
the IRIS link where we can get source code seems not to be working now
(http://www.isti2.com/jamaseis/install1022/install.htm)
If you know an alternative link to access the code that would interest me.

thank you

Thank you

BudBennett
Posts: 83
Joined: Fri May 17, 2013 2:45 pm
Location: Westcliffe, Colorado, USA

Re: Raspi-powered seismometer/seismograph

Sun Feb 12, 2017 5:44 pm

Now that my seismometer is essentially finished and working flawlessly in a corner of the garage, I have begun another seismometer project with a friend who has been working on a Lehman seismometer since the early 1980’s. It’s still not quite working yet, so I’ve been pushing him to finish it. Initially he was going to just print the output of his 1980 electronics (which has not proceeded past the paper design point) to a drum plot (a real one that uses paper…OMG!) but I believe that he is now tending toward a more software driven approach to recording the data. Computers are not his thang.

It was ChucktheTinkerer’s post about the HX711 that got me started thinking about a very cheap 24-bit ADC interface for an amateur seismometer with velocity sensor. The HX711 has all of the necessary components to process the output of a velocity sensor: 24-bit resolution with sample rates of either 80Hz or 10Hz, a programmable gain pre-amplifier with gain values of 32, 64 and 128, and a fully differential bridge-type interface. I ordered a pre-built module from eBay for about $1. After a few hours of “tinkering” with it I realized it’s potential as a seismometer interface, but I had to toss out the eBay module to unleash it.

The HX711 datasheet shows an application using its internal/external regulator to provide a quiet analog supply for the ADC. They also say that if the on-chip regulator option is not used, the two supply pins can be connected to a separate regulated supply. This is a better option for use with the Pi because the Pi GPIO interfaces operate at 3.3V and the HX711 supply range is specified over 2.6V - 5.5V.

I also found that the HX711 internal clock generator was more than 20% low on the eBay board. This may be why it only costs a buck. This is not really acceptable for a seismometer — the seedlink server software is a bit sensitive to variable sampling rates. But the HX711 provides for a crystal controlled clock (not an option on the eBay board, which is hard-wired at the slow sample rate.)

The HX711 ADC requires its inputs to both be within a certain common mode range but the eBay board did not provide any circuitry to accomplish that.

Lastly, the HX711 has a weird serial communication protocol that requires a bit-bang on two GPIO pins. The HX711 is designed to go into a low-power sleep mode if the PD_SCK input goes high for more than 50us. This is a difficult requirement for the Raspberry Pi because of the Linux housekeeping. There is a HX711 interface using PIGPIO, which supposedly fixes this issue but I did not have much luck with that (more later). Since a seismometer requires 24/7 operation the sleep function is not required or desired. I just implemented a 1us one-shot to control the PD_SCK input which prevents the HX711 from sleeping and solved a lot of the interface issues. Sometimes software can’t fix everything…

So here’s the final schematic for a seismometer velocity sensor:
HX711-PI3_small2.jpg
Schematic
HX711-PI3_small2.jpg (50.28 KiB) Viewed 1311 times
I trolled eBay for bare HX711 parts and found them (5pcs for $3.50) here: http://www.ebay.com/itm/141975978434?_t ... EBIDX%3AIT

The HX711 is a pretty light load to a regulator so I used a XC6206 3.3V LDO in a SOT23 package that cost $0.06 each: http://www.ebay.com/itm/252006358372?_t ... EBIDX%3AIT

The one-shot is the most expensive component. I used the very cute LTC6993-1, which only needs a single resistor to program a 1us pulse. Its outrageously priced at $3.35 at Digikey, but LTC sent 2 samples to me gratis. (I guess it pays to be an alumni — full disclosure.)

The PCB is custom from OSH Park — $5.50 for three prototypes. Total BOM/board comes to about $7 after sprinkling a nine 0603 resistors and ten 0805 capacitors, $0.50 for a 26-pin female header, and $0.10 for a crystal from Tayda Electronics. Everything is surface mounted except the header and the crystal.

Here’s what the board looks like mounted to a RPi2:
rev3PCB.jpg
Board mounted on RPi2
rev3PCB.jpg (49.49 KiB) Viewed 1311 times
The the RPi can set the sample rate to Fcrystal/138240 or Fcrystal/1105920, which yields 80Hz or 10Hz when using a 11.0592MHz crystal. I found the 80Hz rate a bit too fast for a seismometer application: it generates a large amount of data storage per day and the RPi has problems keeping up. So I am using a 4MHz crystal to get a sample rate of about 29Hz with the RATE pin set high. I tried to get Joan’s PIGPIO HX711 interface code to work using her python module, but it kept quitting after a few seconds or minutes of operation. I suspect that eventually the kernel would clobber the code and it stops for some reason. Since the one-shot frees the code from having to keep the PD_SCK high time less than 50us I can limp along with the generic GPIO interface. Every once in a while the data is clobbered by the kernel, but I have a pulse swallower that detects this condition and just sticks the previous “good” data into the current sample and proceeds merrily along. I can get away with this because the system is oversampled by 10x.

The seedlink server is setup the same way as described in a previous post in this thread, and Obspy is used for waveform processing. Here’s what the raw data looks like for a 30 minute segment with the gain set to 128 (I hit the limit on uploads so the filtered data can't be attached :? ):
data20170212.jpg
raw data
data20170212.jpg (42.36 KiB) Viewed 1311 times
The applied signal above is a 4uV p-p square wave with a 10 minute period with a 10k resistor across the ADC inputs. The software can easily measure mean and standard deviation, so I estimate that the input referred noise is about 500nV p-p. That is on par with other amateur ADC systems designed for velocity sensors.

So thanks ChucktheTinkerer…your suggestion to use the HX711 was a good one. Now I just have to overcome 40 years of slow progress on my friend’s Lehman seismometer to get in all installed and working. I’ll let you know if/when that happens.

Bud.

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspi-powered seismometer/seismograph

Mon Feb 13, 2017 9:31 pm

Might be interesting to compare this with the recent state of the art in RPi-controlled seismometers, for example http://www.raspberryshake.org/

Code: Select all

Raspberry Shake is novel seismograph that can:

 Record earthquakes magnitude 2 and up within a radius of 50 miles. 
 Record earthquakes magnitude 4 and up in a radius of 250 miles. 
 Record earthquakes of larger magnitudes farther away but it will miss some of the subtleties and some of the lower frequencies.
 Share data with seismic observatories world wide in standard format.
 Show all activity for the last week.
 Send alarms and warnings to your cell phone.
 See and plot the data from any other Raspberry shake.

BudBennett
Posts: 83
Joined: Fri May 17, 2013 2:45 pm
Location: Westcliffe, Colorado, USA

Re: Raspi-powered seismometer/seismograph

Tue Feb 14, 2017 6:41 pm

State of the art...really?

This is from their press release: " Raspberry Shake can detect and record short period (0.5 – 15 Hz) earthquakes; the farther away an earthquake, the less of that range of frequencies can be recorded."

The "shake" is using a geophone with a natural frequency of 4.5Hz. If you live along the "ring of fire" then the "shake" is for you. (But just getting a free quake App on your iPhone or Android phone would probably be just a satisfying.)

My own seismometer uses a displacement sensor and has a natural period of about 2 seconds (0.5Hz frequency). I currently have it's bandwidth set to 0.025-0.5Hz. It is sensitive to Mag 6.0 or greater anywhere in the world. My friend's Lehman seismograph has a natural period somewhere between 10s and 30s (0.1Hz to 0.033Hz frequency). But it uses a velocity sensor, which tends to degrade sensitivity below the natural frequency. I expect it to be able to record a Mag 6.0 quake anywhere as well -- probably even better than that if he gets it working. My problem is going to be getting him to actually finish it.

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspi-powered seismometer/seismograph

Wed Feb 15, 2017 4:34 am

BudBennett wrote:State of the art...really?
As far as I know, it is the only commercially available seismometer based on the Raspberry Pi, so in that category of one- yep :-). The whole package including electronics and software is quite well done in my opinion. Yes, the 4.5 Hz vertical geophone doesn't have much low frequency response compared with the "pro" sensors, but they have wrung more performance from it than you might assume from the specs. It is a velocity sensor and I think several orders of magnitude more sensitive to a given local or distant quake than the accelerometer in a smartphone. My copy of the R-Shake showed a clear signal way above background on a M7.8 quake over 4000 km away (Solomon Islands -> CA) and other people with the same unit saw it from 10000 km. I'd be amazed if a cellphone sensor would have detected that signal above noise level. If you like numbers, have a look at the modeled noise performance: http://bnordgren.org/seismo/RSS_Spice_Results.pdf

Using a so-called "hyperdamped" electronic sensing circuit, they have demonstrated it actually does show some response with very strong quakes down to 0.06 Hz although that is clearly way down in the sensitivity curve.

ilan
Posts: 1
Joined: Wed Apr 11, 2018 11:18 am

Re: Raspi-powered seismometer/seismograph

Thu Apr 12, 2018 7:01 pm

El Berto wrote:
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).
Any software to " detect " seismic wave?

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspi-powered seismometer/seismograph

Tue Apr 17, 2018 10:37 pm

I don't personally know of such software, but most of the quakes I've seen have a characteristic spectrogram profile that is unlike most ambient noise from traffic, etc. There is a sudden start followed by an exponential decay over 10s of seconds or more, and at any moment in time the larger signal amplitudes are in the lower frequencies eg. below 2 Hz unless the quake is very close by. A typical truck driving by on the street has a symmetric rise and fall, and usually peak energy is higher in frequency (eg. 5 Hz) and very little energy below 2 Hz. Signals from very distant quakes are almost all below 2 Hz in frequency, as the higher frequencies are more quickly attenuated in the ground.

To really tell if a signal is a quake you need to compare many stations in a network, then you can clearly tell what is very localized noise, and what signals have been received by many stations in different locations and all with a travel-time delay consistent with a common source point. You can also calculate depth, and that separates earthquakes (some km deep usually) and man-made events like quarry blasts (at the surface).

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

software for seismic monitoring and analysis

Thu Apr 19, 2018 9:23 pm

There is some software for this available called "ObsPy" for Seismic Observatory in Python: https://docs.obspy.org/tutorial/index.html and it has many different functions and capabilities.

Here is a page describing various "triggers" available to detect quakes in the presence of noise, both from features in a single channel, and also from coincident detections within some time range, from a sensor network: https://docs.obspy.org/tutorial/code_sn ... orial.html

Here is an example for calculating the apparent direction to an event, based on relative timing of signals from five stations at known locations:
https://docs.obspy.org/tutorial/code_sn ... lysis.html

tringwebdesign
Posts: 3
Joined: Thu Jun 21, 2018 6:41 pm

Re: Raspi-powered seismometer/seismograph

Thu Jun 21, 2018 7:19 pm

Thought I would chime in on this thread, as I am also interested in seismology but from a different perspective, measuring local HGV traffic movements and the potential effect on surrounding (old) structures.

I started out with the Mindsets slinky attached to a Pi B+ with a Cirrus Logic Audio Card attached. The output from the slinky worked when fed into my Laptop soundcard input (one of those combo 3-pole ones) but when trying in the Cirrus (3.5mm Line Input or Mic Input) I couldn't get any signal whatsoever to show, so I gave up on that idea.

I have since bought the EnviroPhat which comes with an accelerometer, the sort used in smartphones. But i haven't been able to wrap my head around the Math involved in translating the XYZ readings into traffic movements, there are so many different scales - mm/s, PPV, M let alone the variety of filters etc. Plus I am not sure the EnviroPhat is working in my context. It showed a general pattern in rush hour traffic over 12 hours, but I couldn't pin-down a specific 'HGV event'.

Full circle, today I got the Mindsets Lego Seismometer which I have to say is leagues ahead of the slinky. It's much more stable and well constructed, has a 3.5mm female jack already moulded onto the coil which is itself housed in plastic - the slinky coil kept unravelling itself. It's also less obtrusive making it less likely to be knocked over. I've been following someone else's efforts in setting this up. I feel more comfortable using something like Audacity to perform filtering functions etc.

I still have the same issue with the Cirrus card not showing any input, which is a shame, as I really wanted this to be RPI based rather than having to leave the laptop/desktop on all the time, where the input works fine.

Edit: I might try messing with alsamixer to see if that makes a difference

Image

User avatar
jbeale
Posts: 3350
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Raspi-powered seismometer/seismograph

Fri Jun 22, 2018 6:31 pm

The Mindsets Lego Seismometer looks like a neat widget. I see on the webpage https://mindsetsonline.co.uk/shop/lego-seismometer-kit/ they mention "1-2 Hz" and it seems less expensive than a 5 Hz vertical geophone. In fact it seems to be, in effect a 1-2 Hz vertical geophone. I wonder if it has published response parameters, eg. the voltage output sensitivity as a function of frequency.

tringwebdesign
Posts: 3
Joined: Thu Jun 21, 2018 6:41 pm

Re: Raspi-powered seismometer/seismograph

Wed Jun 27, 2018 5:55 am

Don't know about that. The device is now working on the audio card and it can pick up local traffic movements.

I am saving the readings from the device as a WAV audio file via arecord every 24 hours, results in a 1.9GB file

arecord -c 1 -f S16_LE -r 11025 --max-file-time 86400 --use-strftime %Y-%m-%d_%H:%M:%S.wav

It works, I can normalize the WAV file in Audacity and see the waveform change as a HGV drives past. After reading a few articles about other experiments doing the same I see that I need to convert the readings from the device into Peak Particle Velocity (PPV) and Vibration Dose Value (VDV) for any of it to make sense in terms of ISO/BS standards (BS7385 & BS5228-2 for example) and assessing the likely effect on a structure of local traffic vibrations.

That's where I get unstuck, how to convert the waveform data I have into PPV / VDV? I don't know about a few things, like whether the the arecord sampling frequency and depth are correct, I probably shouldn't be normalizing waveforms in Audacity (i'm only doing that so I can see if it's working).

I do know that I am looking for frequencies between 15 and 150Hz and that I think I need to get my units into mm/s. My experiment isn't exactly scientific from the Lego Seismometer, a starting point for possible future more detailed data collection and analysis is all that I need.

Image

tringwebdesign
Posts: 3
Joined: Thu Jun 21, 2018 6:41 pm

Re: Raspi-powered seismometer/seismograph

Sat Jul 07, 2018 5:10 am

Seems the Cirrus Logic card has a high pass filter that cuts in at 20Hz and up. The Audio Injector card also needs some fiddling with electronics to get the desired capture.

I think to get anything meaningful off the Lego device it needs to be paired with a digitizer capable of capturing the right frequencies. My conclusion on this is that it's probably cheaper to go the raspberryshake or mindsets digitizer route - a pre-made solution already configured. Whilst it's fun messing around home-brew style, if the results can't be related back to the real world there isn't a lot of sense in doing it

Return to “Automation, sensing and robotics”

Who is online

Users browsing this forum: No registered users and 8 guests