George timmermans
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact

Earthquake Alarm

14/8/2015

0 Comments

 
A few years ago I came across an article of a boy that connected an inexpensive earthquake alarm to an Arduino with an ethernet shield and had it post an alert on twitter every time an earthquake was detected. 

In this post We will look at a couple of ways we can connect the Quake Alarm to a microprocessor and discuss the positives and negatives of each method.

The alarm used is called "Quake Alarm™".  I decided not to upload a photo of the device with the components visible to prevent any complications with the company that makes them.
Here is a description of how the device works: "the quake alarm™ is designed to provide instant warning of seismic activity by detecting the "p" wave (compression wave) of an earthquake, which travels faster than the more destructive "s" wave (shear wave). the quake alarm™ saves valuable seconds by removing the guesswork in earthquake detection. it is capable of detecting large earthquakes that occur hundreds of miles away and can detect moderate to minor earthquakes for many miles around your local area."
Lets have a look at the circuit and its components. 
  • 9v battery
  • PN222A transistor
  • 16v 220µF capacitor
  • 330Ω resistor (not sure if this was the original value)
  • buzzer
  • pendulum acting as a normally open switch

Note: I am not sure about the original resistor value because I already made some modifications to my device.

The circuit looks like this.
Picture
When there is an earthquake, the pendulum starts to swing and touches the sides and creates a closed contact. A current will flow between the base and the emitter and allows a charge to flow between collector and emitter turning on the buzzer. The capacitor smooths out the voltage spikes caused by the fast closing and opening of the switch(pendulum).

So how can we modify this circuit so we can read it out with a microprocessor (i will use the word AVR for the rest of the post). 
The following examples will take into are based on the assumption that the microprocessor uses 5V logic. I will use an Arduino Uno as a reference AVR. Some examples will need to be slightly changed when using 3.3V logic.

1. Reading analog values

The easiest circuit is to strip it to remove the battery and connect the AVR to the power connector. The voltage is supplied by the AVR on the positive terminal and the negative terminal is connected to one the the analog capable pins on the AVR. On an Arduino Uno those are pins A0 to A5.

Poll the analog pin and when an earthquake causes the pendulum to close the circuit a voltage drop will cause the analog reading to change. Have your program do something when the analog reading goes beyond a certain value.

Positives
  • No hardware modifications, warranty isn't voided.
  • Buzzer remains functional

Negatives
  • If your code is inefficient an earthquake could happen between polling and will get missed.

2. Simple switch with Interrupts (digital)

If we want to make sure that an earthquake doesn't go unnoticed we can use a hardware interrupt to catch any seismic activity. When an interrupt is triggered it stops execution of the code that was running at the time and executes the code that handles the interrupt. When the interrupt is taken care of it continues execution of the paused program.

For this example we only use the pendulum from the Quake alarm and use a 10K pull-down resistor. When the pendulum is open (no earthquake) there is no connection between the two legs of the pushbutton, so the pin is connected to ground (through the pull-down resistor) and we read a LOW. When the pendulum is closed (there is an earthquake), it makes a connection between its two legs, connecting the pin to 5 volts, so that we read a HIGH.

For interrupts to work on an Arduino Uno connect either to in 2 or 3. for more info about interrupts on Arduino's click here.
Picture
Tip: Add software debouncing to the code for when an earthquake triggers and interrupt to prevent it from registering as a series of earthquakes. 

Positives:
  • No more missed earthquakes

Negatives:
  • No more buzzer, but can added and programmed to sound an alarm when an earthquake is detected
  • Voided warranty

Whats next?

Although there are plenty more ways to connect up a Quake Alarm to an AVR you are either going to create an analog or digital signal and both of these are discussed above.

Now you have a way of capturing earthquakes you have plenty of possible applications. Add a real time clock and a SD card and you can log when earthquakes could be detected at your location. Add an ethernet shield or WiFi capabilities and you can for example send a twitter  message when an earthquake is detected. etc. et.
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    George Timmermans, Research Toolmaker, Software Engineer and Tinkerer

    View my profile on LinkedIn

    Archives

    January 2021
    November 2020
    July 2020
    May 2020
    November 2019
    August 2019
    January 2019
    October 2018
    January 2018
    November 2017
    October 2017
    August 2017
    June 2017
    May 2017
    April 2017
    March 2017
    January 2017
    December 2016
    November 2016
    October 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    December 2015
    November 2015
    October 2015
    September 2015
    August 2015

    Categories

    All
    3d Printing
    Photobooth
    Wisp

    RSS Feed

Proudly powered by Weebly
  • About Me
    • Resume
    • Press releases
  • Blog
  • Projects
    • Long Range WiFi Link
    • Embedded Systems >
      • Photo Booth
      • Classroom VU meter
      • USB Media Controller
      • Weather Station
      • Arduino Swimming Pool Controller
      • GRBL Android Controller
      • Arduino Serial Driver
      • Arduino Multitasking
      • 8x8x8 LED Cube
      • Analog -> Digital Geiger Counter
    • 3D Printing >
      • Simplify3d Configuration
      • 3D print repairs
    • Home Brewing >
      • Mead Recipes >
        • Cinnamon Mead
        • Sweet Chili Mead
        • Lemon & Ginger Mead
        • Mead Liqueur
        • Honey Beer
      • Glühwein (Spiced Wine)
      • Limoncello
    • House
    • Toolmaking
    • Laser Cutting
  • Weather Cam
  • Contact