Inspiration
Introduction: Across sub-Saharan Africa, millions of smallholder farmers operate in environments where access to reliable and affordable soil testing is practically nonexistent. During my master’s internship with OCP Africa in Nigeria, I witnessed firsthand how the lack of real-time soil data leads to poor fertilizer application, declining yields, and environmental degradation.
This project was born from a pressing question: "How might we build a smart, portable, and offline-capable soil analysis system that works in rural African farming contexts with limited infrastructure?"
Purpose of the Project: In sub-Saharan Africa, soil analysis is a critical but inaccessible resource for most smallholder farmers. While agronomic studies consistently show that soil testing improves fertilizer efficiency and crop yield, the reality is that:
- Most farmers lack access to affordable, timely, and actionable soil data.
- Conventional laboratory testing is expensive, time-consuming, and often geographically out of reach.
- As a result, farmers apply fertilizers blindly or based on outdated local norms, leading to nutrient imbalances, soil degradation, and low productivity.
What it does
We are building a low-cost, mobile, and offline-capable soil testing system that can be used by agricultural companies (like OCP Africa), extension workers, and cooperatives to serve farmers at scale. With this tool, a technician can visit any farm, insert a multi-parameter probe into the soil, and get instant readings of:
- Nitrogen (N)
- Phosphorus (P)
- Potassium (K)
- Soil pH
- Electrical Conductivity (EC)
- Temperature
- Moisture All of this is processed on-site using a solar-powered Raspberry Pi edge server that runs lightweight AI models to generate fertilizer recommendations based on the readings.
Why Offline? Most rural farms lack stable internet access. To ensure the system works anywhere, we designed it to: Operate without cloud connectivity
- Host a local WiFi dashboard that can be accessed by any phone or computer nearby
- Run AI inference locally using compressed machine learning models on the Pi
- This means technicians or agronomists can carry a fully mobile “digital soil lab” and deliver results and recommendations in real-time without needing to send samples to distant labs.
How we built it
We followed a structured, phase-based design process: Phase 1: Literature Review & System Design
- Identified the key pain points from farmers, agronomists, and OCP Africa teams.
- Reviewed previous work using IoT, sensors, and AI in agriculture.
- Choose a modular architecture with scalability and maintainability in mind.
Phase 2: Component Procurement & Bench Testing
- Selected a CWT-SOIL-NPKPHCTH-S 7-in-1 sensor.
- Built the microcontroller node using Arduino-compatible boards and RS485 interface.
- Developed basic firmware for NPK, pH, EC, and moisture readings using Modbus RTU.
Phase 3: Edge Server & AI Integration
- Designed a custom dashboard hosted locally on a Raspberry Pi 4.
- Converted trained soil recommendation models into TensorFlow Lite format.
- Configured offline inference using minimal compute and memory.
Phase 4 (In Progress): Field Testing & Benchmarking
- Soil samples are being collected across farms in Kano State, Nigeria.
- Lab results from OCP Africa (Kaduna Soil Lab) will be used to benchmark accuracy.
- Farmers and extension officers will provide feedback on usability and effectiveness.
Challenges we ran into
- Sensor Integration: Handling noisy data and serial communication from RS485 sensors required deep debugging and filtering techniques.
- Power Optimization: Ensuring stable operation on low-voltage batteries and solar input was tricky.
- Offline AI Inference: Running machine learning models on limited compute (Pi 4) required quantization and compression without sacrificing accuracy.
- Data Benchmarking: We had to align AI outputs with lab-tested values to ensure real agronomic validity.
Accomplishments that we're proud of
We developed a mobile, AI-powered, and offline-capable soil testing device—a complete kit that integrates:
- Multi-parameter soil sensor (measuring NPK, pH, EC, temperature, and moisture)
- Microcontroller node for reading and preprocessing sensor data
- Raspberry Pi edge server to locally host a dashboard and run AI models
- Solar-powered battery system to allow full off-grid functionality
The system creates a local Wi-Fi network, which enables any phone or tablet to connect and view a dashboard that displays real-time soil readings and AI-generated fertilizer recommendations.
This transforms the device into a fully offline, mobile digital soil lab, ideal for use by agricultural companies, cooperatives, or government extension agents across rural areas.
What we learned
Working on Fikira has been a transformative experience. Through the process of designing and building our offline soil analysis and recommendation system, we learned:
The critical importance of accessibility – Soil testing is proven to improve yields, yet the lack of affordable and timely testing options is a major barrier for smallholder farmers.
How to design for resource constraints – We built our solution to run offline using a Raspberry Pi edge server, ensuring that the system works even in rural areas with poor connectivity.
The value of integrating AI with IoT – By combining sensor data (NPK, pH, EC, moisture, temperature) with local AI models, we discovered how powerful on-device intelligence can be for real-time decision-making.
Scalability challenges – Creating a solution that can handle multiple sensors over a local network taught us how to optimize for efficiency and cost-effectiveness.
What's next for FarmNode by Fikira
We are now preparing to take Fikira from prototype to real-world validation. Our next steps include:
Benchmarking & Validation: Collecting soil samples from target areas and comparing our device’s results against laboratory tests to ensure accuracy.
Field Testing: Deploying multiple sensor nodes in actual farms to test the offline network and AI-powered recommendations.
Improving AI Models: Expanding from basic nutrient detection to include secondary macronutrients and micronutrients using image-based inference combined with sensor data.
Offline-first Deployment: Enhancing the Raspberry Pi server to function as a complete portable soil lab, allowing extension agents and cooperatives to serve farmers directly in the field.
Integration with Partners: Collaborating with OCP Africa and other stakeholders to align our solution with existing soil testing and advisory services for potential scaling.
Exploring Commercial Viability: Developing a sustainable model for distributing the system through input providers or farmer networks.
Built With
- ai
- arduino
- esp32
- fritzing
- github
- html/css
- javascript
- platformio
- python
- sqlite
Log in or sign up for Devpost to join the conversation.