ACCELEROMETER BASED EARTH QUAKE ALERT SYSTEM SIMULATION IN PROTEUS USING ARDUINO

Photo of author

By Jackson Taylor

Home » Uncategorized » ACCELEROMETER BASED EARTH QUAKE ALERT SYSTEM SIMULATION IN PROTEUS USING ARDUINO

As an Amazon Associate we earn from qualifying purchases.

An earthquake alert system based on an accelerometer and an Arduino watches for sudden ground shaking and triggers a local alarm. In this project the whole circuit is built and tested in Proteus, so you can try the logic without any hardware. This guide explains how the system works, which parts you need, how to wire them, and how to structure the code.

The project files from the original post are available through this download link: https://drive.google.com/open?id=0B65qnqjcJPRFLUM4ZUV6TUJ3TG8

What this system does (and does not do)

An accelerometer measures acceleration along one or more axes. When the ground shakes, the readings change quickly compared with normal conditions. The Arduino reads those values, compares them with a threshold, and switches on a buzzer, an LED or a message when the shaking is strong enough.

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video

It is important to be realistic about this. A single accelerometer detects shaking that is already happening. It cannot predict an earthquake. Public early-warning services rely on networks of professional seismic sensors, and a small Arduino project is a learning model of the detection and alert part only.

Components used in the simulation

  • Arduino board (an Uno-style board is common for Proteus projects).
  • Accelerometer, usually a 3-axis analog type such as the ADXL335, which gives one analog voltage per axis.
  • Buzzer and LED for the local alarm.
  • 16×2 LCD to display status or readings.
  • Optional GSM module to send an SMS alert.
  • Resistors and a power supply as needed by the circuit.

Depending on your Proteus version and installed libraries, an accelerometer model may not be included. If it is missing, you can add a third-party library, or use potentiometers connected to the analog pins to stand in for the X, Y and Z outputs. Moving a potentiometer then acts like tilting or shaking the sensor.

How the circuit is connected

The wiring is simple, because an analog accelerometer needs only power and three signal lines.

  1. Connect the accelerometer power and ground pins to the Arduino 5 V (or 3.3 V, depending on the sensor model) and GND.
  2. Connect the X, Y and Z outputs to three analog inputs, for example A0, A1 and A2.
  3. Connect the buzzer and LED to digital output pins, with a resistor in series with the LED.
  4. Connect the LCD data and control pins to digital pins, following the pin names set in your code.
  5. If you add a GSM module, connect its TX and RX lines to the Arduino serial pins and share a common ground.
See also
Gas and temperature based bidirectional speed control of ac motor -simulation

How the code works

The program follows the same pattern in most versions of this project.

1. Calibrate a resting value

At startup, read each axis a few times and store the average as the "at rest" value. This avoids hard-coding numbers that differ between sensors or simulation setups.

2. Read the axes continuously

In the main loop, use analogRead() on each axis. Compare each new reading with the resting value and calculate the difference.

3. Compare with a threshold

If the change on any axis goes beyond a chosen threshold, treat it as a shake. A low threshold makes the system sensitive but prone to false alarms, while a high one may miss small movements. You will usually adjust this value while testing.

4. Trigger the alert

When the threshold is crossed, turn on the buzzer and LED and show a warning on the LCD. To avoid false alarms from a single bump, you can require the condition to hold for a few consecutive readings before alerting.

5. Reset

Once the readings return to normal for a short time, switch the alarm off and show the normal status again.

Adding wireless alerts

A local buzzer only helps people who are in the room. To notify someone elsewhere, add a GSM module and send an SMS using AT commands from the Arduino serial port. The same approach is used in the GSM power theft detection simulation, so that article is a useful reference for the messaging side. Other options include a Wi-Fi module for an IoT dashboard, but these need extra setup and cannot always be fully simulated in Proteus.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Testing in Proteus

  1. Load the compiled HEX file into the Arduino component in Proteus.
  2. Start the simulation and check that the LCD shows the normal state.
  3. Change the accelerometer inputs, or move the potentiometers, quickly past your threshold.
  4. Confirm that the buzzer, LED and LCD message respond.
  5. Return the inputs to normal and check that the alarm resets.
See also
SINE WAVE INVERTER USING ARDUINO

Test slow changes as well as sudden ones. A slow tilt should not trigger the alarm if your logic is meant to detect vibration rather than orientation.

Ideas for improving the project

  • Combine the three axes into one magnitude value rather than checking each axis separately.
  • Use a moving average to filter noise.
  • Log the readings to an SD card or serial monitor to tune the threshold.
  • Add a manual reset button and a test button.

Related accelerometer and Arduino projects

If you want to see other uses of the same sensor, the accelerometer-based wheelchair project uses tilt to control motion, and the automatic iron turn-off project uses movement to decide when to cut power. For another Proteus example that combines several sensors and outputs, see the building automation simulation.

FAQ

Can an accelerometer predict an earthquake?

No. It can only detect movement as it happens. Prediction is not something a simple sensor and microcontroller can do.

Why use Proteus for this project?

Proteus lets you test the circuit and code safely and cheaply before buying parts. You can fix wiring and logic mistakes in the simulation first.

What if there is no accelerometer in my Proteus library?

Add a compatible third-party library, or use potentiometers on the analog inputs to mimic the X, Y and Z outputs.

How do I reduce false alarms?

Calibrate at startup, raise the threshold slightly, average several readings, and require the shake to last for a few samples before the alarm triggers.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works