In my search for educational projects that can engage a kid’s interest, I recently began looking into seismology (from Ancient Greek, “seismos”, an earthquake and “logia”, study of.)
Being a rather high-tech subject, I was skeptical of my chances of reducing it to something kids could do, but I gave it a shot anyway, since it’s very applicable here in Taiwan, where earthquakes average a couple a day. (You can see them on this website: http://www.cwb.gov.tw/eng/index.htm )
The goal was to come up with some kind of a detector; the simplest and cheapest design possible that a student could plug into a computer and record real earthquakes. Although still in progress I wanted to share what I’ve done so far as it’s a fascinating field and full of good, observable data that will give anyone a deeper understanding of the planet we live on.
Different levels of approach
Depending on a child’s age and level of understanding, there are different points at which to enter this subject.
At the most basic level, we start with the commonest way in which vibrations are sensed electronically. That is a coil of wire and a magnet. The only important thing to know here is that more turns on the coil and a stronger (or closer) magnet will produce a bigger signal. There are many places you can find coils of wire in electronic gadgetry, such as relays and transformers. Here in Taiwan, “mosquito zappers” are popular, and notorious for breaking down. A thing like a tennis racket that zaps the mosquito with a few thousand volts. Recently I stole the transformer out of a broken one and put a wire and plug on it to fit into the microphone input on the computer. With a magnet dangling above it and an oscilloscope program in the computer (I am using “xoscope”, but there are many similar free ones), it makes a nice demonstration of how it can sense vibration. Here is a picture:
By the way, it’s best not to make something delicate or expensive at this point. Kids really get a kick out of making the biggest “earthquake” they possibly can. (I discovered that my table top was not fixed on very solidly…)
A big improvement on this can be made very cheaply. Pretty well all computer sound cards have a voltage source on the mic. plug to power certain kinds of mics or an inbuilt pre-amplifier. So instead of wiring the transformer directly to the mic. plug, we can add a garden-variety transistor as an amplifier, like this:
(The transistor is inside the coil and a bit hard to see.)
This makes it extremely sensitive and it will show you all kinds of things, even footsteps nearby and passing traffic. It works best, by the way, if the magnet is off to one side of the coil rather than directly over it.
Now for some improvements. You’ve probably noticed that the magnet can swing around for a long time, and if there are any breezes in the room it’ll never stop. I plan to experiment with ways of damping it, but so far I’ve improved it a little by putting it in a bottle with a big paper cylinder above the magnet. There’s a wooden chopstick up the middle to keep it rigid and to tie a suspension string onto. It looks like this currently:
(As I said they get a kick out of making earthquakes!)
Up to here I have described a way of getting a signal into the computer via the sound card. This is OK for seeing passing traffic, stomping one’s feet on the floor etc., but unfortunately earthquake signals are of such a low frequency that most of the signal would not be detected by the sound card. They are only designed for frequencies that we can hear. (Update Dec 2012: I have since discovered this is not strictly true. See my post: Simplest Seismometer – Experiments with direct recording through PC sound card)
But I did find a solution of sorts as you’ll see later on, and before we leave this style of detector I want to show you a quake I accidentally recorded with it just seconds before I unplugged it during a short test. This is a 5.2 quake, about 140 Km away which was below a magnitude 1 in Taipei.
The damping is poor, but the arrival of some different wave components of the quake can still be distinguished. The beginning for example shows “P” waves arriving first (primary waves which are compression waves like sound) then the larger “S” waves (secondary waves) which travel slower but are more powerful, arriving a little later. It is these differences in arrival time that allow seismologists to calculate how far away the quake was. For a more detailed explanation of the various wave types, see: http://en.wikipedia.org/wiki/Seismic_wave
This whole subject of different wave motions and their travel speeds has been studied in enormous detail and has revealed a lot about the structure of the Earth. Even the fact that the core of the planet is molten was proven by observation of seismic waves over long distances.
(Note that this trace was not recorded with the amplifier built onto the coil, but just the coil itself with some other electronic circuitry described later.)
Update October 1st 2010
I found a better method of damping. I got rid of the paper cylinder and put an old aluminum heat sink beside the coil.
I used a 4mm thick, 15mm dia. neodymium magnet. It’s suspended on a piece of iron wire with some clay added to give it a little weight.
With the (stronger) magnet positioned between the coil and the heat sink, it’s more sensitive and can be damped as much as you like just by raising or lowering the magnet.
You may wonder why a piece of aluminum would provide damping. Actually any non-magnetic conductor will work, such as copper, lead, gold etc.. The reason it works is that the movement of the magnet across the surface of the metal produces a current flow inside the metal. This current flow can be enough to produce an opposite magnetic field to the magnet, opposing its motion.
The only drawback is that the neodymium magnet is slightly attracted to the steel wires in the electronic components and in the base of the coil. I can mount the electronics somewhere else, but I dread the idea of removing the pins from the base of the coil and trying to attach the fine wire to something else. I might revert to a home made coil.
Moving up to a better detector
The traces gotten from the magnet in the bottle are a great way to start out, although education-wise, a better detector that is properly damped and will register slow movements can reveal much more, including interesting wave behavior from very distant quakes. Following are some details of the one I built. At this point you can either continue reading and see what I did, or if you want to record something from the bottle version, jump forward to where I talk about the electronics and software.
The first thing I discovered in browsing the web is the Lehman seismometer, a detector design that is common among amateur seismologists. The swinging arm arrangement in the picture below is a method of simulating a very long pendulum, and this one has a swing period of around 7 seconds. I can adjust it for longer, but being made of wood, and sitting in a wooden cupboard (therefore subject to warping), I found I had to re-adjust it a few times a week. Earthquake wave lengths can be very long, especially for distant ones, since the further they travel, the more the high frequency vibrations are filtered out. A process similar to what happens to loud music going through a solid building, if you’ve ever had the pleasure of party-loving neighbors. (I recall my neighbor’s Bob Marley music sounded just like a washing machine.)
Here are some more detailed pics:
This one shows the knife blade that the arm swings on.
and the top pivot arrangement…
And this one shows the damping mechanism, using two neodymium magnets and a thick aluminum heat sink from an old computer. The metal bracket, with another on the other side, also serve to limit the swing of the arm.
The pickup coil consists of 1,000 turns of fine copper wire. It was wound between two pieces of wood, then removed and covered with 5 min epoxy glue. Two more neodymium magnets are attached to the arm. As you can see there is no permanency designed into this yet. The aim was just to get something working asap and gain some familiarity on the way.
The yellow packet sitting on top of the arm is half a Kg of clay. I originally had a heavy copper bar balanced there, until a student bumped it and the whole structure collapsed very impressively. Even allowing for the makeshift way I set it up, it still confirmed my suspicion that this project was already too delicate for a kids’ activity. Still, I pressed on with this one but I also began playing with simpler detectors, such as the magnet in a bottle just described.
Placement of the detector
The detector is best in a basement, but if you’ve made it for educational purposes you’ll need to consider where people can conveniently see it. I have mine on the second floor and have to put up with background noise from the local traffic shaking the building. Still, it’s all educational. One thing that’s an absolute must is some way to stop air currents from blowing it around. Some have made transparent covers. I found it convenient to put it in a cupboard and close the door. It’s a bit high for kids but they can still push on the cupboard and see the numbers on the computer screen fluctuating wildly.
Recording a signal with a computer
An oscilloscope program is nice for seeing instant responses on the screen, but I haven’t been able to find any oscilloscope programs that record the data in a form useful to our purposes, so I have done it differently. Traditionally, the signal from the coil is amplified, filtered and digitized – converted into numbers that the computer can work with. The most expensive and technical part of this is the “analog to digital converter”, which is not easily made. And at prices running into hundreds of US dollars, not everybody can buy one. There is however, one in every computer, in the sound card, but as I’ve said, they don’t pick up the frequencies we’re looking for.
Still, I reasoned that if one could generate an audio signal and impress the seismometer signal onto it, (in other words make the audio signal go louder and softer according to the changes in the signal from the seismometer) then the seismic (earthquake) signals could be recovered by suitable software. After mulling over some circuit possibilities, I discovered that someone had already done something almost the same, for general data logging. You can see it here.
All I had to do was add some circuitry to amplify and filter the signal. For a price tag of around US$3-5, this is what I got my first results with:
The 5 volt supply was taken from a USB port. The unit can be plugged into a line input or a mic. input, but make sure, if there’s a preamplifier option, it should be turned off.
To begin, the gain control on the unit should be set to minimum. The output level adjustment is best set up when the software is running. In operation, the software is basically reading the sound level and turning it into a number between zero and around 32,000. It then subtracts half from the measurement so that the middle of the range will read zero. This allows us to read positive and negative signals. So when the numbers displayed are around zero (with no earthquakes happening) then you’ve got the output level adjustment set right. At that point you can increase the gain control until you see the measurements fluctuating due to background noise, (you may have to re-set the output adjustment to get it back to zero)
If you don’t know much about electronics yet, you may be able to find someone who can help out. The parts used are very common and cheap.
Software to record and display the signal
The original “cheapchop” software only displays numbers on the screen. The first thing I had to do was figure out how to make it save the data to a file. I did a little bit of programming in the “C” language many years ago but had forgotten practically everything, so this was quite a challenge. Currently, I’ve managed to get it saving an hours worth of data at a time and it will do so for 24 hours, after which it has to be re-started. It has the drawback that the data can’t be viewed until the end of each hour.
The software, in the “C” programming language can be downloaded here seismochop6 but note that you will need to copy and paste the text onto a simple text editor and save it as “seismochop6.c” before attempting to compile it.
I hope one day to figure out how to turn it into an .exe file, for those people using Windows machines. (Update 20 April, 2012 – finally I have figured out how to make a Windows version. Furthermore, it displays in real time. See this blog post.) Until then, you will need to do it yourself or get someone to help. I am using Ubuntu Linux and I just use the compile instructions near the top of the program listing (gcc -lm seismochop6.c -o seismochop6). This creates a binary file which can be executed in a Linux terminal window with the command ./seismochop6
I haven’t supplied the binary file here because that has to be compiled on the computer it will be used on. It would only work on yours if you had the same system.
(This is very easy to do, by the way, since Ubuntu can be downloaded free onto a bootable CD and simply run from that without any change to your computer.)
The program will ask, “which hour (0-23)”. If you start the program at midnight, type 0 <enter> (that was a zero, not an O). It will save a binary file at the end of each hour in the current directory. The files are numbered 0.Z to 23.Z. They are in the format required by a popular free program called AmaSeis, which is great for recording and analyzing earthquakes. You can download AmaSeisSetup.exe from this page.
When you have installed it and gotten it working, you will see that it has created a directory structure in its working directory where it stores data by year, month and day. You need to copy your data files into the appropriate day’s folder so that it will be displayed. Then the world of seismology will start to open up to you….
Here is a recording of the biggest I have had so far, with some added notes. (This felt pretty big, by the way. My cupboard door was swaying so much that I could have made this recording by sticky-taping a pencil onto the bottom of it and pulling some paper under it during the quake.)
As you can see, some of the hourly traces are drifting up and down. This turned out to be temperature changes influencing the gain of the sound card and didn’t happen on other computers. Only this old one I’m using for recording. When I solve the remaining hardware/software issues, I’ll think about setting it up on a better computer.
The AmaSeis program allows you to highlight and magnify a section of interest, so you can do various analyses on it, for example,
When magnified, this one clearly shows the first arrival of the “P” and “S” waves, and that they were about 10 seconds apart. Knowing that P waves travel at around 6-8 Km/sec and S waves at around 4 Km/sec, using math we can find out it was roughly 90-100 Km away.
Another useful function in AmaSeis is the ability to apply various filters to the waveform. Here is a distant earthquake barely detectable in the surrounding noise.
with filtering to get rid of the higher frequency noise it becomes more visible:
This was a 7.2 quake originating near the Indonesian side of Papua New Guinea, about 3,000 Km away from Taipei. The details can be found here:
So far, the project has taken longer than I expected, but there was a lot more to the subject than I thought in the beginning.
As time allows I will continue working on the software. I am hoping there is some way to get AmaSeis to take data directly from “seismochop” so that data will be displayed and recorded in real time. Following that I’ll try to get the whole thing working on Windows.
UPDATE Dec 24 2010
I recently made the seismometer arm longer so as to increase its natural swing period to around twenty seconds. I also bolted it directly to the wall, hoping to make it more stable so I wouldn’t need to keep re-adjusting it. This had both good and bad consequences. It was reassuring to see more distant earthquakes such as this 6.5 in Iran:
But unfortunately I found out that the instability I had was still there, even worse than before. It now has to be readjusted twice a day. As near as I can figure out, the building is swaying from side to side daily. It leans toward the road in the daytime and back again at night, presumably because of the weight of passing buses and trucks. This must be the worst location in the world for a seismometer!
On the electronics side of things, I have made a very cheap USB A/D converter based on a $2 microcontroller. If I can figure out how to send the output into Amaseis, the earthquake software, it will produce a cleaner signal and won’t tie up the computer’s sound card. Also, it will be more doable for kids.
Update 5 Jan 2011
I have updated the data logging program so I don’t need to manually re-start it and move the files each day. (If anybody wants this version, send me a message via the Contact page of this blog and I will email it to you.) It now saves data continuously in the same folder and file format as Amaseis, the software I use to view the traces. While I was away during the last two days it recorded my most distant earthquake yet; a 7.1 in Chile, on the opposite side of the world to Taipei:
Details of it can be found here: http://earthquake.usgs.gov/earthquakes/recenteqsww/Quakes/usc0000y49.php
Update 10 March 2011
By using a wider magnet on the seismometer pickup coil, it is more tolerant of the building swaying around. I have recorded many distant quakes from around the world now and it seems that anything above 6.5 will be visible. Here is an unusually active period beginning with a large 7.2 quake in Japan.
At 5:46 GMT today a huge 9.0 earthquake struck off the coast of Japan. Considering that the above picture showing a 7.2 in Japan looked big on my seismometer trace, you can imagine my shock when I saw this:
If we extract the first hour of shaking for clarity, it looks like this:
As I write this, more than three hours later, aftershocks are still plainly visible on my seismometer trace here in Taipei.
I was surprised that I didn’t feel it, considering its size – it appeared to be at least a 2.0 in Taipei. I guess it was because it was just so slow. Here is an expanded view of the first two minutes of the secondary waves:
As you can see these few cycles of the wave occur over two minutes, which is very slow indeed – about 12 seconds per shake. Interestingly, just yesterday one of my English students told me she did feel the shaking for some time. She had come home from school and was lying on her bed when she noticed it and was quite puzzled as to what it was.
And here is the trace again later at night. The aftershocks are huge, with more than 80 of them greater than magnitude 5.0, according to the USGS website.
If anybody is interested in downloading the Amaseis data files, leave a comment or contact me via the contact page.