đŸŒ”

Smart Agriculture OG1

Submitted in GSF - 2018
 

Summary

I wanted to solve the three main problems which I discovered in some farms and parks :
  1. The plants are not properly and timely watered, or sometimes there is overwatering
  1. Many plants are affected by diseases which destroy the plants before they can be identified and treated.
  1. In India, many people own lands in their villages, but they live in cities and are not present to look after it.
Thus, I wanted to design a robot, which can solve all of the above problems at once. This robot could thus report the statistics of the field like temperature and humidity and the conditions of the plants and also detect the diseases in advance so that appropriate dose of fertilizer can be given. With the record of Soil and Ambient Temperature and Humidity, we can calculate the amount of water the plants will require and thus control the irrigation system automatically.
To investigate further and in order to test my solution, I went to near by parks to test the robot out. It could accurately predict the diseases in some of the test images. The robot could move around in a specific area and also measured the weather phenomenon and it could accurately trigger the water pump based on the different water content in the soil. All the real-time stats and the plant status are updated to the cloud and notified if the results are not in the given parameters.
Project Video
Very soon, I plan to add a proper GPS system, with waypoint algorithm so that the robot can move automatically.

Question / Proposal

Objective: Make Agriculture Smart.
Smart Agriculture is a project to make farming and gardening more smart and effective. When I was out for a vacation in Thailand last summer. I was disappointed as my lemon, mango and other plants at home had drooped down due to improper watering. The other thing I observed was over watering of plants in some gardens. One of the two mango trees died, which may be due to an unidentified disease at that time. There are not only issues of field watering but also of monitoring of the farm. This struck my mind to make a project which could solve these problems.
Across the globe, fires destroy large tracts of lands. Detecting these fires is also another goal which can be met with my robot.
To make an All-In-One product which can solve all these problems I thought of making a Robot which can move around and collect data, detect plant diseases and monitor the farms. The alerts will be immediately notified.
There is a lack of an effective and economical solution in this field:
This motivated me to make an Agro-bot mesh network which can:
  • Detect Plant diseases in realtime by the robot moving around and applying filters using machine learning
  • Report all the data about the weather and the soil condition on the owner's smartphone and a local display system.
  • Analyse the soil conditions and irrigate according to its requirements.

Research

I investigated this problem by visiting various parks and checking the health of the plants and the soil moisture content. Some of the plants had puddles of water while some were completely dry.
I also planned to add plant disease detection using Image processing as many farmers do not know the disease and how it can be cured (like by adding proper fertilizers). I searched and found out that some cancers are caused by the consumption of food treated by fertilizers and pesticides. This left me thinking if we can make a large-sized rugged robot which can release the fertilizer directly to the soil of the infected plant.
There are a lot of projects which take the weather readings and are connected to the cloud. There are also devices which water the plants automatically. There is some progress in the field of detecting plant diseases with image recognition. Governments and institutions are giving some pre-trained models to make your project on. But all of this has some disadvantages.
In a huge field, it is impractical to check the soil data at one place only and there is also no use of just sending the data to the cloud until it is properly structured and useful to the perceptive farmers. There are presently no solutions which are very economical and accurate in doing its work. So, I decided to make a combination of all of this which is reliable.
I started searching the ways in which we can cover up the area. I found out that deploying 5-10 robots is not a great idea as you need stationary devices at different places to measure soil conditions. So I decided to use only 1 robot with many nodes all integrated together.
Then, I searched on ways we can detect plant diseases except using ML, but there turned out to be none. Now, I had to find datasets on which I can train my model. It turned out to be very easy as there were ready-made recipes available. Now came the coding, I could easily code the microcontrollers to act in mesh or whatever, but the problem was coding RPi to detect diseases. So, I searched about ML tutorials and found a lot of them. So detecting diseases became like just changing the dataset and we are good to go.

Method / Testing and Redesign

I had to solve three Main problems, but all in just one solution.
I had these challenges:
  • To create a system that can monitor and control a vast area (hectares of land)
  • All the data is secure and can be accessed from anywhere in the world.
  • To make the system very economical yet effective at solving its problems
  • All of the data should move smoothly and not crash with one-another, not giving a contradictory result
So, to make an all in one system, I decided to use the concept of many nodes and a central server.
The Robot:
The robot consists of sensors for measuring Air Temperature, Humidity and Pressure (BME 280) and a Multichannel Gas sensor to check the purity of air and detect anything burning. The robot will navigate itself (currently under development) through the fields and there will be a camera on a pole, which captures images of the plants. There is a SOC (RPi 3B+) that does all the image processing and acts as a server for all the data to flow smoothly. It will have a cellular shield which pumps that data to the cloud.
The SOC:
The Raspberry Pi is running node-red to handle the incoming and outgoing requests. Node-Red is particularly good as it provides a library for FireBase DB Storage, which can be very easily used to store all the data from the nodes.
The image processing is being done the Tensorflow Library and Open CV. Since I am particularly not good at coding in Python (which is preferred for TF) some of the code is adopted and modified from open source repositories.
The Nodes:
The "Nodes" are simple microcontrollers currently using WiFi (or any other RF) to create a mesh network.
The sensor nodes have a soil moisture sensor ( capacitive one ) and a soil temperature sensor connected to the microcontroller. The microcontroller reads the data and then sends it to the main central server.
The Actuator nodes are the nodes which control the irrigation system. They are connected to the central server and wait for the command to operate the system.
Testing:
To make the project I coded the microcontrollers on my PC and did initial testing at my home. For the real world test, I took it to a few parks and checked out the results there. It could easily communicate with each other (just over on WiFi)  at a distance of almost 150m which will increase drastically on the implementation of RF.
When I tested the project first, I was using a standard soil moisture sensor like this:
notion image
As sensor stayed in moist conditions the iron layer slightly oxidises and thus there is a need for continuous adjustments. to solve that I replaced it with a capacitive soil moisture sensor which has no metal exposed. The traditional sensors are based on the concept of resistance of the soil and they use voltage diference to detect the moisture, corroding the electrodes, whereas, the capacitive one detect changing capacitance as the moisture level changes in the soil.
notion image
Capacitive soil moisture sensor.
I had to change many components which would fit my requirements.

Results

My outcome supports my concept.
These are the results of the main problems (solved) :
  • The robot could easily establish a mesh network with the nodes (only 2 at the time of testing) and communicate with them
  • The robot is able to detect soil conditions and supply the required amount of water, without any wastage
  • It can (currently) take the pictures of the fields and store it on a local server.
  • It can detect the plant diseases in real time and analyse them (need to add a high-quality 2M full RGB camera, as current is B&W. But the image processing works - by taking a picture manually and adding that to the RPi)
  • With the use of sensors (BME280, Multichannel Gas Sensor, capacitive moisture sensor and DS18B20 - all very accurate) I could measure the surroundings. The microcontrollers (ESP8266 - WiFi enabled microcontroller) did serve my purpose as nodes.
  • All the data was sent to my smartphone anywhere in the world with the use of the IOT tech.
The water pump turned on only one time over a period of two days of continuous testing in my garden in winter.
The temperature was accurate to ±1 °C and it could easily detect dry soil and turn on the water pump. As of for the plant disease detection, since a good RGB camera was not present with me I couldn't do a real-world test. But after taking the picture of an infected plant and feeding it into the tensor, it could detect the disease with an accuracy of almost 92 %. It would also not detect uninfected plants and gave an appropriate (84% accuracy) output.
The RPi could detect all the diseases in the test images of the plants. The image dataset consisted of almost 50K images out of which I used a dataset which was small in size present on the public domain. I segregate the images from a video consisting of different plans affected with the same disease. The Machine Learning algorithm could detect all the diseases with an accuracy of over 85 %, which is quite good for a small SOC detecting in real-time. The Tensorflow library also helped me to make the code much simpler.
notion image
Disease being detected in a test image.
I am getting the images of the diseased plants on my mailbox, but the location is not being sent. With a high-quality GPS module, that can be solved making it easy to create a farm health grid like this:-
notion image
The robot could also detect my "test" fires I created, sending alerts to my smartphone.
The current app is a web app, optimised for smartphones to view with all the data. The web app can be accessed on any device making it very helpful and there is no need to download any application to check your plants. But still, the web app can send you proper notifications.
Here is the preview of my web app:
notion image
Thus, my multipurpose robot could solve all these problems and provide a solution to many people who are not available at their farms.

Conclusion

The whole project worked and it is a right step in the direction of making everything smart!
My project could detect the fires, monitor the fields, water the plants and detect diseases.
My project clearly supports my hypothesis. The problems could be solved. The entire system was very economical, the robot can be made under â‚č5000 and the nodes under â‚č100 per node.
I would like to make the robot more robust and make it such that it can hold some fertilizer content. So that, if it detects a disease due to deficiency of say, nitrogen; then it can give the fertilizer directly to the plant in the right amount.
I would also enhance my automatic navigation system, by using a GPS module and Waypoint algorithm which can be very accurate. So a robot can move larger distances accurately reducing the need of the nodes. I would also add Deep Learning with the existing the ML & IR so that the dataset improves itself over time.
My experiment was quite successful to the extent that with the implementation of this technology, everyone from the farmer, to the owner and even the consumers are benefitted. The farmers did not need to worry about irrigating the fields and looking after plant health; The owner can trust the cloud to get the real-time stats anywhere in the world and we consumers can get non-toxic food.
The project can really change the way the current farming takes place, this simple project tells that how smart and automated the farming industry and other industries (steel, petroleum) will become in the near future.

About me

I am Vimarsh, a 14-year-old student who loves learning about how things work. I live in Ahmedabad, India.
As a child, I was always curious about how those remote controlled cars work, and thus after it breaks I would collect its motors and the damaged circuitry and would keep it in a box, which I have preserved till day. Even now, I would wait for my little brother to break his cars and I would extract useful parts from it and utilize them in my projects.
I would always use to love building stuff, but the spirit of coding and making our own projects from ground level came into me two years back, when there was a little robotics workshop in our school. I liked the microcontrollers (which I heard for the first time there) so much, that i just started making new projects with the board they had provided me.
I always wanted to make projects that can help people in many ways. Last winter I and my friend made a simple and very economical plant watering system, and presented it in MakerFest and people liked it a lot. Some of the farmers who visited the exhibition wanted that to be implemented in their fields right away. This encouraged my spirit of building simple but useful stuff.
In the future too, I would like to make projects that can help people and those on developing sustainable energy.

Health & Safety

While working at my home; I just took care to be careful with tools like Soldering Iron.
All of the other things were quite safe as the robot operated under 12V DC. The project is quite safe, with the handling of Lithium batteries safely..

Bibliography, references, and acknowledgements

I would like to thank my parents for giving me full support for making this project. They have stood by my side and have helped me a lot in making this project.
I would like to thank my teachers who have guided me through this whole process and helping me understand some of the problems related to the topics, which can be solved with the tech.
Details about the damage done to crops:
https://www.nasa.gov/image-feature/goddard/agricultural-fires-and-smoke-from-wheat-crops-in-india
https://www.growingproduce.com/vegetables/years-wildfires-impacting-specialty-crops/
Classes provided and pretrained models:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6124392/
//test images for detecting diseases also taken from here
Code for detecting diseases adopted from:
https://www.hackster.io/teamato/farmaid-plant-disease-detection-robot-55eeb1
http://www.ijsrp.org/research-paper-0216/ijsrp-p5011.pdf
Cancer articles from:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3068045/
https://www.onlymyhealth.com/rise-in-cancer-cases-due-chemical-fertilisers-1342549825
Projects relating the idea:
https://www.sciencedirect.com/science/article/pii/S1877050916315216
 
MakerFaire Bay Area Entry: on the website