DEV Community

Memona
Memona

Posted on

How IoT and Environmental Monitoring Are Changing Modern Agriculture

A soil sensor may provide thousands of measurements in a lifetime, but what does that data mean? How can a developer create value from a set of numbers obtained from somewhere in the real world?

These are great opportunities for IoT and environmental monitoring to make a difference in the agriculture sector. A sensor can measure a variety of soil, water, or environmental conditions before transmitting data over a network to some kind of storage, database, or analysis. This intersection can provide a fertile ground for developers to find their niche.

An Introductory View of an Agricultural IoT System

At a very basic level, a monitoring system can be defined as:

Sensor → Data collection → Connectivity → Storage → Analysis → Decision.

A soil sensor, for instance, may provide information on the contents of the ground at regular intervals. This may be relayed via Bluetooth, WiFi, cellular connection, or other means to a gateway or storage facility, where it can be mined for valuable information.

At any point along the chain, an improvement or change can have a positive impact on the outcome. An accurate measurement device does not guarantee useful information, if the collected data is improperly interpreted or poorly stored.

The Quality of Information from a Sensor

There is no such thing as a perfect measurement. This is especially true for environmental measurements, where conditions are rarely static or predictable.

Sensors may be placed in an environment that affects the reading. A sensor may be poorly mounted or suffer from internal noise, or the condition of the environment (temperature, humidity) may alter the output of the sensor in unpredictable ways.

Developers who wish to build monitoring systems for agricultural purposes would be well-served to consider additional aspects of a sensor:

• What is the ideal sampling rate of the sensor?

• What happens if there is a period of downtime or a sensor stops working?

• How should missing or erroneous values be treated or explained?

• How can anomalous values be explained or removed?

• How often does the sensor require recalibration?

• How do values from multiple sensors compare?

The choice of connectivity option is not the only consideration when it comes to the characteristics of the sensor.

Using Environmental Data for Monitoring and Farming

Let us take a closer look at soil, which is an excellent example of an environmental monitoring system. Based on the purpose of the project, a monitoring system may collect data on:

• Soil moisture

• Temperature

• pH

• Electrical conductivity

• Nutrients

Most modern monitoring equipment can collect multiple sets of information. Some systems are wireless and can relay collected statistics to a monitoring station or database. This type of long-range soil monitoring can be accomplished in applications using LoRaWAN sensors to transmit information on soil moisture, temperature, and other conditions.

Instead of a single measurement, it is possible for developers and farm owners to use a time series of collected values. This can allow the identification of trends, patterns, and other features that might be of interest for agricultural purposes.

Water Monitoring and Other Sensors

Another set of measurable qualities belongs to water. It is possible to measure pH, conductivity, dissolved oxygen, temperature, salinity, TDS, or a combination of these and other parameters. In many cases, these devices can measure multiple variables at once.

As far as the software goes, it becomes a matter of structuring the data so it can be processed, displayed, and studied. An application may record:


timestamp

sensor_id

location

parameter

value

unit

calibration_status

Enter fullscreen mode Exit fullscreen mode

With a standard set of metadata, it becomes much easier to process, filter, and display the results.

Connectivity and Time Series Databases

Traditional lab equipment is used to obtain a single measurement at a particular point in time. Connected devices can do much more. A simple example would be to use a connected sensor to measure the same parameter at different times:

08:00 → Soil moisture: reading

08:10 → Soil moisture: reading

08:20 → Soil moisture: reading

08:30 → Soil moisture: reading

The data can be organized into a time series database.

If there is a collection of values, it may be possible to determine trends and patterns that are not readily apparent at first glance. Wireless monitoring systems can send recorded data to an application or database for processing and storage. In some cases, a farmer might wish to have a gateway to process sensor data before sending it to an application or database.

Sensor Calibration and Validation Should Be Considered

A common mistake among developers is to treat each measurement as valid. This is not the case, however. A system should have a validation step to verify that each measurement is within acceptable parameters and can be used for statistical analysis. There are many ways to store and process time series data with Python.

A measurement pipeline might look like this:

Measurement → Validation → Cleaning → Storage → Analysis

Validation scripts or rules may detect invalid values or ranges, missing values, or other issues. The calibration state of a sensor may be a concern, if its values are not within acceptable limits. At the end of the day, calibration is an important part of any connected system, and cannot be replaced by a fancy dashboard or big data analysis.

Especially if the measurements are used for scientific or agricultural purposes.

The Big Picture of Sensor Development for Agriculture and Farming

More sensors do not always equal more usefulness. Before investing time and money into a system, it is a good idea to establish a set of criteria:

  1. What parameter needs to be measured?

  2. What level of accuracy is needed?

  3. How often do measurements need to be taken?

  4. What will be the placement of the sensors?

  5. What communication options are available?

  6. What happens if there is no connection?

  7. How will measurements be validated and stored?

Depending on the answers to these questions, a project may range from a single local sensor to a large distributed system with data collection, processing, and storage components.

For those interested in exploring the topic further, Agro Enviro Tests is one company that offers agricultural monitoring equipment, services, and solutions. The website includes detailed information on soil and water analysis, environmental monitoring and testing, and precision IoT monitoring systems.

Conclusion

Agriculture is not as simple as plowing, planting, and harvesting. As the industry grows and matures, it requires more outlay of resources, time, and money. It is also subject to the forces of nature, which are largely unpredictable and uncontrollable. Environmental monitoring and IoT can be combined to provide valuable information and control over farming and other agricultural activities.

The chain is simple: sensors collect data, which is then sent over a network, stored, and analyzed. Each step in the process can be optimized and fine-tuned, for best results. The collected statistics can be validated and processed, making it possible to identify patterns, trends, and other features of interest. For developers, agricultural monitoring is an excellent opportunity to combine the skills of programming, networking, and environmental science. This is an extremely advantageous position to be in, as a developer can take on bigger and more ambitious projects, with a greater impact on the environment and the world.

Top comments (0)