Skip to content

amanvyahut/Sitamarhi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

85 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒพ TSCRIC-LoRa: Intelligent Precision Agriculture and Smart Irrigation Platform

Platform Firebase Civil Engg License

Minor Project ยท B.Tech Civil Engineering ยท Oriental College of Technology, Bhopal ยท RGPV ยท 2024โ€“2027

๐ŸŒ Live Dashboard โ€ข ๐Ÿ“ฑ Download Android App โ€ข ๐Ÿ“„ Project Report


๐Ÿ“Œ What is TSCRIC-LoRa?

TSCRIC stands for Temporal Soil-Crop Resonance Irrigation Controller.

It is an IoT-based intelligent precision agriculture and smart irrigation platform developed by civil engineering students at Oriental College of Technology, Bhopal. The system integrates real-time multi-depth soil moisture monitoring, LoRa long-range telemetry, sensor-driven irrigation decision-making, a multi-page SCADA-inspired web dashboard, and complete offline autonomous operation โ€” all assembled from commodity hardware at approximately โ‚น3,000.

This project demonstrates that classical civil engineering irrigation principles โ€” duty of water, crop delta, net irrigation requirement, ETo, water balance modelling โ€” can be implemented in real-time embedded firmware on an affordable microcontroller and presented through a professional web dashboard.


๐Ÿ—๏ธ Civil Engineering Relevance

Irrigation engineering is a core sub-discipline of civil engineering. TSCRIC-LoRa directly implements the following engineering parameters in firmware:

Parameter Equation Implementation
Duty of Water (D) D = A / Q [ha/cumec] YF-S201 flow sensor measures Q; plot area from config
Crop Delta (ฮ”) ฮ” = 8.64 ร— B / D [m] FAO-56 standard โ€” Wheat 450 mm, Rice 1200 mm
Net Irrigation Req. (NIR) NIR = (ETc โˆ’ Pe) ร— A ETc from Hargreaves-Samani ร— Kc; Pe from SCS CN
Gross Irrigation Req. (GIR) GIR = NIR / Ea Ea from applied vs delivered via flow meter
ETo (Hargreaves-Samani) ETo = 0.0023 ร— Ra ร— โˆšฮ”T ร— (T+17.8) DHT22 sensor, Ra = 10 MJ/mยฒ/day for Central India
Root-Zone Water Balance ฮ”S = I + P โˆ’ ETc โˆ’ DP โˆ’ R All terms computed in firmware, shown in dashboard
SCS Curve Number Q = (Pโˆ’Ia)ยฒ / (Pโˆ’Ia+S); CN = 75 Tipping bucket rainfall โ†’ effective rainfall
Readily Available Water RAW = AWC ร— Zr ร— p CSMI threshold calibrated to RAW depletion point

Based on laboratory prototype testing, the system is estimated to have the potential to achieve 20โ€“50% water savings compared to conventional flood irrigation if deployed at field scale.


โœจ Key Features

๐ŸŒฑ Core Irrigation Intelligence

  • CSMI (Composite Soil Moisture Index) โ€” tri-depth weighted average at 15 cm, 30 cm, and 45 cm
  • GDD-driven crop stage progression โ€” weights automatically shift as the crop grows (Stage 0 to Stage 3)
  • IIS (Intelligent Irrigation Score) โ€” 0โ€“100 composite score from CSMI + SMV + TPR + ETo โˆ’ Rain Penalty
  • SMV / SMA / TPR โ€” Soil Moisture Velocity, Acceleration, and Temporal Pattern Recognition for predictive irrigation

๐ŸŒง๏ธ Three-Tier Rainfall Intelligence

Priority Source Internet Required? Accuracy
1 โ€” PRIMARY Tipping Bucket Rain Gauge (0.2 mm/tip) No โ€” fully offline WMO standard direct measurement
2 โ€” BACKUP OpenWeatherMap API Online only Regional NWP forecast
3 โ€” ESTIMATE BMP280 Pressure Trend No โ€” fully offline ยฑ20%, 1โ€“6 hour horizon

๐Ÿ“ก Communication Layers

  • Primary: Firebase Realtime Database โ€” 15-second cloud sync
  • Fallback: LoRa SX1278 433 MHz โ€” 30-second broadcast, 2โ€“5 km range
  • Offline: Local WiFi hotspot (SSID: TSCRIC_AI, IP: 192.168.4.1) โ€” full dashboard on farmer's phone

๐Ÿ–ฅ๏ธ Multi-Page Dashboard

  • System Dashboard with IIS gauge, CSMI sparkline, Decision Explanation Engine
  • Irrigation Control โ€” pump panel, event log, seasonal water budget
  • Sensor Network โ€” 12-node LoRa monitoring, tri-depth VWC, environmental sensors
  • Analytics โ€” 7-day IIS history, water balance trend, ETo chart, soil moisture trends
  • Soil Health โ€” DS18B20 soil temperature, EC, pH, indicative NPK trend
  • Smart Farm Advisory Assistant โ€” rule-based, works completely offline in Hinglish

โšก Other Highlights

  • Pulse irrigation โ€” 30-second ON pulses prevent surface ponding and runoff (application rate 16.7 mm/hr, below infiltration capacity)
  • Pump health monitoring โ€” motor condition, seal, bearing, cavity, performance index
  • Sensor failure fallback matrix โ€” SAFE MODE, OWM fallback, weight rescaling on partial sensor failure
  • EEPROM offline storage โ€” 20-event ring buffer, auto-syncs to Firebase on reconnection
  • millis() overflow bug fix โ€” prevents pump re-trigger after 49.7 days

๐Ÿ”ง Hardware Components

Component Specification Est. Cost (โ‚น)
ESP8266 NodeMCU V3 ESP-12E, 4MB flash, 80MHz, WiFi 280
Capacitive Soil Moisture Sensor v2.0 (ร—3) 3.3V, corrosion-resistant 150
CD4051 8-Channel MUX Analog multiplexer for 3 sensors on 1 ADC 25
DHT22 Sensor ยฑ0.5ยฐC, ยฑ2% RH 130
BMP280 Module I2C, 0โ€“1100 hPa, ยฑ1 hPa 120
LoRa SX1278 Module 433 MHz, 17 dBm, SPI 420
YF-S201 Flow Sensor 1โ€“30 L/min, 7.5 pulses/litre 250
5V Relay Module Optoisolated, Active LOW 80
Mini DC Water Pump 2.5โ€“6V submersible, 80โ€“120 L/hr 150
DS18B20 (optional) Waterproof soil temperature 120
EC Sensor (optional) 0โ€“6 mS/cm 200
Soil pH Sensor (optional) 0โ€“14 pH range 280
Tipping Bucket Rain Gauge (optional) 0.2 mm/tip, reed switch 480
Breadboard + Wires + Resistors 830-point, Dupont, 4.7kฮฉ pull-ups 175
Total (core) ~โ‚น1,785
Total (full system with optionals) ~โ‚น3,045

๐Ÿง  Algorithm Overview

CSMI โ€” Composite Soil Moisture Index

CSMI = wโ‚ร—VWC_15cm + wโ‚‚ร—VWC_30cm + wโ‚ƒร—VWC_45cm

Weights shift automatically by GDD-determined crop stage:

Stage GDD Range wโ‚ (15cm) wโ‚‚ (30cm) wโ‚ƒ (45cm) Threshold
Germination 0โ€“150 0.50 0.30 0.20 25%
Tillering 150โ€“400 0.40 0.35 0.25 28%
Grain-Fill 400โ€“800 0.30 0.40 0.30 30%
Maturation >800 0.25 0.38 0.37 22%

IIS โ€” Intelligent Irrigation Score

IIS = moistureScore + velocityScore + tprBonus + etoScore โˆ’ rainPenalty
Component Max Points Rationale
Moisture Score 52.5 CSMI deficit below threshold
Velocity Score (SMV) 20.0 Rate of moisture depletion
TPR Bonus 15.0 Cosine similarity of drying pattern
ETo Score 15.0 Atmospheric evaporative demand
Rain Penalty โˆ’40 Suppresses irrigation before rain

Irrigation triggers when: CSMI < threshold AND IIS > 65 AND rain probability < 75% AND cooldown elapsed AND not in SAFE MODE

ETo โ€” Hargreaves-Samani (1985)

ETo = 0.0023 ร— Ra ร— โˆš(tRange) ร— (T_mean + 17.8)   [mm/day]
ETc = ETo ร— Kc

SCS Curve Number (CN = 75)

S = 25400/CN โˆ’ 254
Ia = 0.2 ร— S
Q = (P โˆ’ Ia)ยฒ / (P โˆ’ Ia + S)     [when P > Ia]
Pe = P โˆ’ Q   [effective rainfall]

๐Ÿ—‚๏ธ Repository Structure

Sitamarhi/
โ”œโ”€โ”€ index.html        # Main multi-page dashboard (HTML5 + CSS3 + JS)
โ”œโ”€โ”€ style.css         # Dark-theme SCADA-inspired stylesheet
โ”œโ”€โ”€ app.js            # Firebase integration, sensor logic, AI assistant, charts
โ”œโ”€โ”€ tscric.ino        # ESP8266 Arduino firmware (CSMI, IIS, ETo, LoRa, EEPROM)
โ””โ”€โ”€ README.md         # This file

๐Ÿš€ Getting Started

Dashboard (Web)

Visit the live dashboard directly:

https://amanvyahut.github.io/Sitamarhi/

For offline use, connect to the ESP8266 hotspot (TSCRIC_AI, password: 12345678) and open:

http://192.168.4.1

Firmware (ESP8266)

  1. Install Arduino IDE with ESP8266 board support
  2. Install required libraries: Firebase ESP8266, DHT sensor library, Adafruit BMP280, LoRa, OneWire, DallasTemperature
  3. Open tscric.ino in Arduino IDE
  4. Configure your WiFi credentials and Firebase project URL in the firmware
  5. Flash to ESP8266 NodeMCU via USB

Firebase Setup

  1. Create a Firebase project at console.firebase.google.com
  2. Enable Realtime Database (set rules to allow read/write for testing)
  3. Copy your database URL into tscric.ino and app.js

๐Ÿ“Š System Performance (7-Day Lab Testing)

Metric Result
Irrigation Efficiency 78% (Good โ€” above 70% benchmark)
Water Savings (estimated vs flood baseline) ~28โ€“30% in test window
Projected seasonal savings (estimated) 20โ€“50% at field scale
Water Use Efficiency 87%
LoRa Network Uptime 99.2%
LoRa Packet Delivery Rate 98.7%
Firebase Push Latency avg 380 ms (4G)
Sensor Reading Cycle 10 seconds (ยฑ50 ms)

โš ๏ธ Note: Results above are from laboratory prototype testing with a 6 mยฒ plot. Field-scale validation has not yet been conducted. Water saving percentages are estimates based on a traditional flood irrigation baseline.


๐Ÿ”ฎ Future Scope

  • Solar power integration โ€” 5โ€“10W panel + LiFePO4 + MPPT (PM-KUSUM compatible)
  • PCB + IP67 enclosure โ€” field-grade production deployment
  • DS3231 RTC โ€” accurate offline event timestamping
  • ESP32 upgrade โ€” dual-core, dual UART, Bluetooth
  • CNN crop disease detection โ€” ESP32-CAM + TensorFlow Lite (Phase 3)
  • Reinforcement Learning โ€” optimal irrigation policy from multi-season data (Phase 5)
  • LoRaWAN gateway โ€” command-area-wide monitoring at gram panchayat level
  • PM-KUSUM / PMKSY integration โ€” government scheme alignment

๐Ÿ‘ฅ Project Team

Name Role
Aman Kumar (0126CE243D04) Team Lead ยท Project Developer
Akash Kumar (0126CE243D03) Team Member
Aditya Kumar (0126CE243D01) Team Member
Akash Khargande (0126CE243D02) Team Member
Dr. Yogesh Iyer Murthy Project Guide ยท Dept. of Civil Engineering, OCT Bhopal

Institution: Oriental College of Technology, Bhopal ยท Department of Civil Engineering
University: Rajiv Gandhi Proudyogiki Vishwavidyalaya (RGPV), Bhopal
Academic Year: 2024โ€“2027


๐Ÿ“š Key References

  1. Allen et al. โ€” FAO Irrigation and Drainage Paper 56 (1998) โ€” Crop Evapotranspiration Guidelines
  2. Hargreaves & Samani โ€” Reference Crop ETo from Temperature (1985)
  3. A.M. Michael โ€” Irrigation Theory and Practice (Vikas Publishing, 2010)
  4. S.K. Garg โ€” Irrigation Engineering and Hydraulic Structures (Khanna Publishers, 2012)
  5. WMO-No. 8 โ€” Guide to Meteorological Instruments and Methods of Observation (2018)
  6. Hsiao (1990) โ€” Root-zone weighted averaging at multiple depths
  7. Semtech โ€” SX1276/77/78/79 LoRa Transceiver Datasheet

๐Ÿ“„ License

This project is submitted as a B.Tech Minor Project at Oriental College of Technology, Bhopal under RGPV. The code and documentation are made available for academic reference. Commercial use is not permitted without prior permission from the project team and institution.


TSCRIC-LoRa ยท Oriental College of Technology, Bhopal ยท Civil Engineering 2024โ€“2027
Guide: Dr. Yogesh Iyer Murthy ยท Team: Aman Kumar ยท Akash Kumar ยท Aditya Kumar ยท Akash Khargande

๐ŸŒ Live Dashboard | ๐Ÿ“ฑ Android App

About

Intelligent Irrigation Command Center Temporal Soil-Crop Resonance Irrigation Controller with AI-powered decision making, LoRa mesh networking, and real-time sensor fusion.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors