{'fraction_non_alphanumeric': 0.015464844452436613, 'fraction_numerical': 0.0029670922495953966, 'mean_word_length': 4.614840989399293, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Autonomous Agriculture Robot for Monitoring Plant using Internet of Things

: Agriculture robot refers to the implementation of modern technology that combines robotics and automation to overcome deficiencies of the traditional agricultural method by automating processes to dramatically increase efficiency. The robot is designed with a fully automated navigation system using line following algorithm with added features to monitor and capture the image of the plant in real-time situations. This project aims to develop a system to monitor the conditions of crops and designing a logic control for line following navigation within the boundaries of modern agriculture. The system will be realized following the process chain starting from the mapping the input from sensors to control the speed and direction of the motor. The user will be able to monitor the plant condition from the image captured through internet of things-based communication between the robot and Blynk application.


INTRODUCTION
Automation is the ideal approach to overcome flaws and substantially increase efficiency by automating daily routines. Robotic and automation is crucial in order to increase agricultural production. The current tendency in agricultural robot development is to create intelligent machines that are able to reduce the costs of the farmer while providing more service and higher quality. Besides, the farmer can perform the development of the robot which capable of performing automated field scouting and monitoring operations. The farmer also can control the robot wirelessly and view the data through internet.
Many mobile robots around the globe are designed to perform a specific work and reach a desired outcome by navigating around indoor environments following predefined strips [1]. Among the multiple techniques and algorithm exist for robot controllers such as fuzzy logic, logic reasoning and PID control [1], [2] offers a good solution to handle environment uncertainties. This paper will also introduce a solution for modern agriculture that helps the farmers to monitor the crop health faster and easier compared to the traditional methods that are used to detect crop diseases which lead to a large amount of pesticides used that could harm the fertile soil [3].
IoT will be implemented to the robot for the plant health surveillance where this method has been rapidly growing with its application in various fields such as remote sensing and machine vision. All the methods and procedures mentioned are considered in designing agricultural robots to monitor the conditions of crops and farms using modern techniques such as image processing using a camera module with the aid of line following algorithm for robot navigation.
The problem of traditional agriculture comes with various limitation such as requires more labor and time consuming depends on various factor (e.g. Weather), manned vehicles or machines pose a risk of injury for the operators and difficult tasks that are harmful to the health of the workers influenced the productivity rates for healthy plant growth.
The main purpose of this project is to build an agriculture robot that able to navigate around the crop autonomously and simultaneously able to communicate with the robot through IoT. This can be achieved by performing the objectives of 1) to develop automatic guided vehicle (AGV) line following robot integrated with IR sensor, 2) to develop the robot's video monitoring and plant image capture using camera module, 3) to communicate between the robot and the robot monitoring software via wi-fi connection.

DESIGN OF AUTONOMOUS ROBOT WITH IOT
This project will introduce the method and algorithm that will be applied for the development of the agriculture robot. Fig. 1 below shows the block diagram of the robot architecture which consists of Raspberry Pi as the main controller. The robot can be remotely monitored and switched 'ON' using the user's mobile phone through Blynk application. Through the app, the user also able to view the video stream from the robot's camera perspective in real-time and received an email containing the plant image captured.

Logic Reasoning For Line Following Robot
For line detection logic, we used two IR Sensors, which consists of IR LED and Photodiode. They are placed in a reflective way i.e. side -by -side so that whenever they come in to proximity of a reflective surface, the light emitted by IR LED will be detected by Photo diode.
The IR Sensors were setup on the line following robot such that the IR Sensors are on the either side of the black line on the floor. An array of five sensors that are optimum for a nice and smooth control. Having 5 sensors, permits a generation of an "error variable" that will help to control the root's position over the line. The input received from the IR sensor are the black line on the floor which differs through the intensity of the colour and the distance between the array of IR sensor and the black line will be sent to the Raspberry Pi.
Then the Raspberry pi will sent out the output instruction to the DC motor for the position and movement of the robot depending on the input from the IR sensor. The speed of the motor will be constant and the direction will vary based on the "error" variable such as,

Robot Image Capture and Video Streaming with
Raspberry Pi Camera Raspberry Pi camera module will be used to capture the plant image and video streaming purposes in real-time situation, more regarding the implementation of surveillance robot using PiCamera module has been discussed in [24]. For users to view streaming video from the raspberry pi, an IP address is required from Raspberry Pi that has connected to the localhost server by typing the command 'ifconfig' in the Raspberry Pi terminal as shown in  Create a web server using HTML script for the video streaming. Access the video streaming web server at the link created in your script and replace the IP address on the link with the one obtained from the Raspberry Pi. The video streaming can be accessed through any device that has a browser and is connected to the same network with your Raspberry Pi. Fig. 4 shows Raspberry Pi video stream on a web server opened using Google Chrome browser. The video streaming can be access through any device that has a browser and an internet connection.

Figure 2. Enable Gmail permissions for external device
The image can be emailed to whatever email address that have been entered in our script. Fig. 6 shows the Python Shell when the email have been successfully sent to the specified email address.

Virtual Controller Using Blynk
Blynk application is used as the virtual controller for the robot where the user able to remotely view the video stream from the PiCamera module through the app in realtime and turn 'ON' and 'OFF' the robot. Other features available in the application includes able to manually capture the plant image and send it to the user's email address and has a start and stop button for the DC motor.

RESULTS AND DISCUSSION
The functionality of the robot was tested on a black line track which also had potted plants placed along the track. The robot can be turned 'ON' and 'OFF' from the Blynk app and the robot will stop when it has completed the track and the plant image are sent to the user's email address. Fig. 8 below illustrates the flowchart of the robot workflow.

Robot Prototype
The chassis of the robot are made out of plywood although originally, the plan was to use acrylic sheet as the chassis to prevent the electronic components from getting wet. But, plywood is enough for prototyping purposes and easier to shape than the acrylic sheets. Figure 6. Prototype of agriculture robot As you can see in Fig. 9, an array of five IR sensors is placed facing downward for it to detect the black line on the floor and PiCamera module which are connected to the Raspberry Pi is attached to a 3-D printed camera holder. For robot movement, two DC motor and a 3A 4V to 16V motor driver is used.

Line Following Navigation
The line following algorithm was successfully implemented into the Raspberry Pi for robot navigation. The controller implemented for the line following algorithm is based on logic sequence in the form of IF_THEN statement. The speed and direction of the DC motor will move in accordance with the input received by the IR sensor array as shown in Table 1.

Plant Video Monitoring and Image Capture
Video streaming widget in Blynk app is used to access the Raspberry Pi video stream web server. The URL address for the web server is " Error! Hyperlink reference not valid. ". It is the same with the one used in the browser except in Blynk, "stream.mjpg" need to be added at the end of the URL address. Therefore, the user will be able to view the video stream through Blynk app in their mobile phone as shown in Fig. 11.  The picture of the plant will be taken manually and sent to the user's email address. The email will also state the date and time when the picture is taken as shown in Fig. 12. Though the image quality is not very high due to low specs of the camera module used being five Megapixel (MP) of resolution only, the plant image is still identifiable. Hence, will be helpful for the user to know the crops condition remotely without physically having to monitor it themselves.

Mobile Blynk Application
The robot uses the Blynk application as its remote controller which has a video streaming features. Fig. 13 shows the Blynk app user interface where it contains three virtual buttons.

Figure 10. Blynk application user interface
The button on the left side of the app is to give digital output of '0' or '1' to the motor driver for it to start or stop the DC motor. The button on the right side of the app also gives out digital output for the user to manually snap a picture from the PiCamera module and the picture will be sent automatically to the user's email address. Finally, the button at the bottom of the app is to turn off the robot system.

CONCLUSION
The logic reasoning for line following robot navigation integrated with IR sensor and IoT application has been successfully implemented into the Raspberry Pi. The robot able to navigate autonomously by following the black line that has been placed around the crops. The video streaming can also be access remotely from the Blynk app with a delay of about two seconds compared to real-time and image of the potted plant are successfully delivered to the user's email address though the image quality is moderate but higher quality image can be achieved by using a camera module with a higher resolution.
The robot can be improved by further research on the controller for the robot navigation by changing the controller to a close loop control such as PID control or fuzzy logic control. Designing an algorithm that will capture image of the crops automatically the moment it detects the plant contributes in making the agriculture robot to be fully autonomous. In future, it is intended to apply this robot to monitor the health of the plants in the greenhouse agricultural area.