Skip to content

lamerock/Flood-Detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

🌊 Flood-Detector

A simple GSM-based Flood Detection System using gizDuino (Arduino-compatible board), SIM900D GSM module, and US-100 Ultrasonic Sensor.
This project detects rising water levels and automatically sends SMS alerts to registered phone numbers.


🧠 Overview

This flood detection system continuously monitors water levels using sensors connected to a gizDuino board.
Depending on the water height, it sends warning messages via the GSM network to predefined mobile numbers.
The system also triggers indicator LEDs and a buzzer based on alert levels.


⚙️ Hardware Components

Component Description
gizDuino Version 4.1 (ATmega168/168P) Arduino-compatible microcontroller board
GSM/GPRS SIMCOM SIM900D Module Sends SMS alerts for flood warnings
US-100 Ultrasonic Sonar Sensor Measures water level distance
LEDs (x3) Visual indicator for each water level
Buzzer Audible alarm for critical water level
Resistors / Wires / Breadboard Supporting components for wiring

🪜 Features

  • ✅ Detects 3 water level stages (Normal, Level 1, Level 2, Level 3)
  • ✅ Sends SMS notifications automatically
  • ✅ Alerts multiple registered users
  • ✅ LED indicators and buzzer alarm
  • ✅ Compatible with gizDuino and SIM900D GSM Shield

🔌 Pin Configuration

Pin Function
D2 LED - Level 1
D3 LED - Level 2
D4 LED - Level 3
D5 Buzzer
D6 Sensor - Level 1
D7 Sensor - Level 2
D8 Sensor - Level 3

📝 Note: Check your GizDuino manual for pin compatibility and GSM shield pin assignments.


📡 SMS Notifications

Water Level SMS Message
Normal "Water Level Status: Normal"
Level 1 "Water Level Status: Level 1"
Level 2 "Water Level Status: Level 2"
Level 3 "Water Level Status: Level 3"

Messages are sent to all registered phone numbers defined in the regNumbers[] array:

char* regNumbers[] = {"09150000000", "09360000000"};
int numNumbers = 2;

🧩 Code Reference

/**
  *
  *  Compiled and coded by:
  *  Gerard James B. Paglingayen
  *  
  *  Components:
  *  - Gizduino (Arduino Clone)
  *  - GSM Shield (SIM900D)
  *  - Water Level Sensors
  *
  *  Note:
  *    Read the Gizduino Manual, especially the Pin configuration.
  *    
 **/

Main functionalities include:

  • initGSM() → Initializes GSM module
  • send_msg() → Sends individual SMS message
  • sendMulti() → Sends message to multiple numbers
  • readSerialString() → Reads GSM response from serial
  • send_cmd() → Sends AT commands and verifies GSM response

🧰 Software Setup

  1. Install Arduino IDE
  2. Select Board: Arduino Duemilanove w/ ATmega168 (or GizDuino v4.1 equivalent)
  3. Select correct COM Port
  4. Load the sketch (FloodDetector.ino)
  5. Upload to gizDuino

⚠️ Notes

  • Ensure GSM antenna is properly connected.
  • Use an active SIM card with SMS capability.
  • Power supply should meet the GSM module’s current requirement (2A peak recommended).
  • Test each water level sensor before full deployment.

📸 Future Enhancements

  • Integration with IoT dashboard for remote monitoring
  • Solar power backup
  • Additional sensors for rainfall and temperature

👨‍💻 Author

Gerard James B. Paglingayen
DICT Trainer | IoT & Arduino Developer
📍 Philippines


🪪 License

This project is released under the MIT License — feel free to modify and expand for educational or research use.


About

A GSM-based flood detection system using gizDuino, SIM900D, and ultrasonic sensors that monitors water levels and sends automatic SMS alerts to registered users

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages