An AI-Augmented IoT Plant Watering System
PlantPal is an intelligent plant care system that combines FPGA-based sensor hardware, ESP32 IoT connectivity, and conversational AI to automate soil monitoring and watering. Users interact with the system through an Android app featuring a chatbot powered by LangChain agents hosted on Firebase.
Traditional IoT plant monitoring systems provide raw sensor data but lack intelligent interaction. PlantPal addresses this by integrating agentic AI capabilities into a physical plant watering system:
- Conversational Interface: Users ask natural language questions like "How's my plant doing?" or "Water my plant for 5 seconds" instead of navigating complex dashboards
- LangChain-Powered Agent: The AI agent uses tool calling to query real-time sensor data from Firestore and send watering commands via Google Cloud Pub/Sub
- Firebase Cloud Functions: Serverless backend hosts the LangGraph agent, providing scalable AI-driven automation
- End-to-End IoT Pipeline: FPGA hardware reads soil moisture sensors, ESP32 bridges to MQTT/HiveMQ, data flows through Google Cloud Pub/Sub to Firebase, and the AI agent orchestrates it all
By combining embedded systems, cloud infrastructure, and modern AI frameworks, PlantPal demonstrates how agentic AI can augment IoT capabilities to create more intuitive and intelligent user experiences.
Before setting up PlantPal, you'll need:
- Google Cloud Platform Account: Sign up here
- Firebase Project: Create a Firebase project
- Android Studio: For building and running the Android app
The easiest way to understand the system is through the Android app UI, which provides the conversational interface to interact with your plant.
Follow the official Firebase Android setup guide to integrate Firebase with the app:
👉 Add Firebase to your Android project
Critical Step: Download your google-services.json file from the Firebase Console and place it in:
android/app/google-services.json
Without this file, the Android app cannot communicate with Firebase services (Authentication, Cloud Functions, Firestore).
- Android: Open
android/in Android Studio and sync Gradle dependencies - Firebase Functions: See
firebase/README.mdfor Python environment setup - FPGA/IoT: See
fpga/README.mdandiot/README.mdfor hardware requirements
- Build and run the Android app on a device or emulator
- Start the Firebase Emulator Suite for local testing (see
firebase/README.md) - Interact with the chatbot to monitor soil moisture and control watering
This repository is organized into four main components:
The brain of PlantPal — a LangGraph-based AI agent deployed as Firebase Cloud Functions.
- Agent Implementation: LangChain/LangGraph agent with tool calling for Firestore queries and IoT commands
- Cloud Functions: Python-based serverless functions (
plantpal_chat, Pub/Sub triggers) - Firestore Integration: Stores historical sensor data for agent context
- Testing: Local emulator support and unit/integration tests
The data pipeline connecting physical sensors to the cloud.
- ESP32 WiFi Bridge: Receives UART data from FPGA, publishes JSON to MQTT
- HiveMQ Broker: MQTT broker with Google Cloud Pub/Sub extension
- Data Schema: Avro schema for
PlantPalSoilTelemetrymessages - Architecture: Detailed flow from sensor → FPGA → ESP32 → MQTT → Pub/Sub → Firebase
The hardware foundation — FPGA-based sensor interface with FreeRTOS software.
- Vivado Project: Hardware design for Nexys 4/7 boards (block design, HDL, constraints)
- Vitis Software: FreeRTOS application with sensor tasks, UART protocol, I2C drivers
- Soil Moisture Sensing: ADS1115 ADC driver for capacitive sensor
- UART Protocol: Communication with ESP32 for commands and data transfer
- Hardware Platform: Pre-built
.xsafiles for software-only development
The user-facing application providing a conversational UI for plant care.
- Chat Interface: Natural language interaction with the LangChain agent
- Firebase SDK: Authentication, Cloud Functions, and Firestore integration
- Real-Time Data: Displays current soil moisture and watering status
- Local Testing: Configurable emulator support for development
📖 See android/ directory for source code
Note: It is recommended to use Android Studio for building and running the app. When selecting the project, choose the
android/folder in Android Studio.
- Hardware Setup: Follow
fpga/README.mdandiot/README.mdto set up sensor hardware and ESP32 - Backend Development: Use Firebase Emulator Suite (see
firebase/README.md) for local testing - Android Development: Configure
google-services.jsonand test against local or deployed Firebase - Integration Testing: Verify end-to-end flow from sensor reading → AI response
This project is licensed under the MIT License. See LICENSE for details.
This is an academic project developed for ECE 544. It is not actively maintained. However, all code has been tested and works at the time of writing. Feel free to fork and modify for personal use or learning!