https://github.com/zephyrusblaze/waterit
Intelligent watering system optimizing plant health and water usage through real-time data and AI insights. Automates irrigation to combat water wastage in agriculture and gardening.
https://github.com/zephyrusblaze/waterit
ai arduino automation bootstrap chartjs flask gemini html-css-javascript llm nature sql watering-plants
Last synced: 7 months ago
JSON representation
Intelligent watering system optimizing plant health and water usage through real-time data and AI insights. Automates irrigation to combat water wastage in agriculture and gardening.
- Host: GitHub
- URL: https://github.com/zephyrusblaze/waterit
- Owner: ZephyrusBlaze
- License: apache-2.0
- Created: 2024-09-04T15:49:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-29T09:12:22.000Z (12 months ago)
- Last Synced: 2024-10-29T11:01:31.356Z (12 months ago)
- Topics: ai, arduino, automation, bootstrap, chartjs, flask, gemini, html-css-javascript, llm, nature, sql, watering-plants
- Language: HTML
- Homepage:
- Size: 1.66 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WaterIT: Intelligent Watering and Monitoring

**WaterIT** is an automated plant watering system designed to optimize water usage and enhance plant health by utilizing real-time data and AI-generated insights. With a focus on sustainability, WaterIT helps conserve water in agriculture and household gardening through intelligent automation.
## πΏ Problem Statement
Global agriculture consumes over **70%** of freshwater, and inefficient irrigation leads to **60%** water wastage. Meanwhile, **42%** of household wastewater remains untreated. WaterIT aims to tackle these issues by automating plant watering based on environmental data.
## π Features
- Automated watering based on real-time soil moisture levels.
- Real-time monitoring of soil moisture, water usage, temperature, and humidity.
- AI-powered insights for plant health using Google Generative AI.
- Web dashboard for easy control and data visualization.## π How It Works
1. **Hardware**:
- **Arduino UNO**: Manages the water pump, soil moisture sensor, and servo motor.
- **Soil Moisture Sensor**: Continuously monitors soil moisture and sends readings to the Arduino.
- **Water Pump**: Activated by the Arduino when the soil is dry and deactivated once optimal moisture is reached.
- **Servo Motor**: Moves to simulate a mechanical action when the pump turns off, enhancing the interaction.
- **Relay**: Controls the power to the water pump based on moisture sensor data.
2. **Software**:
- The **Flask app** communicates with the Arduino via USB to receive moisture data and control the water pump.
- Data such as soil moisture levels and water usage is stored in **SQLite databases** (`moisture_data.db` and `pump_data.db`).
- Real-time environmental data like temperature and humidity is fetched using the **OpenWeatherMap API**.
- AI-generated insights on plant care are provided using **Google Generative AI**, offering actionable advice based on the plantβs condition and external factors.3. **Water Usage Calculation**:
- The water used is calculated based on the duration the pump is active, with a flow rate of **0.0025 liters per second**.
- After watering, the system calculates and logs the total water consumption, helping monitor usage over time.4. **Mechanical Movement**:
- When the pump turns off, the **servo motor** rotates 180 degrees, simulating a visual indicator of the water flow stopping.
- After a short delay, the motor returns to its original position, ready for the next cycle.## π» Installation
1. **Clone the repository**:
```bash
git clone https://github.com/ZephyrusBlaze/WaterIT.git
cd waterit
```2. **Install dependencies**:
```bash
pip install -r requirements.txt
```3. **Set up environment variables**:
- OpenWeatherMap API key
- Google Gemini API key for AI insights4. **Run the Flask app**:
```bash
python app.py
```## ποΈ Project Structure
```bash
.
βββ LICENSE
βββ README.md
βββ app.py
βββ arduino-code
β βββ code.ino
βββ moisture_data.db
βββ pump_data.db
βββ requirements.txt
βββ static
β βββ images
β βββ ai.png
β βββ dashboard.png
β βββ graphs.png
βββ templates
βββ ai.html
βββ base.html
βββ dashboard.html
βββ graphs.html
βββ index.html
```## π Libraries & Tools
- **Flask**: Web framework for the frontend and backend.
- **Datetime**: For handling timestamps.
- **Requests**: For fetching weather data from OpenWeatherMap.
- **PySerial**: To communicate with the Arduino via USB.
- **Google Generative AI**: For generating AI insights on plant care.## π Future Enhancements
- **Wireless Communication**: Integrating wireless sensors for better scalability.
- **Plant Species Detection**: Improving AI insights by factoring in specific plant needs.## π License
This project is licensed under the [Apache 2.0 License](LICENSE).