Inspiration

India loses a significant portion of onion crops during post-harvest storage due to poor ventilation, humidity, and temperature fluctuations. Farmers often depend on traditional methods, lacking tools that give early warnings about spoilage. This inspired us to create OnionGuard AI — a smart, affordable system that combines AI + IoT to help farmers monitor and protect their produce in real time.

What it does

OnionGuard AI uses IoT sensors to track temperature, humidity, and gas levels inside onion storage units. An AI model analyzes these readings to predict the risk of spoilage and provides a percentage-based risk score. The system displays live data on a Flask dashboard, refreshes every few seconds, and triggers voice alerts in English when spoilage probability increases. It’s designed to work even in low-connectivity rural areas with offline data handling.

How we built it

Integrated DHT11 and MQ-135 sensors with an ESP32 microcontroller. Simulated sensor data for demo testing and trained an ML model (using Python) to predict spoilage probability. Built a Flask backend to process data, serve predictions, and host the web dashboard. Designed a frontend using HTML, CSS, and JavaScript with auto-refresh and chart visualization. Connected everything into a single platform called OnionGuard AI — a blend of AI, IoT, and farmer-centric UX.

Challenges we ran into

Maintaining accurate predictions with limited data samples. Calibrating sensors for rural conditions and realistic simulation. Integrating AI predictions smoothly into the Flask backend. Designing a lightweight UI that runs well on low-end devices.

Accomplishments that we're proud of

Built a working prototype that predicts onion spoilage risk effectively. Created a simple, multilingual, and farmer-friendly user interface. Combined AI + IoT into a real-world agricultural solution. Developed a demo that works offline — ideal for rural India.

What we learned

How to integrate IoT hardware with machine learning and web technologies. The importance of data quality for AI predictions. How user experience (UX) design can make or break adoption in rural tech. Realized that small innovations can have massive impact in agriculture.

What's next for OnionGuard AI

Expand to support other crops like potatoes, garlic, and tomatoes. Deploy pilot units in real onion storage facilities. Add Marathi / Hindi voice support and SMS alerts. Integrate solar-powered modules for fully self-sustained operation. Collaborate with agricultural universities and Krishi Kendras for validation and scaling.

Built With

Share this project:

Updates