Inspiration

There are many issues facing agriculture today, from inefficient use of water, to unpredictable weather, to monitoring one's crops, and to animals. We believe there is great room for improvement within our agricultural industry, and with smart systems, we can help with that.

Inspired by the internet of things and the power of ai, we have proposed the AgriGuardian AI, a smart monitoring, automation and RFID based livestock identifying system, which seeks to improve our farms and the safety and efficiency with which we perform agricultural operations, whilst providing the needed information for smarter decisions within the industry.

What it does

The AgriGuardian AI is an all-in-one platform for agricultural monitoring, automation and RFID based livestock identification.

It provides smart irrigation, which monitors soil moisture and water-tank levels and can be setup to irrigate based off the desired level, for example: irrigation can be turned on whenever soil moisture is lower than a desired threshold, (M < M_{\text{min}}).

The system can also monitor the environment for temperature and humidity to aid in the observation of agricultural conditions.

Additionally, grain storage can be monitored and ventilated, based off temperature and gas levels, all controlled through desired thresholds.

The system has built in protection for low water levels and maximum pump runtime to help prevent unsafe operation of the pump. This allows for the pump to be shut off whenever the water-level is below a certain point, (W < W_{\text{min}}).

Additionally, the system has RFID based livestock identification, which allows for livestock to be identified by their RFID tag, and associating the scanned tag with their digital information.

The system has a web dashboard, that displays all the information collected by the sensors, and the state of equipment. All of the system's telemetry and RFID scanning are uploaded to a cloud backend for remote access to the information.

By implementing all of these features, we seek to provide a way to make farms safer and more efficient.

How we built it

We have built the AgriGuardian AI with an ESP32 microcontroller as the master controller, which implements a number of sensors, actuators, identification tools and more.

Hardware and sensing: The system uses soil-moisture sensors, a water-level sensor, DHT22, DS18B20, MQ-2, relay modules, a water pump, a ventilation fan, and an RC522 RFID reader.

The embedded microcontroller gathers the sensor telemetry and implements control laws to turn on the pump or storage fan based off user input. The system implements safety measures to control the pump or fan, such as low-tank protection and maximum-pump-runtime.

A normalized soil-moisture reading can be calculated using the readings from the sensor when on dry soil, (S_{\text{dry}}), and wet soil, (S_{\text{wet}}), and applying it to the current reading, (S_{\text{current}}):

$$ M = \frac{S_{\text{dry}}-S_{\text{current}}} {S_{\text{dry}}-S_{\text{wet}}}\times 100\% $$

It is assumed in this case then that the sensor reading decreases with higher moisture levels. If it is the other way around, this equation must be adjusted, along with constraining the value between the valid range of (0\%) to (100\%).

The system implements safety measures, such that the pump only runs when the desired control laws are satisfied. A maximum runtime can be represented as:

$$ t_{\text{pump}} \leq t_{\text{max}} $$

Where (t_{\text{pump}}) is the pump's continuous runtime, and (t_{\text{max}}) is the maximum allowed.

The system includes a web dashboard, which is used to display the data collected by the sensors and the state of equipment.

A cloud backend receives the system's telemetry and RFID scans and is used to connect the hardware and web platform.

Livestock records are associated with RFID scans to help provide a digital record for each scanned animal.

Together, this all makes up a modular IoT based agricultural monitoring and assist platform.

Challenges we ran into

We faced a number of challenges when building this project:

  • Calibrating the sensors to provide a meaningful percentage reading.
  • Troubleshooting sensor faults and inaccurate readings.
  • Connecting all the sensors and actuators to the point where they do not impede the functionality of other components.
  • Implementing protection measures, like low-water level protection, and maximum pump-runtime to reduce the possibility of dangerous operation of the pump.
  • Making sure the connection between the ESP32 and the cloud backend is stable enough.
  • Connecting RFID scans to the dashboard and the livestock records.
  • Making sure communication is stable between the embedded hardware, the backend, and the web interface.

These challenges had to be tackled to bring the project to completion, and required extensive debugging and testing.

Accomplishments that we're proud of

We are proud of being able to come together various agricultural sensing and management tools into an all-in-one platform.

We have accomplished:

  • Bringing various agricultural sensors together into the system.
  • Implementing automated irrigation and storage fan control, through thresholds and safety measures.
  • Implementing a web dashboard, for displaying the state of the system.
  • Implementing a backend, that receives the system's telemetry, and RFID tags.
  • Adding RFID based livestock identification and records to the system's capabilities.
  • Making the system modular, such that it can be expanded to allow for more sensors, monitoring, and even AI based tools.

We believe these accomplishments show that embedded systems, IoT, cloud and web applications can be combined together for great results.

What we learned

Through this project we have gained a lot of insights into the ways embedded hardware, IoT sensors, cloud and web applications can come together to solve real world problems.

We have learned the importance of calibration, and data validation, especially when it comes to sensors that have a say in the action of other components. We have also learned a lot about actuator and RFID safety, API connections, cloud deployment, and troubleshooting hardware and software compatibility.

For example, the conversion of raw sensor readings to percentages requires calibration. The action taken when certain states are reached, is determined by comparing the readings to thresholds. For example, a basic irrigation decision can be represented as:

$$ \text{Pump} = \begin{cases} 1, & M < M_{\text{min}} \text{ and } W \geq W_{\text{min}}\ 0, & \text{otherwise} \end{cases} $$

Where (1) means the pump is turned on, and (0) means it is off. This is a very basic implementation of a controller, and the actual controller would have to also implement the aforementioned maximum-runtime and other safety measures.

Another thing that we've learned is that proper automation is not just about collecting data, but implementing proper rules, ensuring no faults take place, ensuring proper communication takes place, and taking all the needed safety measures. This has helped us grow not only our engineering skills, but our approach to real world problems.

What's next for AgriGuardian AI

We plan on developing AgriGuardian AI further by making it more reliable, adding more features, and testing it out in the fields to see how well it does.

Our future goals for this project are as follows:

  • End-to-end RFID testing, that would allow us to verify that livestock tagging and scanning is accurate and that it gets matched up with the right digital profiles.
  • Improving sensor reliability and accuracy.
  • Adding in weather data to help support irrigation decisions.
  • AI driven suggestions for irrigation and grain storage, based off the collected data, sensor values and other relevant factors.
  • Implementing farmer approvals for certain actions, and verifying that the actions have been carried out.
  • Expanding livestock records and history.
  • Enforcing safer communications to the cloud, and enabling remote notifications and alerts for important events and errors.
  • Testing the product in the fields, to make sure it is up to standard, and iteratively improving upon it.

We hope to eventually bring out a reliable and smart platform for the agricultural industry, that helps farmers monitor their farms, make better decisions, and perform operations in a smarter and safer way.

Built With

  • agricultural-technology
  • api-integration
  • automation
  • c++
  • cloud-backend
  • cloud-telemetry
  • dht22
  • ds18b20
  • embedded-systems
  • environmental-monitoring
  • esp32
  • grain-storage-monitoring
  • hardware
  • iot
  • livestock-management
  • mq-2-gas-sensor
  • rc522-rfid-reader
  • relay-modules
  • rfid
  • sensor-monitoring
  • smart-agriculture
  • smart-irrigation
  • soil-moisture-sensor
  • water-level-sensor
  • web-dashboard
Share this project:

Updates

Submission history