This is a project about earthquakes. On the 29th September 2009 a strong, magnitude 8 earthquake struck of the coast of Samoa. It happened early in the morning and caused a Tsunami which killed nearly 200 people. It was evening, after work when I heard the news here in the UK.

The next day at work I was curious and wanted to learn more about this event, so I looked up the USGS website and started reading. As I looked around the site, I came across a page with a picture of the globe on it and a large yellow square over the Samoan Islands. As I looked at this chart, and briefly refreshed the page, another large square, this time red, appeared over the coast of Indonesia. The mouse-over read that it was a magnitude 7.6 earthquake. It had occurred minutes, if not seconds before I saw that red square appear.

I had just witnessed an earthquake occur on the other side of the world. While part of me was geeking out over how cool the near-real-time technology was, a much larger part of me spent those next few minutes thinking about the human impact, and what it must be have been like. The UK is not known for it's seismic activity, it's not something I'd spent much time thinking about before. However, because of the immediacy of the information, I felt much closer to it.

I told everyone in the office about what I'd just seen, but there was nothing on any of the regular news outlets about this, Only the red box on the map. It was about 1/2 hour later when the news of this earthquake broke on Reuters, AP and the BBC, with their first pictures of the devastation. Although slightly less strong than the Samoan earthquake of the night before, the Sumatran earthquake struck much closer to a densely populated area. More than 1000 people lost their lives, over 130,000 homes were destroyed. At least 20 countries have responded to the disaster with aid. My own response is significantly less practical but I'm hoping it can help somehow, even if only on a psychological level. 

I'd like to introduce you to what i'm calling 'the Seismic Reflector'.

[Wikipedia sources here and here]

The Aim

This project has two strands, a software and a hardware component. The aim is to build a device which responds to earthquakes being reported in near-real time via the USGS RSS feeds. The device responds by illustrating the magnitude of the reported earthquake via two fairly chunky vibration motors of the kind used in video game controllers. The device is connected to a PC via a virtual com port over USB (thanks to an on board Arduino). On the PC, an application sits there checking the RSS feed periodically and when a new event it posted to the RSS feed, the desktop app parses the data out of it and presents the magnitude of the quake to the Arduino which interpreters this as rate at which to activate the vibration motors.

[Images below from Boston.com Big Picture and USGS]

Step 1: Gather the Parts

For this project you'll need a few bits.  Once you see what I'm trying to do you will be able to customise the parts list depending on your preference and what you have around.

First you will need a Computer, connected to the internet.  It helps if this is a computer that you use (or is just on) pretty much all the time, I use my work computer, but if you have a media centre PC or home server, that would be ideal.  Onto this PC you need to load the "Processing" Environment, which you can download here.

Download Processing from http://www.processing.org

Next, you will need to download the program that I've written to read the USGS feeds.  You can find this at the bottom of the page here.  This is loaded into the Processing IDE and run.  You will need to make one change to it, change the reference to "COM6" to be whatever COM port your computer uses to talk to an Arduino.

Speaking of Arduino's, the next requirement is for an Arduino of some kind.  In this project I used a Boarduino from Adafruit, because they rock. They are also very easy to use with breadboards.

Learn more about Arduino
Learn more about Boarduino

Speaking of breadboards, I'd advise you use one to build this project with at the start, unless you are super-cool and want to dive straight into PCB fabrication, or some kind of rats-nest stylee.  I've used a breadboard thorough this project as you'll see from the photos.

Next you will need some components.  Other than the Arduino, perhaps the biggest things going here are the vibration motors.  I used vibration motors out of a playstation dual -shock controller which are probably rated about 5v although I'm guessing here.  You can use anything you can get your hands on, but it should be able to fling itself around a bit, so you probably need something bigger than a pager motor.  Most game controllers, including the Playstation dual-shocks have both a low frequency motor with a big weight on, and a high frequency motor with a small weight.  This is useful for us as it creates a nice organic feeling vibration when they are both used together.

Powering motors straight from arduino pins looks like it should work, but actually it's really bad.  You can fry your pin very easily, so don't do it kids.  If you have some kind of H-Bridge lying around then you can do that, or just use some transistor based setup to take the current load away from the pin, and prevent current flowing back. I learned how to do this from the excellent ITP resource on controling high current loads with transistors. 

Learn more about using transistors to control motors at ITP

I've used two motors so I've built two independent circuits to control them via PWM from arduino pins.  If you only have one motor, or more then you will need to duplicate the components for each motor you want to drive.

For each motor circuit I used:

1x TIP120 transistor (NPN) (datasheet)
1x 1k Ohm resistor
1x Power Diode
some interconnecting wire

You can see the circuit diagram for this, and a more detailed parts list at the ITP page that I linked to above, I can't tell you what a cool resource ITP is.

In my code, I'm using pins 9 and 10 on the arduino, but you can change the code to use whichever (PWM) pins you like.

I thought this was some sort of documentation about a large-scale project which literally deflects seismic waves out into somewhere else (at least dampen it). It would be awesome though, if you can turn the ground beneath you into a seismic-wave absorbent area which absorbs the energy released by the quake. Oh, and you might want to consider adding something in your device there that tells you where the quake struck.
Seismologist Jim Berkland (I think I have the name right) has a theory that when the Moon is either New or Full and at Perigee (nearest to the Earth in its orbit) Earthquakes (and Moonquakes) are likeliest to occour. (The Moonquakes are recorded by NASA's Appolo seismomiters on the Moon.) <br> <br>Some years back &quot;Sky and Telescope&quot; magazine published in &quot;Astronomical Computing&quot; a program by the late Dr. Thomas VanFlandren in BASIC for computing exact times and dates of the New and Full Moons and Lunar Perigee and Apogee. <br> <br>Note that there is sort of a 19 year cycle in major Volcanic and Seismic activity and a 38 year cycle in the position of the Moon.
I used to sit watching the 'world disasters database' morose as it sounds i found it facinating seeing global trends, and reading stories about chemical leaks, bee attacks volcano erruptions etc without having to be spoon fed by the bbc or other news outlet<br><br>Welldone for a very good and thought provoking i'ble<br><br>high five for you :)
I just came across this (Seismic Reflector) and I think that it is a pretty neat idea (and could be very useful in the right environment). I would like to try something like it but I don't have any technical knowledge about the Arduino and limited knowledge about PC's or programming. I was looking at the USGS site (earthquakes in the last 7 days) and noticed they constantly update almost in real time (above M5 and below M5). Is there any (rather) simple way to to take these notifications and just generate a &quot;sound&quot; ( without any sophisticated concerns about amplitude or anything else about the sound) ..........directly out of the PC when they happen (without the Arduino)? Thank You Very Much. Sincerely, Ed.
Hi Ed.<br> <br> Do you know anything about processing (www.processing.org)? If not it's very easy to learn and even with limted knowledge you can pick things up quite quickly. It's been a while since I looked at this project, but from memory the PC application which I wrote to go with the arduino should work fine without an arduino attached. One of the options on in the pc program (there are buttons on the bottom of the window) turn on or off the sound alerts (I used an air raid siren). You need to download the zipfile from Step 2 and load it up in processing. You can edit the code to make it do what you want, it's fairly simple code. You will also need to <a href="http://bruno.wyldco.com/romefeeder/">install the RomeFeeder library</a> which is linked to from Processing.org.<br> <br> If all this sounds a bit complex, then an easier step would be to just download an RSS feed reader (although I don't have any recommendations). I'm sure some of them will have the ability to play an audio alert when a new item (earthquake) is posted to the feed.<br> <br> Jim
Hi Jim, <br> <br>Thank you for the quick reply. I will look into &quot;processing.org&quot;. I looked at the RSS feeder on the USGS site (latest earthquakes M5+ list), but I did not see any way to create an audible alarm each time the list is updated (again, I'm not as technically knowledgeable as I would like). Again, thank you for your excellent article and follow up help. Sincerely, Ed.
It would be easier if you provided the necessary libraries with the program sources. Also, if you could make a way to set the preferences for the serial port,etc within the program you could export this as a java application (you'd need to do it three times though, once for mac windows and linux).<br />
I'd be interested in knowing when/if you get a standalone wireless version of this working.&nbsp; It's a great concept, and I would be interested in building a wireless version.... though I don't have the experience to take what you have built and convert it.<br />
You wouldn't believe how easy it is to make this wireless.&nbsp; Power to the ardiuno would be from a battery source, (although you could invest a little time in understanding how you can use the transistors directly from the batteries, rather than through the arduino's pins like I did).&nbsp; The best way of making the data side of the project wireless (IMHO) is to use Xbee modems.&nbsp; Check out this link: <a href="http://www.ladyada.net/make/xbee/" rel="nofollow">http://www.ladyada.net/make/xbee/</a> for some great info.&nbsp; Essentially, with no configuration at all, two of these fairly cheep devices will replace your USB serial cable.&nbsp; It can't get easier than that.&nbsp; I will certainly publish an update when I get mine wireless.<br /> <br /> Jim<br />
Hi The buttons.png is missing from the zip file.<br />
Thank you for finding that, I've uploaded a new zip with it in!<br /> Jim
Okay, this is pretty cool.&nbsp; You might try contacting the USGS&nbsp;folks directly (scientists are weirdly cool about e-mails from competent people :-) and see if they have any advice, suggestions, or even interest in this sort of thing.&nbsp; It's a great PR&nbsp;idea.<br />
different :)<br />

About This Instructable




More by jimthree:Ghetto Pixels - Building an open source BlinkM The Seismic Reflector Mini Greenhouse Irrigation System 
Add instructable to: