More pictorial details can be found in the slides

The Inspiration:

Farmers do face devastating crop losses; often up to 40% pre-harvest due to invisible threats they cannot easily detect. They lack access to constant monitoring tools for critical factors like subsurface soil moisture and are often too slow to detect rapidly spreading pests like the Fall Armyworm across large fields. My dad is a commercial farmer. In 2022, 2023 and 2024; the attacks from these pests on our legume crops both on farmland and after harvest were sever. This attack really resulted in losses and unaffordability to pay the tuition of my brother which made him nearly had an extra year. My mummy manages a Cocoa farm she inherited, and for years we have been enjoying the returns on the yearly investments. Not until this year November that we entered into a huge loss just because we couldn't have the real-time information about the decline in the market price of almost all agricultural products. Since then, I had determined to keep on working had to find a lasting means to detect and control this PARASITIC DESTROYER, in order keep them and other farmers abreast of any upcoming market trends and other salient features which are embedded in this web application.

What it does

Subsurface Environment Monitoring (IoT + Wokwi): It constantly monitors critical environmental factor soil moisture, temperature, humidity, and light intensity; using simulated sensors (DHT22, Soil Sensor, LDR). This data is collected, processed, and displayed instantly on a 20x4 LCD interface, alerting the farmer to poor conditions via SMS, providing actionable recommendations by Farm Advisor, provide one-to-one answer to inquiries by AI-Assistant and directory to real stores and real agronomists depending on your geographical location.

Weather Forecast (Open-Meteo-Forecast): By integrating this, CropGuard provides a crucial layer of predictive intelligence, moving beyond simple real-time data. It provides farmers with a reliable weather forecast (temperature, humidity etc.) for the coming days depending on farm location. Knowing when rain is coming allows the farmer to cancel or delay irrigation, saving water and money. Forecasting severe weather helps plan the harvest to avoid damage.

Pest Detection (Machine learning Model): When combined with a machine learning model, CropGuard allows farmers to upload photos of their crops (from mobile) and trigger an automated scan. The AI instantly detects and identifies specific pests, like the Fall Armyworm, and recommends an immediate, targeted control strategy to avoid losses and ensure profit maximization

How it was built

Using vercel., the already trained model for pest detection and functional circuit for IoT monitoring was embedded in a web app. It has been summarized into 4 main parts:

Hardware Simulation (IoT): I used Wokwi and the ESP32 Dev Kit Module as microcontroller to simulate the physical farm monitoring system. I wired and programmed the DHT22 (Temp/Humidity), an LDR (Light), and a custom Soil Moisture Sensor to read and display live, sliding input values.

Embedded Software: I wrote C++ (Arduino) code to read these sensor values on pins GPIO 2, 36, and 34. The code then uses the LiquidCrystal_I2C library to format and display these live readings (Temperature, Humidity, Soil Moisture Percentage, and Light Lux) on the 20x4 LCD, which acts as the farmer's on-site interface.

Data Processing: I implemented a custom logic to convert the raw analog readings into, calibrated metrics (e.g., mapping raw soil readings to 0-100% moisture).

AI Framework: I defined the functional flow for the second core feature, where the processed sensor data would be sent to a cloud database (not built) for predictive modeling, and a separate service would handle image processing using an integrated ML model (simulated in the concept phase).

Challenges I ran into:

  1. Hosting a live server for the model and connection to endpoint API for the personalized AI-assistant
  2. Since transfer learning was used, it was quite difficult to filter out unnecessary images in the trained model.
  3. Limitations of free trial account used for automated SMS from TWILIO.
  4. During video processing, the ability of the video to automatically zoom and detect pests was initially poor.
  5. The conversion of raw values to calibrated sensor readings on Wokwi.
  6. And more...

Accomplishments that I'm proud of

  1. Farm Advisor Integration: It's impossible for a farmer to keep monitoring the app 24/7, while you are absent, the farm advisor is there for you to give actionable recommendations based on the information provided via the four data sets (AI pest detection, Crop Monitoring, Market Trends and Weather Forecast).

  2. Live Sensor readings: We successfully created a dynamic interface that allows a user to simulate the DHT22, Soil Moisture and LDR sensors sliders in Wokwi, and see the real-time updates on the LCD as well as the web app, demonstrating a true sensor-to-display logic.

  3. Simplified Interface: I consolidated all four critical parameters (Temperature, Humidity, Light Intensity and Moisture) onto a single, clear interface, providing the farmer with all necessary information at a glance just at the dashboard.

  4. Direct Solution and meaningful contribution: I established a clear technical path for solving the original problem: The IoT platform constantly watches the environment, and the AI framework addresses the parasitic pest (Fall Armyworm) threat.

  5. SMS notifications, Personal AI-assistant, Expert directory, etc.

  6. Beautiful business model insights

  7. Employment opportunities that it's adaptability will create in Africa.

What I learned

  1. Integration of IoT into Supabase
  2. The Integration of trained model in a web app by hosting it on a live server (hugging face)
  3. The use of open-meteo weather forecast
  4. Lots more... (Sincerely, I learnt a lot during this short period of time)

What's next for CropGuard

On the page 24 of my slide, I included 4 future enhancements that would solve realistic problems if integrated into CropGuard.

The truth is, I would be grateful if I can acquire more resources (financial and others) to break the limiting barrier for physical hardware implementation and further improve on it..

Thank you very much for this great opportunity💗

Built With

Share this project:

Updates