Shop OBEX P1 Docs P2 Docs Learn Events
Help me monitor earthquakes — Parallax Forums

Help me monitor earthquakes

HannoHanno Posts: 1,130
edited 2010-09-16 14:03 in Propeller 1
Hi,
Here in Christchurch we've had ~300 aftershocks in the last week. A forum member suggested I measure them and I initially responded that "now is not a good time". However, I managed to scrounge something together:

I soldered a 3 axis digital accelerometer (LIS3LV02DQ- same circuit as in DanceBot/Propeller Guide book) to a prototyping board and plugged it into a battery powered DemoBoard. I wrote a program in 12Blocks that uses simple I2C building blocks to configure the accelerometer's internal filters and read measurements for all 3 axis. I double checked the I2C protocol with the logic analyser built into 12Blocks and then monitored the real-time measurements with the "view values" panel.

So far it's still connected to the PC- my next step (after taking care of kids) is to trigger on a quake and only then start writing data into eeprom- so I can turn the PC off.

Any other suggestions? I could monitor other sensors? Or output data with 12Blocks to lcd/tv/vga, maybe hook up a servo to serve as an indicator of the last quake's strength?
427 x 640 - 185K
640 x 427 - 153K
427 x 640 - 162K
526 x 638 - 50K

Comments

  • HumanoidoHumanoido Posts: 5,770
    edited 2010-09-09 21:31
    Hanno wrote: Any other suggestions? I could monitor other sensors? Or output data with 12Blocks to lcd/tv/vga, maybe hook up a servo to serve as an indicator of the last quake's strength?
    Hanno, outstanding project and it's remarkable to see the code in 12Blocks for the Propeller chip! I would use it to graph a 3D image of the quake on TV (X-Y-Z). It could also be used to predict the quake if your sensor is connected to ground. Showing a bar chart with the XYZ would show that quakes move up, down, laterally, and in combo directions. Finally, you could set it to measure a 3.5 and above, then sound an alarm and speak "Run like Hell!"

    While living in Taiwan, my first small apartment had a tiny bedroom with a bed inline to the window. I lived in fear that a 3.5 or above quake would ram the bed hard against the wall and I would be flung out through the window by pure momentum! I moved before that happened. What's more interesting, I can detect very small earthquakes without a Propeller chip. During the most recent earthquake disaster in southern China, I was far north and apparently the only person to know it was happening in real time.

    I like your idea of using a servo in place of a strip chart recorder. A long attached arm could stylus out the waves at the end of a pencil on a paper pad. Maybe this is a good project for a Boe-Bot or Scribbler to serve as the mechanism to move the stylus along a long strip of paper.

    Humanoido
  • RinksCustomsRinksCustoms Posts: 531
    edited 2010-09-09 21:43
    suggestion -why not use the coil demo to react to the waves in an eathquake or aftershocks. coil is mounted next to the metal mass vertically, and you have a metallic mass suspended just to it from a long string like from the ceiling. with the string lenght being proportional to the relative sensitivity of the earth wave. so what to use for vertical measurements? Same metal mass but using a few strings from a bungie chord to create a tuned mass balancing system. Thus one coil vertical and one horizontal gives both measurements with a mass of ferrous metal suspended by an elastic string. I bet with some tinkering, sensitivity/response time would be better than a 3 axis accel.
  • Al BoothAl Booth Posts: 137
    edited 2010-09-09 22:42
    Hanno,

    I see you really ran with my suggestion. I didn't expect you to put something together overnight. It looks like I have to look into your 12Blocks. It really made this simple to get a sampling program up and running.

    For best results the accelerometer should be firmly in contact with the ground. I have used a concrete pillar block with the accelerometer screwed down on top. This will reduced the "local" noise (kids running through the house,...) Most of the interesting movement will be 100 Hz or lower so a filter set up that and a sampling rate of 200-500 per second should be good.

    Happy monitoring. But the kids come first.

    Al
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-09-10 00:05
    Many decades ago, my father constucted various ways of getting a weightless mass for the measurement of ground movements. They usually ended up being suspended 3" ball bearings, on springs, sprung arms or repelling magnets (this gave free magnetics for the pickup coils too). This would only measure the Z axis though, but could spot things as the heavy traffic on a main road a quarter of a mile away. The largest shake that we had was about a 4 centred 20 miles south. The output was a modified loudspeaker movement with levers and a pencil.

    He tried to modify the windscreen wiper driven arm, used for the NOAA weather sats, but there was just too much back slack and inertia
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-10 05:48
    Hanno, nice idea. Next is to find out how sensitive it is. Maybe as suggested, you might have to effectively amplify the signal some way, like springs or suspending the pcb by strings on 4 corners, or some other fancy arrangement.

    I have not had time to check if NZ has actually moved west this time (towards Australia). Do you know? (for others: the last earthquake about a year ago the south island twisted 1ft = 300mm towards Australia)
  • Miner_with_a_PICMiner_with_a_PIC Posts: 123
    edited 2010-09-10 10:59
    As Al Booth mentioned better coupling to the ground is essential otherwise you will be measuring table vibrations as the kids run about ect. Another byproduct of poor coupling during an earthquake event will be the measurement of the system's response to the earthquake's shaking rather than the actual earthquake signal. The only other suggestion would be to buffer the values in the Prop's RAM so that once an earthquake event is detected you can back track by a few seconds or so to capture any potential smaller signals that were part of the earthquake event.
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2010-09-10 13:00
    The biggest problem we had with the suspended weights was to accurately map out the system resonances. The best bottom mount we had was an old brick built shed, its base turned out to be over 4 feet thick having been used as a dumping point for concrete by the builders. Weights did get up to 56 pounds.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2010-09-10 15:25
    Hanno,

    If you keep the last few second of data in ram, you could include the data from before the trigger point. There might be something interesting happening before the quake reaches the trigger threshold that would be lost if you start recording after the trigger. Some heart monitors use this principle. There is a button to press when a patient experiences unusual heart beats. The recording device keeps the last few seconds of heart data in temporary memory. When the button is pressed the data from the previous few seconds is included in the permanent record along with the data following the button press.

    Does a quake cause "ripples" in the air pressure? I think it would be interesting to monitor air pressure.

    Do quakes affect the earth's magnetic field? Something like a MicroMag 3-Axis Magnetometer would let you monitor all three axis.

    I'm very glad to hear your family is safe.

    Duane
  • HannoHanno Posts: 1,130
    edited 2010-09-12 15:47
    I've successfully measured 2 quakes- see below!!!!

    First some responses- thanks for the help!
    Duane- yes we're safe and kids are back in school and kindergarten-life is slowly returning to normal.
    Good idea to measure air pressure and magnetic field. I'll have to look into getting those sensors. Also good idea to keep a circular buffer to store data before the event.

    Toby/Miner-I'm still debugging my device so I like to keep it in my office- however, I have it silly-puttied to the floor which is mechanically very close to 2.4m poles encased in concrete. Eventually I'll mount it directly to one of those poles.

    Cluso- I don't believe we're closer to Australia- however, I think we're now 4 meters closer to the equator!

    Rinks- I had some of these accelerometers lying around- and they're actually very sensitive! I configured it to read a max of 2g's- and I get 12bits of resolution. Maybe I'll try a coil later.

    Humanoido- Since these aftershocks will hopefully stop soon, I'll first focus on measuring real quakes and later providing fancier output.




    Ok- see attached for the latest 12Block programs which measure quakes and export the data to excel. Also- see the excel spreadsheet which correlates the two quakes with the official data (attached) and graphs the 3-axis of measurements.

    The 12Block program to measure a quake:
    - initializes the i2c device
    - continually increments the time and measures 3 axis worth of data
    - runs a state machine which is either in "pre" or "post-trigger" mode.

    In the "pre-trigger" state, the device looks for a jolt. If it finds one, it writes the time to eeprom and switches to "post-trigger".

    In "post-trigger" state, the device logs data to eeprom and looks for a number of successive calm periods. Only then does it go back to "pre-trigger" state.


    The 12Block program to export data to a file:
    - reads eeprom
    - sets the time if appropriate- or increments it
    - uses a new "export" user interface block which monitors variables and writes them to a file- this block will be in the next release of 12Blocks...


    I'm still working on improving the trigger to be more sensitive. I also want to sample more quickly. Maybe I'll use an SD card...

    Hanno
    672 x 905 - 76K
    322 x 372 - 13K
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-09-12 21:32
    Hanno: Very pleased you are all safe.

    I did not find where NZ moved towards the equator but I did find where they said a new fault line has been created and the earth has moved (east) 11 feet. I suspect it will be a litle while before all movements are detailed.

    In 1969 my HSC (last year in high school in Australia - I was almost 18) in my Geography exam we were told about this hopeless 3rd theory that the continents were on plates that moved. The evidence was such that if you cut out the continents they would go together like a jigsaw. Of course they landed on the moon in July 69 and left measuring instruments there. By early 70 they had proven this hopeless theory was fact.

    I will be interested to see what results you can record with the prop and 12 Blocks. I see a new application for school students with Props and 12 Blocks :smilewinkgrin:
  • HollyMinkowskiHollyMinkowski Posts: 1,398
    edited 2010-09-13 00:10
    Hanno, this sounds like a really fun project.

    Your software is top-notch! Keep cranking
    out goodies like 12-blocks :-)
  • Al BoothAl Booth Posts: 137
    edited 2010-09-13 10:04
    Hanno

    Congratulations on your captures. It looks like they are only about 15 kilometers from you. That's close enough to get some really sharp motion.

    As far as "real" quakes are concerned, the accelerometers are probably not suited for distant quakes. The signal-to-noise will limit the range where they can pick up a measureable signal.

    I like your silly putty idea.

    Al
  • HannoHanno Posts: 1,130
    edited 2010-09-15 14:31
    Hi!
    We're still getting good-sized aftershocks a 4.3 and 4.5 last night. Been busy with other projects so haven't been measuring more.

    Cluso- here's what wikipedia says about the canterbury quake: "Though removed from the plate boundary itself, the earthquake likely reflects right-lateral motion on one of a number of regional faults related to the overall relative motion of these plates and may be related to the overall southern propagation of the Marlborough Fault System in recent geologic time."

    Looking at the map it appears that at least the major faults go north/south- and I thought the coastal part of NZ slipped north. I did see a video of a helicopter flying along the fault- everything was displaced by 11 feet! Fences, roads, rivers and even a house.

    Al-
    Measuring distant earthquakes is hard- especially with a houseful of pets and kids. I'll leave that to the experts. I would like to know get a bit more data and then integrate the accelerations to get velocity and position.

    Holly- It's hard to crank out multiple projects- I think I'll stick with just ViewPort, PropScope, 12Blocks and TBot for a while...

    Hanno
  • max72max72 Posts: 1,155
    edited 2010-09-16 03:08
    I found this link on the September issue of Nuts and Volts:

    http://www.techlib.com/electronics/seismic.htm

    Page 24, Hum detection.

    cheers,
    Massimo
  • HannoHanno Posts: 1,130
    edited 2010-09-16 14:03
    Thanks Massimo,
    I particularly liked the "deer repellent" section :)
    But yes, once I find a good place to mount the sensor that doesn't get triggered by kids/trucks on a nearby road, I'll look into complementary technologies that could detect more distant quakes. For now, I like being able to measure the exact acceleration with a calibrated device.
    Hanno
Sign In or Register to comment.