Flood Monitoring System Using ESP8266
Flood Monitoring System Using ESP8266 with SMS Alert
Introduction
- In this article, we will explore the design and implementation of a Flood Monitoring System using various components such as a 16×2 LCD with I2C, ultrasonic sensor, float sensor, and SIM800L module.
- This system aims to provide real-time flood level monitoring and alert notifications to receive Text Messages.
Components Needed
S.N | Component | Quantity |
1 | ESP8266 | 1 |
2 | GSM module (SIM800l) | 1 |
3 | Ultrasonic Sensor | 1 |
4 | Float Sensor | 1 |
5 | 16x2 LCD Display With I2C | 1 |
6 | Zero PCB | 1 |
7 | 5v Power Supply | 1 |
ESP8266
ESP8266 is a Wi-Fi module developed by Espressif Microcontroller Systems. In the board is a microcontroller unit And a built-in Wi-Fi Chip, It is the low-cost solution for Wi-Fi connectivity to various projects.
16×2 LCD Display
- This is a basic 16-character by 2 lines Alphanumeric display. Black text on Green background. Utilizes the extremely common HD44780 parallel interface chipset. Interface code is freely available.
GSM module (SIM800l)
GSM SIM800L is a popular module that enables communication over GSM (Global System for Mobile Communications) networks. It Sends a text message and calls to a particular Mobile Number. and is necessary to put a valid SIM card in the GSM module.
- The module requires a power supply of 3.7 volts. It can be powered using an external Battery.
Ultrasonic Sensor
- Ultrasonic sensors find out the distance of the water level of the dam. And the Sensor mount on the top of the dam.
- Ultrasonic Sensor required a 5v power supply.
Float Sensor
Float sensors to detect Water levels. They consist of a float, on the water, and when the water level increases the float mechanism goes to the Top and is given the alert information.
Circuit Diagram
Source CodeĀ
LiquidCrystal_I2C
Board Selection
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
//Prateek //www.justdoelectronics.com #include <LiquidCrystal_I2C.h> #include <ESP8266WiFi.h> #include <SoftwareSerial.h> #include <Wire.h> SoftwareSerial mySerial(D6, D7); LiquidCrystal_I2C lcd(0x27, 16, 2); int FloatSensor = D5; int buttonState = 1; const int trigPin1 = D3; const int echoPin1 = D4; unsigned long startMillis; unsigned long currentMillis; const unsigned long period = 10000; long duration1; int distance1; void setup() { Serial.begin(9600); mySerial.begin(9600); Wire.begin(D2, D1); pinMode(FloatSensor, INPUT_PULLUP); lcd.init(); lcd.backlight(); lcd.setCursor(0, 0); lcd.print(" WELCOME TO"); lcd.setCursor(0, 1); lcd.print(" OUR PROJECTS"); delay(2000); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" SMART"); lcd.setCursor(0, 1); lcd.print(" DAM MONITORING"); delay(3000); lcd.clear(); pinMode(trigPin1, OUTPUT); pinMode(echoPin1, INPUT); } void loop() { ultersonic(); if (buttonState == HIGH) { Serial.println("WATER LEVEL -HIGH"); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" HIGH ALERTS"); lcd.setCursor(0, 1); lcd.print("WATER LEVEL-"); lcd.setCursor(13, 1); lcd.print(distance1); } else { Serial.println("WATER LEVEL - LOW"); lcd.clear(); lcd.setCursor(0, 0); lcd.print(" LOW ALERTS"); lcd.setCursor(0, 1); lcd.print("WATER LEVEL-"); lcd.setCursor(13, 1); lcd.print(distance1); } if (distance1 < 10) { } else { } currentMillis = millis(); if (currentMillis - startMillis >= period) { startMillis = currentMillis; } } void ultersonic() { digitalWrite(trigPin1, LOW); delayMicroseconds(2); digitalWrite(trigPin1, HIGH); delayMicroseconds(10); digitalWrite(trigPin1, LOW); duration1 = pulseIn(echoPin1, HIGH); distance1 = duration1 * 0.207 / 2; Serial.println(distance1); buttonState = digitalRead(FloatSensor); delay(100); } |
Video
Conclusion
- This system enables early detection of floods, allowing authorities to take immediate action and mitigate potential risks.
- By leveraging the capabilities of these components, we can build an effective flood monitoring system to enhance disaster management and safeguard lives and property.
ESP8266 Related More ProjectsĀ
Bhai pura code nahi hai isme please help kardijiye