Introduction: Earthquake Detector

About: I used to work for instructables.com, now I just make stuff. // follow me to see what I'm up to: https://www.echoechostudio.com

I grew up in California, and have had the fortune of experiencing every major earthquake in this state since I was born. I love them and fear them at the same time! Earthquakes are exciting, but also mysterious. Living in such a seismically active state, there are earthquakes all the time that most people don't even feel! That is why I decided to build this Earthquake Detector



Step 1: Tools and Materials

(x2) 741 OpAmps (Radioshack Catalog #: 276-007)
(x1) 9V Relay (Radioshack Catalog #: 275-005)
(xvar) jumper wires (Radioshack Catalog #: 276-102)
(x2) Heavy duty 9V battery clips (Radioshack Catalog #: 270-324)
(x2) 9V batteries (Radioshack Catalog #: 23-866)
(x1) Prototyping PCB (Radioshack Catalog #: 276-170)
(x1) Piezo Buzzer (Radioshack Catalog #: 273-080)
(x1) 5K Ohm Potentiometer (Radioshack Catalog #: 271-1714)
(x1) Potentiometer cap (Radioshack Catalog #: 274-415)
(x1) 470 Ohm Resistor (Radioshack Catalog #: 271-1317)
(x1) 3" diameter acrylic tube
(x1) Magnet (Radioshack Catalog #: 64-1888)
(xvar) lamp-pull ball-chain


Tools:
Solder
Soldering Iron
Wire Snips
Hot Glue Gun

I used a laser cutter to make my own personal enclosure, but one could easily modify a pre-made project enclosure to suit the needs of this project.

Step 2: Modify the 9V Relay

The only part needed from the 9v Relay is the magnet coil, the rest of the pins are not needed.

I trimmed all of the leads off of the relay except the ones that attach to both ends of the coil. I then soldered wires from each of the leads from the coil.

The purpose of the magnet coil in this circuit is to detect when the hanging magnet from the cylinder passes over it. The magnet sways when the earth moves, triggering the piezo buzzer to sound, and the LED to illuminate.

Step 3: Create a Home for the 9V Relay.

One of the many perks of using a laser cutter is being able to make precision housing for your project. Because I knew I was using a 3" acrylic tube to hang my magnet in, I knew that I could make a 2.95" circle with a relay-sized rectangle cut out of it to perfectly house my relay in the middle of the tube.

Using CorelDraw, I generated a series of files for the enclosure, and then used .3" thick acrylic sheets to make the housing.

The file has 6 sides, with holes for the piezo buzzer, LED, and the acrylic tube. It is attached to this step of the instructable.

After I had my laser-cut parts, I glued my relay into it's home in the round, that will later be inserted into the tube.

I placed the relay into it's nook, then hot-glued it into place. After it was in place, I soldered a wire from each of the leads.

Step 4: The Circuit

Here is the circuit diagram I used for this project. There is also a fritzing file attached.

Step 5: Connecting Two Batteries to the PCB

I used two Heavy Duty 9v Battery Clips.

I designated one ground rail, one 9v + rail, and another 9V - rail. I soldered the red positive wire from one battery clip to the top rail of the PCB, and took the black negative wire of the same clip and soldered it to the lower part of column 47. I soldered the other battery clip in by connecting the red positive wire next to the negative wire of the other clip, and the black wire to the clip of the bottom rail.

Step 6: Solder the 741 Op Amps

I aligned the tops of the ICs with column 10 and 35 on the PCB, so that they were straddling the center divider of the board. I then soldered each IC into

Step 7: Pin 4 and 7

On each of the OpAmps, pin 4 goes to the -9V rail, and pin 7 goes to the +9V rail. I used jumper wires to connect the span between the pins and rails.

Step 8: Pin 6 to Pin 3, and Pin 3 to GND

The output pin on 741 OpAmp is pin 6. The OpAmp IC on the left will be outputting to pin 3 on the other IC. Pin 3 is Non-Inverted input of the OpAmp. Using a jumper wire, I connected pin 6 of the left chip, to pin 3 of the right chip.

This is essentially reading the shifting output of the magnetic coil inside the relay, and comparing it to a normalized value.

Pin 3 on the left opAmp IC gets connected to the grounded rail that was established in column 47 of the PCB.

Step 9: Solder the Relay .

Solder the relay coil into pin 2 and pin 3 of the left IC. When the magnet coil is activated in the relay, this is how the circuit communicates that motion from the sensor.

Step 10: Potentiometer

I wired the left pin of the potentiometer to 9V+, the right pin to 9V-, and the middle pin  to pin 2 of the riht OpAmp IC.

Step 11: Wire Buzzer and LED

I was able to sink the LED and Piezo buzzer into the enclosure the same way I sunk the 9V relay into the housing. I made sure it was flush with the outward-facing side, and then hot-glued it into place.

I ran a 470 Ohm resistor from the 9V+ rail, and connected that resistor to the positive lead of the LED. Both the LED and Piezo buzzer's negative lead run to the output pin (6) of the right IC.

Step 12: Assemble the Enclosure & Sink the Magnet to the Relay Coil Into the Tube.

I built out the bottom of the enclosure, and then set in the lid with components attached to the bottom. I then ripped off all of the paper that was protecting the enclosure from oils and scratches

I punched a small hole in the lid of the acrylic tube with a nail, and then ran the lamp chain with a magnet hot-glued to it so that the magnet just hovered over the relay coil. You want to hang the magnet so that it almost touches, you can see that it wants to stick to the relay, but it doesn't actually magnetize to the component.

Step 13: Implementation

A good way to test this circuit is by jumping on the ground, and adjusting the sensitivity potentiometer that way. You may have noticed that there is no power switch integrated into this design - this is so the device is always on, and so that one can always know when an earthquake is happening, even if you cannot feel it. (It will also tell you when trains, and big trucks are going by!)