Introduction

Smart Environment Monitoring

Welcome to our innovative Smart Agricultural Monitoring System, a seamless blend of technology and sustainability. Our project focuses on remotely monitor critical environmental factors essential for crop health, such as:

  • Temperature
  • Humidity
  • Light Intensity
  • Soil Moisture
  • Location

The system collects real-time data from sensors placed in the field, transmits it to Firebase Firestore for storage and analysis. With this setup, managers can access live data through a user-friendly Mobile interface, enabling them to make data-driven decisions. Our solution aims to enhance agricultural productivity, reduce resource waste, and promote sustainable farming practices.



Project Repository

Solution Architecture

System

Our system is an IoT-based smart agriculture solution designed to monitor and analyze environmental conditions like temperature, humidity, light intensity, and soil moisture. It collects real-time data using sensors connected to an ESP32, transmitting information through LoRa and storing it in Firebase for analysis and visualization.

Highlevel System

The high-level system architecture includes interconnected components: sensors gathering data, ESP32 acting as the main controller, LoRa nodes for long-range communication, and Firebase as the backend for real-time data storage. The user interacts with the front-end web interface to view insights and predictions, while ML models process data trends for informed decision-making.

Implementation

Implementation involves integrating hardware and software components. Sensors are connected to the ESP32 for data collection, with LoRa nodes facilitating long-range data transmission. The ESP32 uploads data to Firebase via Wi-Fi, where it’s processed and displayed on a dynamic web interface. The ML model, trained using sensor data, predicts environmental trends, helping optimize plantation management.

Software Design

Frontend

Design Image

User Interface

The user interface is a web-based dashboard that visually displays real-time sensor data, including temperature, humidity, light intensity, and soil moisture levels. It offers an intuitive layout with graphs, maps, and alerts for easy monitoring.

  • Real-time data visualization
  • Interactive graphs for trends
  • Map integration for sensor locations
  • User-friendly and responsive design
Design Image

Frontend Technology Stack

The frontend is built using Flutter for its component-based architecture and responsive design. The interface fetches data from Firebase and displays it in real-time with dynamic updates.

  • Responsive Design
  • Modern UI Components
  • Optimized for Speed

Backend

Database

Firebase Firestore is used as the cloud database to store real-time sensor data, including timestamps, coordinates, and environmental readings. It provides scalable, NoSQL data storage with automatic syncing.

  • Firebase Firestore (NoSQL cloud database)
  • Real-time data storage and syncing
  • Timestamp-based entries for sensor data
  • Scalable and secure



Backend Technology Stack

The backend uses Firebase Functions to process incoming data from ESP32 devices. It handles CRUD operations, ML model integration, and real-time updates to the frontend.

  • Firebase Functions for serverless processing
  • ESP32 for data collection and transmission
  • HTTP & MQTT protocols for data transfer
Design Image



Hardware Design

Sensors and Modules

We chose following sensor according to the required accuracy level.

  • ESP32 Microcontroller
  • DHT22 Sensor
  • Hall Sensor
  • Neo-6M Sensor
  • Capacitive Soil Moisture Sensor
  • NPK Sensor
  • BH1750 Light Intensity Sensor
  • DC to DC step down module
  • Rechargeable Battery

Main Circuit Diagram

Our Main Circuit Diagram illustrates the core components of our Smart Agricultural Monitoring System built around the ESP32 microcontroller. The system integrates multiple sensors, including the DHT22 for temperature and humidity, BH1750 for light intensity, and a soil moisture sensor to assess soil health. The Neo-6M GPS module provides real-time location data, while the hall sensor detects magnetic field changes, useful for monitoring mechanical operations. An LCD display is connected to visually present sensor readings directly. All components are powered by a battery source, with proper wiring ensuring stable communication through I2C (SDA, SCL pins) for the BH1750 and LCD, and GPIO pins for the remaining sensors. This setup enables seamless data collection and transmission via the ESP32, forming the foundation for real-time, remote agricultural monitoring.


Prototype

Design Image
Thumbnail

Prototype Implementation

Welcome to our innovative Smart Agricultural Monitoring System, a seamless blend of technology and sustainability. Our project focuses on remotely monitor critical environmental factors essential for crop health, such as:

Testing

Design Image

Why Testing is necessary?

The main benefit of testing is the identification and subsequent removal of the errors. However, testing also helps developers and testers to compare actual and expected results in order to improve quality. If the software production happens without testing it, it could be useless or sometimes dangerous for customers.

Software Frontend Testing

Focuses on ensuring the user interface works seamlessly. This includes verifying correct data visualization, responsive design across devices, and smooth user interactions, ensuring real-time sensor data displays without glitches.

Hardware Testing

Involves checking the proper functioning of sensors (DHT22, BH1750, soil moisture, GPS), ensuring accurate data collection. Tests include sensor calibration, power stability, and connectivity validation with the ESP32 and LoRa modules.

Machine Learning Training

Trains a machine learning model using collected sensor data to predict trends like soil moisture levels or plant health. Testing ensures the model’s accuracy, checks for overfitting, and validates predictions using real-world data.

Design Image

Backend Testing

Focuses on validating data flow between ESP32 and Firebase Firestore. Tests check for secure data storage, real-time updates, proper authentication, and verifying CRUD (Create, Read, Update, Delete) operations work as expected.

Timeline

Image

Budget

Image

Team

Image

Mineth De Croos

E/20/054
Image

Dasuni Kawya

E/20/197
Image

Ishan Kumarasinghe

E/20/211
Image

Methmi Perera

E/20/285

Supervisor

Image

Dr. Isuru Nawinne

Supervisor