Inspiration
The inspiration for CropGuard began not in a lab, but in a silent, dying maize field. During a visit to my grandfather’s farm, I found him standing helplessly among rows of withered stalks. The Fall Armyworm, a highly destructive pest, had decimated his harvest in a matter of days. As a First Class Engineering graduate, I realized that my technical skills were hollow if they couldn't protect the livelihoods of people like him and my mother, who worked as a tailor to fund my education. I built CropGuard to ensure that no farmer has to stand silently by while their future is eaten away.
What it does
Subsurface Environment Monitoring (IoT + Wokwi): It constantly monitors critical environmental factors 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. It provides actionable recommendations via the Farm Advisor, one-to-one answers to inquiries by an AI-Assistant, and a directory to real stores and 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 we built it
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 a 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: About 13,000 dataset were obtained from roboflow and were processed before being used to train our model. Also I implemented custom logic to convert the raw analog readings into calibrated metrics (e.g., mapping raw soil readings to 0-100% moisture).
AI Framework: Our model was trained with the processed data and we achieve an accuracy of about 95% and also with a precision of over 90%. Also I defined the functional flow for the second core feature, where the processed sensor data would be sent to a cloud database for predictive modeling, and a separate service would handle image processing using an integrated ML model (simulated in the concept phase).
Challenges we ran into
- Hosting a live server for the model and connection to endpoint API for the personalized AI-assistant.
- Since transfer learning was used, it was quite difficult to filter out unnecessary images in the trained model.
- Limitations of the free trial account used for automated SMS from TWILIO.
- During video processing, the ability of the video to automatically zoom and detect pests was initially poor.
- The conversion of raw values to calibrated sensor readings on Wokwi.
- And more...
Accomplishments that we're proud of
- Farm Advisor Integration: It's impossible for a farmer to keep monitoring the app 24/7. While you are absent, the Farm Advisor gives actionable recommendations based on the information provided via four data sets (AI pest detection, Crop Monitoring, Market Trends, and Weather Forecast).
- 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.
- 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 on the dashboard.
- 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.
- Feature Set: SMS notifications, Personal AI-assistant, Expert directory, and more.
- Business Strategy: Developing beautiful business model insights and exploring the employment opportunities its adaptability will create.
What we learned
- Integration of IoT into Supabase.
- The integration of a trained model into a web app by hosting it on a live server (Hugging Face).
- The use of the Open-Meteo weather forecast.
- Lots more... (Sincerely, I learned a lot during this short period of time).
What's next for CropGuard
On 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 to 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
- huggingface
- javascript/typescript
- open-meteo
- python
- react/next.js
- scikit-learn
- supabase
- tensorflow
- vercel
- wokwi
Log in or sign up for Devpost to join the conversation.