Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Notifications You must be signed in to change notification settings

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

No packages published

Languages