Cascade — Smarter Farming Through Soil Intelligence
Inspiration: Food insecurity and water scarcity are rising challenges in many parts of the world. During our research, we learned that over 70% of freshwater is used in agriculture, yet farmers often have little real-time insight into soil health. Many communities rely on guesswork to water crops, which leads to: Overwatering → root damage and wasted water Underwatering → crop stress and reduced yield Undetected pests → preventable losses
We asked ourselves: What if farmers could instantly understand the condition of their soil using an affordable tool, without needing lab tests or expensive equipment?
That question became Cascade.
What We Built:
Cascade is a soil health monitoring system that uses:
Component Purpose ESP32 Microcontroller Reads soil and pest data at the edge Soil Moisture Sensor Measures hydration level (0–100%) PIR Motion Sensor Estimates pest activity in the soil environment Python + AWS Lambda Processes incoming sensor data DynamoDB Stores historical readings in the cloud React + Vite Dashboard Visualizes plant health in real time Gemini API Generates actionable, natural-language recommendations
The system calculates a plant health score using the formula: Health = 100 − (Moisture Penalty + Pest Impact) Pest Impact = pest score × 70
This allows us to express soil condition and pest stress on a unified 0–100 scale that is easy for farmers to understand.
How It Works: 1, The ESP32 reads analog moisture levels and motion activity. 2, Data is converted into: Moisture % Pest probability (0–1) Health Score (0–100)
3, The device sends this data every minute to: AWS API Gateway → Lambda → DynamoDB
4, The React dashboard fetches the data and displays:
Live moisture percentage
Pest risk level
Plant health score
Trend graphs over time
5, Gemini analyzes the latest readings and generates simple guidance for the grower, for example:
“Soil moisture is below the optimal 45–70% range. Consider watering within the next few hours to
prevent stress.”
What We Learned: How to calibrate sensors using raw analog readings How to convert environmental signals into meaningful plant health metrics Working with AWS services (API Gateway, Lambda, DynamoDB) Designing React dashboards for real-time IoT systems Handling networking challenges with IoT devices The importance of data storytelling in sustainability technology
Challenges We Faced: One of the first challenges we encountered was getting the ESP32 to reliably connect to Wi-Fi. We discovered that the microcontroller can only connect to 2.4GHz networks, while most mobile hotspots default to 5GHz. To solve this, we enabled Maximize Compatibility on the hotspot to force a 2.4GHz broadcast. Another major issue occurred when we began sending data to the cloud. Our requests kept returning 404 errors because the ESP32 was posting to the root API URL instead of the correct .../prod/data endpoint in API Gateway. Once we corrected the routing path, the data pipeline flowed correctly.
We also had to refine our health score model. Initially, high pest activity did not significantly reduce the plant health score, making the results misleading. We resolved this by increasing the pest weighting factor to emphasize how pests biologically impact plant stress. Additionally, our dashboard UI was originally designed to display NDVI and NDMI remote-sensing metrics, but our hardware provided different information. We refactored the interface to visualize moisture, pest_score, and health_score instead. Finally, when we integrated the Gemini API, the recommendations were initially too generic. By adjusting the prompt to include real sensor values and plant stress context, we generated meaningful, crop-aware, and actionable recommendations.
Cascade is built to be: Affordable Scalable Usable anywhere, even in remote farming communities
Built With
- a-python-aws-lambda-backend-connected-through-api-gateway-to-dynamodb
- a-react-+-vite-frontend-with-recharts-and-custom-css
- ai
- amazon-web-services
- arduino
- aws-dynamodb
- esp32
- gemini
Log in or sign up for Devpost to join the conversation.