IoT Landslide Monitoring System Using ESP32 and ThingSpeak

by cakee in Circuits > Microcontrollers

27 Views, 0 Favorites, 0 Comments

IoT Landslide Monitoring System Using ESP32 and ThingSpeak

IMG_20241115_152814_1111x500.jpg

An IoT-based landslide monitoring system built using an ESP32, soil moisture sensor, vibration sensor, and DHT11 sensor. The system continuously monitors environmental conditions and uploads the collected data to ThingSpeak for remote monitoring and analysis.

Supplies

IMG_20241115_134945.jpg
IMG_20241115_134558.jpg
IMG_20241115_135048.jpg
IMG_20241115_134852.jpg
  1. ESP32 Development Board
  2. Soil Moisture Sensor
  3. Vibration Sensor
  4. DHT11 Sensor
  5. Jumper Wires
  6. Breadboard
  7. Power Supply
  8. Wi-Fi Connection

Hardware Setup

Connect all the components as shown below.

Connections

DHT11 Sensor

  1. VCC → 3.3V
  2. GND → GND
  3. DATA → GPIO14

Vibration Sensor

  1. VCC → 3.3V
  2. GND → GND
  3. OUT → GPIO12

Soil Moisture Sensor

  1. VCC → 3.3V
  2. GND → GND
  3. AO → GPIO13

Power

  1. ESP32 powered using a Power Supply

ESP32 Code

Before uploading the code, create a ThingSpeak account and set up a new channel for your project.

Update the following values in the code according to your setup:

  1. YOUR_WIFI_NAME → Your Wi-Fi network name
  2. YOUR_WIFI_PASSWORD → Your Wi-Fi password
  3. YOUR_CHANNEL_ID → Your ThingSpeak Channel ID
  4. YOUR_WRITE_API_KEY → Your ThingSpeak Write API Key
// WiFi credentials
const char* ssid = "YOUR_WIFI_NAME"; // Replace with your WiFi SSID
const char* password = "YOUR_WIFI_PASSWORD"; // Replace with your WiFi password

// ThingSpeak channel info
unsigned long myChannelNumber = YOUR_CHANNEL_ID; // Replace with your ThingSpeak Channel ID
const char* myWriteAPIKey = "YOUR_WRITE_API_KEY"; // Replace with your Write API Key

Once the required values have been updated, upload the code to the ESP32 using the Arduino IDE.

The ESP32 connects to the Wi-Fi network, reads data from the connected sensors, and uploads the collected information to ThingSpeak for remote monitoring.

The following parameters are monitored:

  1. Temperature
  2. Humidity
  3. Soil Moisture
  4. Ground Vibration

Working

The system continuously monitors environmental conditions that may contribute to landslides.

The soil moisture sensor measures moisture levels in the soil, the vibration sensor detects ground movement, and the DHT11 sensor records temperature and humidity.

All sensor readings are transmitted to ThingSpeak through the ESP32, allowing the data to be monitored remotely through an internet-connected device.