|
| 1 | + |
| 2 | +# 🌱 Smart Agriculture for Efficient Cultivation in Hilly Regions |
| 3 | +**SIH 25062 – Team Project** |
| 4 | + |
| 5 | +## 📖 Overview |
| 6 | +This project implements an **IoT‑based Smart Agriculture system** designed to optimize cultivation in hilly regions. Using **NodeMCU (ESP8266)**, the system monitors environmental conditions and automates irrigation. Data is uploaded to **Firebase Realtime Database**, enabling farmers to view live conditions and control sprinklers remotely via a mobile app. |
| 7 | + |
| 8 | +The solution ensures efficient water usage, reduces manual intervention, and supports sustainable farming practices in challenging terrains. |
| 9 | + |
| 10 | +--- |
| 11 | + |
| 12 | +## ⚙️ Features |
| 13 | +- **Weather monitoring**: Real‑time temperature and humidity readings using DHT11 sensor. |
| 14 | +- **Soil moisture sensing**: Analog soil moisture sensor tracks soil hydration levels. |
| 15 | +- **Automated irrigation**: Relay‑controlled water pump activates when soil moisture drops below threshold. |
| 16 | +- **Cloud integration**: Sensor data uploaded to Firebase for remote access. |
| 17 | +- **Mobile app control**: Farmers can monitor conditions and manually control sprinklers via companion app. |
| 18 | +- **OLED display feedback**: SH1106 OLED shows live sensor data, WiFi/Firebase status, and pump state. |
| 19 | +- **Multi‑WiFi support**: ESP8266WiFiMulti ensures reliable connectivity across multiple networks. |
| 20 | + |
| 21 | +--- |
| 22 | + |
| 23 | +## 🛠️ Hardware Components |
| 24 | +- **NodeMCU ESP8266** – Core microcontroller with WiFi. |
| 25 | +- **DHT11 sensor** – Measures temperature and humidity. |
| 26 | +- **Soil moisture sensor** – Detects soil hydration levels. |
| 27 | +- **Relay module** – Controls water pump/sprinkler system. |
| 28 | +- **SH1106 OLED display** – Displays system status and sensor data. |
| 29 | +- **Water pump & sprinklers** – Automated irrigation hardware. |
| 30 | + |
| 31 | +--- |
| 32 | + |
| 33 | +## 🧑💻 Software & Libraries |
| 34 | +- **ESP8266WiFi / ESP8266WiFiMulti** – WiFi connectivity. |
| 35 | +- **Firebase ESP Client** – Firebase Realtime Database integration. |
| 36 | +- **DHT library** – Sensor data acquisition. |
| 37 | +- **Adafruit GFX & SH110X** – OLED display rendering. |
| 38 | + |
| 39 | +--- |
| 40 | + |
| 41 | +## 🔄 System Workflow |
| 42 | +1. **Sensor data collection**: DHT11 and soil moisture sensor read values every second. |
| 43 | +2. **Relay control**: Pump turns ON when soil moisture < threshold, OFF when moisture > threshold. |
| 44 | +3. **Data upload**: Temperature, humidity, soil moisture, and pump status sent to Firebase every 5 seconds. |
| 45 | +4. **Mobile app interface**: Farmers view live data and control sprinklers remotely. |
| 46 | +5. **OLED feedback**: Local display shows sensor readings, WiFi/Firebase status, and pump activity. |
| 47 | + |
| 48 | +--- |
| 49 | + |
| 50 | +## 📊 Firebase Data Structure |
| 51 | +``` |
| 52 | +/devices/nodemcu1/ |
| 53 | + ├── temperature: <float> |
| 54 | + ├── humidity: <float> |
| 55 | + ├── soilMoisture: <int> |
| 56 | + ├── soilMoistureRaw: <int> |
| 57 | + ├── relayStatus: <bool> |
| 58 | +``` |
| 59 | + |
| 60 | +--- |
| 61 | + |
| 62 | +## 🚀 Setup Instructions |
| 63 | +1. **Hardware assembly**: Connect DHT11, soil moisture sensor, relay, and OLED to NodeMCU. |
| 64 | +2. **Firebase setup**: Create a Firebase project, enable Realtime Database, and obtain API key & database URL. |
| 65 | +3. **Code upload**: Flash the provided Arduino sketch to NodeMCU via Arduino IDE. |
| 66 | +4. **WiFi configuration**: Update WiFi credentials in code (`wifiMulti.addAP`). |
| 67 | +5. **App integration**: Connect mobile app to Firebase for live monitoring and control. |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## 📌 Project Resources |
| 72 | +- 📱 [App Release (GitHub)](https://github.com/TheTechTiger/AgroSmart/releases/tag/v1.0.0) |
| 73 | +- 🎥 [Demo Video (YouTube)](https://www.youtube.com/watch?v=UTdf7FC17ng) |
| 74 | +- 🌐 [Landing Page](https://thetechtiger.github.io/AgroSmart/) |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## 🖼️ Project Images |
| 79 | + |
| 80 | +### 📱 Android App Screenshot |
| 81 | +<p align="center"> |
| 82 | + <img src="https://raw.githubusercontent.com/TheTechTiger/AgroSmart/refs/heads/main/images/app_SS1.jpg" alt="Android App Screenshot" width="400"/> |
| 83 | +</p> |
| 84 | + |
| 85 | +### 🔌 Connection Diagram (Made using Fritzing) |
| 86 | +<p align="center"> |
| 87 | + <img src="https://raw.githubusercontent.com/TheTechTiger/AgroSmart/refs/heads/main/images/CircuitDiagram.png" alt="Connection Diagram" width="500"/> |
| 88 | +</p> |
| 89 | + |
| 90 | +### 🖥️ OLED Screen Display Sample |
| 91 | +<p align="center"> |
| 92 | + <img src="https://raw.githubusercontent.com/TheTechTiger/AgroSmart/refs/heads/main/images/OLEDScreen.jpg" alt="OLED Screen Display" width="400"/> |
| 93 | +</p> |
| 94 | + |
| 95 | +### ⚙️ PCB Assembly (Built Project) |
| 96 | +<p align="center"> |
| 97 | + <img src="https://raw.githubusercontent.com/TheTechTiger/AgroSmart/refs/heads/main/images/PCB_Assembly.png" alt="PCB Assembly" width="500"/> |
| 98 | +</p> |
| 99 | + |
| 100 | +--- |
| 101 | + |
| 102 | +## 🌍 Impact |
| 103 | +This system addresses **water scarcity and manual labor challenges** in hilly agriculture by: |
| 104 | +- **Automating irrigation** based on soil conditions. |
| 105 | +- **Providing real‑time insights** into weather and soil health. |
| 106 | +- **Enabling remote control** of sprinklers via mobile app. |
| 107 | +- **Supporting sustainable farming** practices in difficult terrains. |
0 commit comments