In this paper, the implementation of SmartFarm AgriTech is done using IoT and cloud computing. The current world population is 7.9 billion and supposed to reach 12 billion by 2050, and it is difficult to feed such population in the future. So, for feeding the entire population, the agriculture sector should be embedded with the latest technologies. People living in urban city will be covered with their work and day to day activities which makes it really difficult to travel the village and monitor their cultivation regularly. Without proper maintenance of farms, it is hard to get the desired results, so using the cloud computing, IOT, networking, and many other technologies, one can easily maintain and monitor the crops, weather, water, and spraying fertilizers whenever needed. This SmartFarm AgriTech System is designed using Raspberry Pi and Arduino as the main microcontrollers to control the various sensors, relay-switch, and motor. AWS and ThingSpeak are used to create server and APIs to collect and store the data through Internet or via a Local Area Network (LAN). In addition to that, a GUI (Graphical User Interface) application is also created to control and monitor the data coming from Raspberry Pi and Arduino board.

1. Introduction

Smart farming is an emerging concept that refers to managing farms using technologies like IOT, robotics, drones, and AI to increase the quantity and quality of products while optimizing the human labor required by production. The Internet of Things has provided not only a way to better measure and control growth factors, like irrigation and fertilizer; on a farm, it will change how we view agriculture in its entirely. This paper discusses what a smart farm is and how the Internet of Things will affect farming in the future. Smart farming focuses on the management of farm activities through the utilisation of data collected from multiple sources (historical, geographical, and instrumental). Being technologically advanced does not always imply that a system is intelligent. Smart systems are distinguished by their capacity to record and interpret data. Hardware (IoT) is used in smart farming to collect data and provide actionable insights to manage all farm operations, both before and after harvest. The data is well-organized, always accessible, and full of information on all aspects of finance and field operations that can be viewed from anywhere in the world.

Some of the technologies that are available for present-day farmers are as follows: (i)Sensors: soil, water, light, humidity, and temperature management(ii)Software: specialized software solutions that target specific farm types or use case agnostic IoT platforms(iii)Connectivity: cellular, LoRa, etc.(iv)Location: GPS, satellite, etc.(v)Robotics: autonomous tractors, processing facilities, etc.(vi)Data analytics: standalone analytics solutions, data pipelines for downstream solutions, etc.

In paper [1], an Intelligent Decision Support System (IDSS) is utilised to monitor crop healthiness, and various sensors are used to collect data from the fields and send it to the Intelligent Decision Support System precisely and immediately. Crop health is monitored with the use of the image processing unit in IDSS, which uses a moisture sensor, a rain sensor, and a light sensor to determine crop moisture status. The goal of the paper [2] is to make use of emerging technology, such as IoT and machine learning. In the proposed work, a farmer takes a snapshot of a plant with a disease and uploads it to the established algorithms, where the farmer can acquire disease information and a solution to the ailment using machine learning. Paper [3] intends to make use of developing technologies, such as the Internet of Things (IoT) and smart agriculture through automation. The suggested framework enables farmers to improve the quality and quantity of their farm production by detecting surrounding temperature and moisture values, soil dampness values, and tank water levels from the field without the need for human intervention. The IOT framework can be more effective if it is used. On the other hand, to protect plants from extreme temperatures, they use a smart system that closes and opens green paper in response to temperature fluctuations.

Ref. [4] is aimed at creating an autonomous crop monitoring system that recognizes the requirement for water and responds accordingly. During severe rains, the system also drains surplus water from the fields so that the plants’ yield is not harmed. Artificial intelligence has also been used in the irrigation system. The plants will be regularly checked for any diseases that threaten the crops, as well as any changes in crop quality, which will be immediately reported to the farmer. We will also be looking for sprouting weeds surrounding the crops. They used an Arduino Yun with built-in Wi-Fi in paper [5] to transfer and analyze data using any IoT platform like as Kaa IoT, Watson IoT, and Cayenne. Using the NetSim simulator and emulator software, they model the design of the whole sensor network used in this project. We obtained various graphs showing throughput of each link from the sensor node up to the monitoring base station, graphs of various parameters like packet transfer, collided packets, payload and overhead transmitted, and battery consumed by each sensor for a specified duration after emulating the designed network design with a field size of 50 m. It is proposed [6] to design, build, and deploy a ZigBee-based wireless sensor network that is connected to a central node and then to a Central Monitoring Station (CMS) through GPRS or GSM technologies. The technology also collects GPS values from the field and feeds them to a Central Monitoring Station. This technology is anticipated to assist farmers in assessing soil conditions and taking appropriate action. This system [7] helps the farmers to monitor the fields and protect and maintain the crops using the approach of Internet of Things (IOT) as well as object detection techniques. The DC Pump is automatically switched ON/OFF by the Raspberry Pi and Relay, based on the soil moisture and the temperature level. Intrusion detection mechanism is used to protect the crop from animal or any theft. This is done by object detection technique which detects the type of animal attack and then notifies the farmer by an SMS and an image sent via mail to the farmer, so we can take the necessary steps to prevent higher extent of damage. The study [8] presents a generic smart cloud-based system to support a variety of scenarios in which agriculture farms using Internet of Things (IoT) need to be remotely monitored. Specialists and farmers examine real-time and archived data. The cloud serves as a central digital data store for audio, video, image, text, and digital maps, which are collected in large quantities and diversity from various sources. To effectively identify the data, machine learning models based on Artificial Intelligence (AI) are utilised, such as the Support Vector Machine (SVM), which is one of many categorization types [9]. The construction of a cloud-based monitoring platform to monitor agricultural resources is discussed in this study. We adopted a minimalist strategy, relying on 4Duino and necessary sensors to transport data to our self-built cloud platform. The variables for monitoring were soil moisture (% volumetric water content), humidity, ambient temperature, dew point, and soil temperature. It is explained how cloud computing can be used in agriculture. This study presents a simple way to improve agricultural resource management by using cloud-based monitoring of related parameters. This work [10] offers Data Files Type Formatting (DFTF), a load balancing approach that combines a modified version of Cat Swarm Optimization (CSO) with SVM. First, the proposed system uses one to many types of SVM classifiers to classify data in the cloud from many sources into various forms, such as text, pictures, video, and audio. The data is then fed into CSO, a modified load balancing algorithm that efficiently distributes the load between virtual machines. The findings of the simulation were compared to existing methods

3. Difference between Traditional and Smart Farming

The differences between traditional and smart farming are discussed as follows: (1)Traditional farming(i)Manually maintaining both field and financial data separately leads to errors(ii)Fertilizers and insecticides are applied across the field(iii)Geo-tagging and identification of zones are not possible(iv)There is no way to predict the weather(2)Smart farming(i)Early diagnosis and application just in the damaged area save money(ii)Each farm is analyzed to determine the best crops and water requirements for optimization(iii)The different zones in farms are detected using camera footage(iv)There are weather forecasting and analysis

4. Problem Statement

The agriculture industry is currently experiencing major changes and is facing significant problems. Climate change, environmental and regulatory concerns, a growing population and more demand for food quality, land degradation, and sustainability are among them. The drawbacks in farming in the old sense include all field upkeep done by hand; applications of fertilizers and pesticides throughout the field are difficult for farmers and common persons. Geo-tagging, weather prediction, and zone detection are not possible. To overcome this, SmartFarm AgriTech system is used.

5. Methodology

Figure 1 shows the basic methodology or concept used in the SmartFarm AgriTech system.

Figure 2 shows the different operations that are performed by SmartFarm AgriTech system.

5.1. Sensor Data Acquisition

From Figure 1, the Raspberry Pi is connected to DHT11 Humidity Temperature Sensor and Soil Moisture Sensor to read, collect, and store the data of external factors like temperature, humidity, and moisture. The real-time data collected from sensors are uploaded to “HTM_DATA” dataset and also fed to SmartFarm AgriTech Application using HTTP protocol over Internet or via Local Area Network (LAN) simultaneously [1115].

5.2. Animals and Unknown Data Recognition

From Figure 1, the CSI (Camera Serial Interface) port of the Raspberry Pi is connected directly to Raspberry Pi High Quality Camera (PiCam). The Dataset is created in Raspberry Pi where User’s frontal face is trained and stored using Python Programming Language and OpenCV module [1618]. The algorithm is developed for the faces stored in Dataset using tensor flow and Keras modules from python such that whenever the unknown persons or animals are recognized the Buzzer receives the oscillating signal from raspberry pi producing sound [1921].

5.3. Cloud Data Computing

From Figure 1, Relay is an electrically operated switch connected to Raspberry Pi which is initially at Normally Open (the circuit is always open and does not conduct electricity unless user send a signal from Raspberry Pi to relay switch) configuration. User operates the relay switch with the help of server/cloud created using AWS (Amazon Web Services). Once the relay switch receives the signal from Raspberry Pi through AWS cloud computing technique, it starts conducting electricity to Generator. From Generator, water gets pumped to Farm Land through Drip Irrigation System [2224]. Trickle irrigation is a cost-effective method of conserving water and nutrients by allowing water to drip gently to the plant’s roots. The interface between Raspberry Pi and Arduino board is made to display the uploaded sensors data and to operate the Fertilizer and Pesticides Tank. 5-11% of organic natural fertilizers and pesticides (for example, Jeevamrutham organic fertilizer) mixed with correct quantity of water is stored in Fertilizers and Pesticides Tank. The user operates the motor driver by sending the signal to raspberry pi through the server that was created using Amazon Web Services (AWS), which drives the Servo motor from 0° to 180° opening the Fertilizers and Pesticides Tank to the Farm. According to the growth of the crops and convenience, User can ON the Tank to spray the fertilizers to Agricultural Land for irrigation once at an interval of 7-15 days.

6. System Architecture and Working

The circuit diagram used in the system is shown in Figure 3, where the Raspberry pi, Arduino, Relay, Camera, sensors, buzzer, motor driver, and motor are connected using jumpers and connecting wires.

A “sensor data” dataset/directory is created in the Raspberry Pi in which the humidity, temperature, and moisture readings from sensors are stored in the format of .csv (comma separated values) file. For one minute, one data of each is uploaded to csv file, named as “Sensordatas_date.csv.” Similarly, for one day, 1440 humidity, temperature, and moisture readings are uploaded to csv file. Exactly at 12:00 am or 24:00 o’clock, the code snippet is written to find the maximum and minimum values from the Sensordatas_date.csv file and to reset the csv file [5, 6, 25]. The maximum and minimum values are now uploaded in another csv file called “humidtempmoist_date.csv” file and stored in “HTM_DATA” dataset.

The above Procedure repeats daily to store the maximum and minimum data from the sensors into “HTM_DATA” dataset. SmartFarm AgriTech Application is a Graphical User Interface (GUI) application created using Tkinter Module and Python3 which is simple and user-friendly application shown in Figure 4. This application enables the user to visualize and analyze the real-time data coming from Raspberry Pi with the help of ThingSpeak Application Programming Interface (API). The ThingSpeak API is the messenger that delivers the HTTP Request from the GUI application to the Raspberry Pi requesting sensor’s data [26]. Once the Raspberry Pi receives the request from the GUI application, it delivers the HTTP Response back to the AgriTech Application sending sensor’s data.

The output of the soil moisture sensor is in the range of 0 to 1023 ADC values. The percentage of soil moisture is calculated from the ADC value in GUI Application using the following formulas: (i)(ii)

According to Figure 5, the instructions are displayed to the user through GUI Application such that whenever the moisture percentage is greater than 51.1241% it instructs the user to OFF the water supply by pressing the OFF button in the app, similarly for less than 26.6862% Application instructs the user to ON the water supply for irrigation purpose [27]. In-between 26.6862% and 51.1241% soil moisture is moderate, and there is no need to do any operations for water supply.

Amazon Web Services (AWS) is an Amazon company that offers cloud computing platforms, APIs, and other services on demand. The Amazon Web Services Internet of Things (AWS IoT) is one of the services provided by the AWS which enables the bidirectional communication between the Smart Farm AgriTech System and AWS cloud [28]. The MQTT protocol is configured on AWS IOT to establish the connection between the Raspberry Pi and the Agritech Application for controlling motor and the relay-switch as shown in Figure 6.

The sample image of the animal recognition is displayed in the recognition section of the GUI application whenever the user updates the app. Similarly, a graph of temperature over the time is displayed in the graph section on the app for the user to analyze the temperature curves.

7. Results and Discussion

Figure 7 shows the sample images of animal and unknown person detection using animal recognition algorithm python.

Figure 8 shows the sample image of the “Sensordatas_2021-06-03.csv” file which is the real-time data of temperature, humidity, and moisture readings from the sensors. From the “Sensordatas_2021-06-03.csv” file, the maximum and minimum values are calculated and stored in the “humidtempmoist_2021-06-03.csv” file showed in Figure 9.

Figure 10 shows the sample image of SmartFarm AgriTech Application which is designed using Tkinter Module Python for visualizing the sensor’s data and for controlling the water supply.

8. Conclusion

Smart Farming avoids excessive irrigation, under irrigation, and soil erosion and reduces water wastage. It allows farms to be easily maintained, resulting in reduced waste owing to customised procedures that account for accurate resource application and hence lower production costs. The main advantage is that the action of the system can be changed depending on the situation (plants, climate, soil, etc.). Hence, crop output is increased by optimising and continuously monitoring inputs.

Data Availability

The data used to support the findings of this study are included within the article.

Conflicts of Interest

The authors declare that there are no conflicts of interest regarding the publication of this paper.