Arduino Earthquake Simulator

by | Mar 30, 2023 | Arduino, Basic Coding, Coding

Introduction of the Project

Building your own DIY Arduino Earthquake Simulator is a fun and engaging project that allows you to simulate various seismic events, providing a unique learning experience on earthquake engineering and seismology. With just a few basic components and a little bit of programming knowledge, you can create a customizable simulator that accurately mimics the vibrations and motions of earthquakes.

To get started, you’ll need an Arduino board, a motor driver module, a vibration motor, an NPN transistor, a power source, and some basic tools. Once you’ve gathered your components, connect the DC motor and accelerometer to the motor driver module and Arduino board, respectively. Then, upload the code to the board, which will allow you to control the motor’s speed and direction, as well as monitor the accelerometer readings.

To simulate an earthquake, simply adjust the motor’s speed and direction based on the desired magnitude and direction of the earthquake. By monitoring the accelerometer readings, you can fine-tune your simulation to replicate the characteristics of specific types of earthquakes, such as their frequency, amplitude, and duration.

Overall, building your own DIY Arduino Earthquake Simulator is a rewarding project that combines engineering, programming, and seismology. With a little bit of creativity and experimentation, you can create a realistic and engaging simulation that teaches you about the fascinating world of earthquakes.

 

Supplies

To build this Arduino project, you can purchase the components online or from any electronics center.

Components

Circuit Diagram

Steps To Create An Arduino Earthquake Simulator

Step 1: Collect all the components required on the Digital board of the TinkerCad website.

Vibration Motor:

Step 2: Connect the Positive terminal of the Vibration motor to the 5V pin of the Arduino.

NPN Transistor:

Step 3: Connect the Collector terminal to the -ve terminal of the Vibration motor.

Step 4: Connect the Base terminal of the NPN transistor to the 3-number pin of the Arduino.

Step 5: Connect the Emitter terminal of the NPN transistor to the GND pin of the Arduino.

Source Code

void setup()
{
pinMode(3, OUTPUT);
}
void loop()
{
digitalWrite(3, HIGH);
delay(2000);
digitalWrite(3, LOW);
delay(2000);
}

Explanation of the Code

1. In our code, we have used two functions. In the first function, which is the setup function, we have configured the pin mode for output purposes.

2. In the loop function, we are giving high power to pin number 3, to which the vibration motor is connected to the Arduino for 2 seconds and thereafter making it low for another two seconds.

3. The delay function has been used that takes time in milliseconds.

4. The loop function keeps looping until the simulation is ON or the Arduino gets power.

Output

Arduino Earthquake Simulator

On starting the simulation, we will be able to see the vibrating motor as a vibrating plate during an earthquake.

 

More Arduino Projects>>>

You May Also Like To Create…

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *