AT
HomeHome
Live Dashboard...

Autonomous Terrain Rover

Measurement of Non-Electrical Quantities · Term Project Report

Back to Dashboard

Autonomous Terrain Rover

An autonomous soil-monitoring system for data-driven Precision Agriculture in Azerbaijan.

Paper Submitted by

  • Ravan Khidirov
  • Farman Aliyev
  • Jabrayil Gasimli
  • Zahid Abdullayev
  • Hasanali Asadov

Course: Measurement of Non-Electrical Quantities

Instructor: Assoc. Prof. Kamala Oghuz

Submitted on: 8 December 2025

1. Introduction

1.1. Background and Global Significance

Today's agricultural sector is confronted with one of the biggest challenges in history, which is feeding an estimated 9.7 billion people by 2050 despite shrinking arable land, accelerating climate change, and growing soil degradation [1]. Studies indicate that global food production should rise by nearly 70 percent to meet this demand [2]. However, traditional farming practices that depend on uniform fertilization across entire fields are no longer adequate under such conditions [3].

This method ignores how soils differ even within a single hectare, leaving nutrient-poor areas under-fertilized and producing weak yields, while nutrient-rich zones receive unnecessary amounts of fertilizer, causing economic losses and environmental issues such as groundwater contamination and eutrophication [4], [5]. As a response to these challenges, Precision Agriculture has become more widespread across the world. It focuses on delivering the right amount of inputs such as water, fertilizer, and nutrients exactly where they are needed based on high-resolution data and informed decisions [6].

Achieving this level of accuracy, however, depends on consistent, reliable, and spatially detailed soil information, which remains difficult or expensive to obtain in many regions. When farmers lack this data, they usually rely on intuition or rough measurements that limit productivity and sustainability [7].

1.2. The Context of Agriculture in Azerbaijan

This transition towards digital and data-driven agriculture is particularly relevant for the Kura-Araz Lowland in the Republic of Azerbaijan, where farming plays a vital role in the country's economic diversification beyond the oil sector [8]. Despite this importance, the region faces long-standing issues such as soil salinization, water scarcity, degraded irrigation systems, and limited access to modern analytical tools [9], [10]. Recent field research confirms that salinity and nutrient imbalance significantly constrain crop productivity, especially in irrigated lands in the Kura–Araz area [11].

Although national initiatives such as the Smart Villages Initiative have introduced digital tools and IoT systems to rural communities, many farmers still depend on occasional laboratory testing or personal judgement, both of which fail to provide the frequency and spatial detail needed for effective precision farming [12]. Therefore, introducing autonomous, sensor-based soil monitoring systems presents a promising opportunity to improve yields, optimise input usage, and enhance the export potential of high-value crops in Azerbaijan's challenging agro-ecological regions.

1.3. Problem Statement and Existing Methodologies

Despite the advantages of Precision Agriculture, its wider adoption is restricted mainly because obtaining accurate, frequent, and spatially dense soil data is extremely challenging. Existing soil analysis methods come with significant drawbacks. Laboratory soil testing, although highly reliable, is expensive, time-consuming, and labour-intensive, which results in only a few samples being collected per field and leads to low spatial resolution and potentially misleading conclusions [13].

Remote sensing methods, including satellite or UAV imagery and NDVI-based assessments, can provide valuable information about vegetation health, but they can only indirectly reflect soil conditions and cannot directly measure key soil chemical parameters such as NPK, pH, or electrical conductivity [14]. Static IoT sensor networks allow real-time monitoring, but their limited spatial coverage means that deploying enough sensors to cover large fields would be financially and logistically unrealistic [15].

Consequently, there is a clear gap between highly accurate but infrequent laboratory analysis and broad but indirect remote sensing data. This gap demonstrates the need for a mobile, in-situ soil monitoring system capable of combining the accuracy of laboratory-level measurements with the spatial flexibility required in modern precision agriculture.

1.4. Proposed Innovation and Objectives

To address this gap, the project proposes an autonomous terrestrial rover that can perform in-situ soil monitoring across large agricultural fields. Instead of installing numerous fixed sensor units, a single mobile platform equipped with a high-quality multi-parameter soil sensor can travel across farmland and gather soil data from different locations. This approach provides better spatial coverage, reduces cost, and offers flexibility when analysing varying field conditions [16].

The rover is designed to measure seven essential soil parameters in real time, including nitrogen, phosphorus, potassium, moisture, temperature, pH, and electrical conductivity, and transmit this information through an embedded microcontroller system. The main objective of this study is to design and simulate an autonomous navigation framework that enables the rover to operate independently in agricultural environments and collect soil data without human involvement. Through simulation and prototype trials, the project aims to demonstrate that robotic soil monitoring can serve as a practical, scalable, and cost-effective alternative to traditional methods, helping advance sustainable and data-driven agriculture.

2. Methods and Tools

2.1. System Architecture Overview

The system developed in this project is built on a multi-layered structure to ensure that data is collected, processed, stored, and presented in a coherent and reliable manner. For clarity and consistency, the overall methodology is divided into four interconnected sections, each of which contributes to the final functioning product.

The first part is the hardware layer, where the physical sensing takes place. This includes the soil sensor and the basic components responsible for gathering real-time information from the environment. The second section, the embedded and control layer, handles the initial processing of the collected data and forwards it through the microcontroller and LabVIEW-based logic.

The third segment, the cloud infrastructure, serves as the central hub where all information is synchronized and stored. In this project, Google Firebase was selected to ensure smooth and continuous communication between the device and the user. Finally, the application and intelligence layer encompasses both the machine learning procedures used for analysis and the mobile interface created in Flutter, through which users can easily access the results.

2.2. Hardware Component Selection

  • 7-in-1 NPK Sensor. Used to analyse nitrogen, phosphorus, potassium, humidity, temperature, pH, and electrical conductivity of the soil. It allows farmers to optimise fertilization, irrigation, and soil improvement decisions.
  • MAX485 RS485 Transceiver Module. The NPK sensor supports only Modbus; the MAX485 module converts Modbus to UART for clear communication with the MCU.
  • Firebase. Sensor data is sent to Firebase via IoT and Wi-Fi, enabling transfer between the hardware system and client applications.
  • 17HS3401 NEMA 17 Stepper Motor. Inserts and retracts the NPK sensor into/from the soil when commanded by the MCU.
  • A4988 Stepper Motor Driver. Provides precise and controlled movement with micro-stepping support.
  • DC Motors & L298N Driver. DC motors drive the rover with variable speed; the L298N controls bidirectional movement and speed.
  • ToF Sensors & Multiplexer. Time-of-Flight sensors detect obstacles. Since they share the same I²C address, a multiplexer is used to read them reliably.
  • 3.7 V Li-Ion Batteries. Power the system; a DC-DC converter supplies appropriate voltages to each component.

2.3. Software and ML Development Tools

The software environment of the project is supported by three main components: the embedded development for microcontroller firmware, the machine learning workflow for analytical modelling, and the application layer for user interaction.

Machine Learning for Soil Quality Analysis

A neural network model was built to classify soil fertility into three categories: Good, Moderate, and Poor, using four soil properties—N, P, K, and pH. These parameters are widely used indicators of soil quality and provide sufficient information for meaningful predictions. The data was cleaned and normalised so that all inputs were on a similar scale.

The model includes two hidden layers with 16 neurons each and ReLU activations, followed by a softmax output layer. A dropout layer reduces overfitting. The network is trained using the Adam optimizer and categorical cross-entropy loss. Evaluation shows that the model can clearly distinguish between different fertility levels, with only minor confusion between neighbouring classes.

A key advantage of the model is its simplicity: it can be exported, visualised (e.g. in Netron), and re-implemented manually in environments such as LabVIEW using only basic operations (scaling, multiplication, addition, ReLU, softmax).

Web Interface (Next.js)

For the web interface, a minimal yet expressive dashboard was developed using Next.js, Tailwind CSS, and TypeScript (TSX). The main goal is to provide a clean visual platform where users can observe real-time soil data collected by the autonomous rover without any login or complex setup.

The dashboard connects to the Firebase Realtime Database through its REST endpoint, regularly fetching incoming sensor values from the ESP32. Each soil parameter—N, P, K, moisture, temperature, pH, and electrical conductivity—is displayed using responsive Tailwind-styled cards. The application is intentionally built without authentication, making it easy for students, farmers, and researchers to open it in any browser and immediately monitor field data. The design supports both light and dark modes to remain readable on various devices and lighting conditions.

Mobile Application (Flutter)

The mobile application, which forms the primary interface for end-users, was developed using Flutter due to its cross-platform capabilities and stable UI framework. State management was handled using Provider and Riverpod, ensuring responsive interfaces as real-time data is synchronised from the cloud.

The app integrates Google's Gemini API to provide an AI-powered chatbot that answers agricultural and soil-related questions. Syncfusion Charts visualise sensor readings and machine learning outputs. Together, these tools enabled a functional, intuitive, and user-friendly application tailored to the needs of farmers and field operators.

2.4. Communication Protocols

Sensor-level communication is based on the Modbus RTU protocol, providing a robust method for retrieving NPK, pH, EC, and other parameters from the 7-in-1 module. For cloud synchronisation, the project uses JSON messages transmitted over HTTPS to Google Firebase. The ESP32 communicates through its built-in Wi-Fi module, ensuring seamless interaction between the rover and the cloud database.

Overall, the combination of Modbus-based local communication and encrypted web protocols maintains data integrity across all layers—from field-level sensing to real-time visualisation in the mobile and web applications.

3. Practical Part

3.1. Hardware Framework

An advanced automated system was developed to monitor and optimise soil conditions for agricultural usage. The design integrates sensors, motors, controllers, and power electronics into a single rover platform.

The 7-in-1 NPK sensor provides real-time measurements of N, P, K, humidity, temperature, pH, and electrical conductivity. The MAX485 module converts Modbus to UART for reliable microcontroller communication. Data is pushed to Firebase via Wi-Fi, where it can be accessed by both the mobile application and the web dashboard.

A NEMA 17 stepper motor, driven by an A4988 driver, inserts and retracts the sensor into the soil. DC motors controlled by the L298N driver move the rover across the field. ToF sensors detect obstacles, while a multiplexer resolves I²C address conflicts. The entire system is powered by 3.7 V Li-Ion batteries and a DC-DC converter that provides the correct voltages to each component.

Thanks to this configuration, the rover can navigate autonomously, perform soil sampling, and send all readings to the cloud, where they are visualised and analysed in real time.

3.2. Embedded Programming and LabVIEW Integration

The ESP32 firmware orchestrates sensor reading, motor control, and communication with Firebase. LabVIEW is used to simulate and validate the navigation logic, ensuring safe movement and reliable sampling strategies before deploying to the physical rover.

3.3. Cloud Infrastructure (Firebase)

Firebase serves as the bridge between embedded hardware, machine learning, and client applications. The ESP32 pushes new sensor readings to the Realtime Database, allowing interfaces to update without manual refresh. Historical logs are stored in structured form for long-term analysis. Firebase Authentication is used primarily on the mobile side to keep user-specific data secure.

3.4. Machine Learning Pipeline

The machine learning pipeline processes historical soil measurements, normalises features, trains the neural network, and evaluates its performance. Once validated, the model's parameters can be exported and integrated into other environments, including LabVIEW or edge-side execution.

3.5. Mobile Application Development

The Flutter app continuously reads from Firebase and presents soil data in an accessible format. The built-in Gemini-based chatbot and AI-powered analysis module turn raw measurements into practical recommendations, while a community space enables farmers and specialists to share insights.

3.6. Web Development

The web dashboard, built with Next.js, Tailwind CSS, and TypeScript, offers a clean and responsive interface optimised for both light and dark modes. It consumes the same Firebase Realtime Database through REST, shows live sensor cards, and provides a textual explanation of how data flows from the rover to the cloud. The open, no-auth design makes it suitable for classroom demonstrations and small pilot projects.

4. Conclusion

4.1. Summary of Work and Achievements

The project designed and simulated an autonomous soil-monitoring system that integrates embedded hardware, cloud communication, and intelligent analysis. By combining an ESP32 microcontroller with a 7-in-1 industrial soil sensor, the system can measure NPK, pH, EC, moisture, and temperature in real time. Firebase ensures that field data reaches the user interface with minimal delay, while machine learning provides predictive insights that help farmers make informed decisions.

The Flutter mobile app and the Next.js web dashboard demonstrate how these technologies can support the broader "Smart Farming" vision within the Azerbaijani context [21].

4.2. Observed Results

Simulation and prototype testing confirmed that the rover can automate soil sampling and data transmission, significantly reducing dependence on manual methods. The system reliably distinguishes between different soil conditions, and the navigation logic developed in LabVIEW shows that autonomous in-situ monitoring is feasible in real agricultural environments.

4.3. Future Recommendations

Future work includes integrating RTK-GPS to georeference measurements and generate detailed nutrient maps that can support Variable Rate Technology. Energy autonomy can be improved through solar panels and better battery management. At larger scales, multiple coordinating robots could accelerate field coverage. Finally, extending the rover from a monitoring tool to an active intervention system capable of micro-dosing fertilizer or treating weeds would move towards fully automated agricultural ecosystems.

Overall, the study demonstrates that combining IoT, robotics, and AI leads to practical and scalable solutions for modern farming [22].

5. References

  1. [1] Food and Agriculture Organization (FAO). How to Feed the World in 2050. High-Level Expert Forum Report, 2009.
  2. [2] OECD–FAO. Agricultural Outlook 2010–2019. OECD Publishing, 2010.
  3. [3] Mulla, D. J. "Twenty-five years of remote sensing in precision agriculture." Computers and Electronics in Agriculture, 2013.
  4. [4] Withers, P., et al. "Managing agricultural phosphorus to minimize water quality impacts." Science of the Total Environment, 2014.
  5. [5] Smith, V. "Eutrophication of freshwater ecosystems." Environmental Science & Policy, 2003.
  6. [6] Zhang, Q. Precision Agriculture: Technology and Economic Perspectives. Springer, 2015.
  7. [7] Gebbers, R., Adamchuk, V. "Precision Agriculture and food security." Science, 2010.
  8. [8] World Bank. Azerbaijan Systematic Country Diagnostic Update. World Bank Group, 2022.
  9. [9] Han, Q., et al. "Historical and future soil salinity in the Kura-Araz lowland, Azerbaijan." Agricultural Water Management, 2024.
  10. [10] Gurbanov, E. "Assessment of soil salinity in Azerbaijan using remote sensing." Azerbaijan National Academy of Sciences, 2020.
  11. [11] World Bank. Smart Villages in Azerbaijan: Framework and Roadmap. 2021.
  12. [12] Moral, F., et al. "Soil Sampling Strategies for Precision Agriculture." Agriculture, 2010.
  13. [13] Haboudane, D., et al. "Hyperspectral vegetation indices and their applications." Remote Sensing of Environment, 2004.
  14. [14] Jawad, H., et al. "Wireless sensor networks for precision agriculture: limitations and challenges." IEEE Sensors Journal, 2017.
  15. [15] Karunakaran, C., et al. "Mobile robotic platforms for soil monitoring." Biosystems Engineering, 2019.
  16. [16] Saki, A., et al. "Precision Soil Quality Analysis Using Transformer-Based Data Fusion Strategies." arXiv preprint, 2024.
  17. [17] Parashuram Kambale, D.R., B. M, D. Patil, G.N.R. "Mobile Technology for Farmers: An Overview of Agricultural Apps." Asian Journal of Agricultural Extension, Economics & Sociology, 2024.
  18. [18] P.S. Shehrawat, B. Arulmanikandan, Aditya, S. Bhakar. "Exploring awareness and utilization of agricultural mobile apps among smallholder farmers." International Journal of Agriculture Extension and Social Development, 2024.
  19. [19] Rahman, R., Das, K.N. "Artificial Intelligence and Machine Learning in Soil Analysis for Precision Agriculture: A Review." Journal of Experimental Agriculture International, 2025.
  20. [20] Sondhiya, R.R., Singh, V.K. "Smart Sensing Technologies for Real-Time Monitoring of Soil Health in Precision Agriculture." Journal of Applied Optics, 2024.
  21. [21] Elashmawy, R., Uysal, I. "Precision Agriculture Using Soil Sensor-Driven Machine Learning for Smart Strawberry Production." Sensors, 2023.
  22. [22] Veluru, C.S., et al. "Robotics and Data Science for Smart and Precision Agriculture." Journal of Artificial Intelligence & Cloud Computing, 2024.