An Autonomous Pesticide Sprayer Robot with a Color-based Vision System

a Agricultural Engineering Research Department, Markazi Agricultural and Natural Resources Research and Education Center, Agricultural Research, Education and Extension, Organization (AREEO), Arak, 3818385149, Iran b Department of Solid Mechanics, Faculty of Mechanical Engineering, Arak University of Technology, Arak, 3818146763, Iran 1 tahmasebi.mona@gmail.com; 2 moh-gohari@arakut.ac.ir; 3 alireza.e.aut@gmail.com * Corresponding Author: Mona Tahmasebi


Introduction
For many years' robotic systems have been widely employed for industrial production and in warehouses. In horticulture and agriculture, research and projects on automatic driverless vehicles and autonomous tractors started in the early 1960s. In recent decades, robotic systems in agriculture have been developed, and researchers were combined new sensor systems, positioning systems (GPS), geographical information systems (GIS), and communication technologies to develop atomized autonomous systems.
Normally, the farmers use pesticides to remove weeds, fungi, or pests by spraying chemicals on the farmyards. By this operation, plant diseases are controlled, and crop yields are improved. A notable issue is using chemical pesticides maybe threaten the environment due to overdose using of pesticides. On the other hand, spraying the pesticide is harmful to the operator [1]. So, it is needed to find a way to control the amount of sprayed chemicals as much as required. Also, it is without human power is much desired. Robots are the best solution for this problem because they can work autonomously with acceptable accuracy [2][3][4]. By this approach, robots can detect weeds on the ground and spray them with pesticides with minimum human supervising for a long time. Consequently, cost reduction environmental and human safety is reached by robotizing this operation [5].
Machine vision tools are used in robots for many applications, such as assembling robots in industry or rescue robots. Color sensors and image processing cameras are developed for this purpose. Also, in precision agriculture, machine vision and image processing are applied vastly. Via this technology, robots can measure moist content, micro and macro elements, fertilizers, and weeds on the soil or subsoil. Thus, geospatial management of inputs will be possible while human labor is reduced [6] [7]. Moreover, in the greenhouses, autonomous pesticide robots are interested in researchers because of the cost reduction of this operation [8][9][10][11][12]. In addition to cost reduction, the application of robots in this field helps to keep clean the environment of the greenhouse without human operators [13][14][15].
Using artificial intelligence in the wheeled mobile robot made it smart for following paths in pesticide spraying with minimum error [16][17][18][19][20]. Also, some other types of robots are employed to spray chemicals on the tree or farmyard. For example, a tree-climbing robot is presented to spread chemicals on leave efficiently [21][22][23][24]. Another type of robot which is utilized in spraying pesticides is the drone. They can fly over the crops and spray continually, but control the dose of chemicals based on the Geo-referenced map did not report by this method [25][26][27][28][29][30][31][32].
By reviewing various researches were presented in this area, a combination color sensor with the mobile robot can be proper for pesticide spraying autonomously and make it more effective. In this paper, a test rig robot was developed which can detect weeds between planting rows by color sensor and spraying them automatically. In fact, the research contribution is the design and fabrication of a mobile robot to remove weeds by chemical spraying autonomously.

Structure of Robot
The proposed system includes some subsystems such as the control unit, color sensor, ultrasonic sensor, trolley module, and spray module. An ultrasonic sensor was used for measuring the distance to the object and finding the pathway. A TCS 3200 module is utilized as a color detector connected to a Micro-Arduino. This module can identify various colors by RGB filter with non-linearity error typically 0.2% at 50 kHz. A program was developed to identify green colors for detecting weeds on the ground surface. A system control unit is an Arduino module to send spray command to sprayer module and control trajectory based on received signals from the ultrasonic sensor. Fig. 1 illustrates the block diagram of components and their connections in this robot. The TCS 3200 module is packed in a case with Arduino micro, and it is unveiled in Fig. 2.
The trolley module includes two electric motors which can drive four wheels via gearboxes. Thus, proper traction is available for motion on the ground. In addition, it can follow trajectory with steering commands. Ultrasonic module SRF05 can measure 4.5m by 2mm accuracy. The assembled trolley and ultrasonic module are shown in Fig. 3. A column is mounted on the trolley chassis to use as a color detector stand (Fig. 4).   The spray module includes a nozzle, solenoid valve, chemicals tank, and connection pipe. The chemical tank is charged by air pressure. The solenoid valve can be on and off by an electrical signal from Arduino. Therefore, it can spray chemicals on the weeds when a color detector identifies weeds on the ground. Kinematic and dynamic models of a robot are necessary for control of that. Consequently, in the following, these two models will be described.

Kinematics Model
In kinematics modeling of the wheeled robot [33] [34], for explanations, three assumptions had been considered in robot: 1-All of the robot parts, particularly wheels, are solids.
2-Robot travels on a flat, smooth, and non-deformable surface.

3-Wheels have rolling motion without skidding or slippage
The mobile robot location on the field is exemplified in Fig. 5. The rotation angle of wheels, ( ), produces movement and heading (direction of motion) in the robot body. The robot position, which is shown by ( , , ), is resting on ( ). The rotation angle of the right wheel and left wheel are denoted by 1, 2, respectively. The robot linear velocity can be reached by: Which, 1 and 2 are the angular velocity of wheels, respectively. Furthermore, is the radius of the wheel. The robot heading and center position can be found by the following equations: ̇= ( sin ( 1 + 2 ))/2 (3)

Fig. 5. Location and heading of robot in movement space
Lastly, the kinematics model of the robot is attained as:

Dynamics Model
Commonly, in the dynamics model, the required torque for moving to the desired position will be calculated. Fig. 6 demonstrates the free body diagram of the robot wheel, which is exposed to moment Thus, the control board produces proper voltage for electrical motors on wheels to follow the planned trajectory. To evaluation of the robot performance, two tests were conducted. The first test is the measurement accuracy of the color detector to find green objects on the ground, which is called an indoor test. The second test, called outdoor, is the evaluation of performance in the field.
In the indoor test, green papers with various areas are installed on the white background randomly, as illustrated in Fig. 7. The area of green papers is between 0.5 cm2 to 10 cm2. The ability of the robot to detect green targets was checked. Also, this experiment repeated the height of the detector from 4cm to 22 cm. Actually, the relationship between the height of the detector and the area of the green target is studied. In the outdoor test, the robot was moved between plant rows. The identified weeds were accounted for, and the area of leaves was measured. Same as the indoor test, the percentage of detected weeds were accounted for, and the relationship between the area and height of the detector was studied. The outdoor test is depicted in Fig. 8.

Results and Discussion
The results of the indoor test showed that the robot could identify green papers 16 numbers from 20 green papers. Thus, its ability to detect green targets is over 80 percent. Also, the minimum area can be detected by this system is 9 cm2. Fig. 9 illustrates the relationship between the height of the detector and the area of green paper. As expected, there is a linear relationship between area and height. In other words, by increasing the area of the green target, detecting will be easier. Through the outdoor test, the minimum area of weeds identified by the robot is 12 cm2. Moreover, 72 percent of weeds were detected via the robot. Thus, in real conditions, the performance of the robot in identifying green weeds decreased. Perhaps it is due to differences of light and contrast between soil color and weed color.

Conclusion
To decrease the negative overdose of chemical spreading on the agriculture crops, a wheeled robot was equipped to detect a color system to identify weeds between crop rows in the farmyard and spray them. The trajectory of the proposed robot was controlled by ultrasonic radar based on kinematic and dynamic models. The results of indoor and outdoor tests show that the accuracy of the robot in detecting green weeds is acceptable though it decreased in the outdoor test. Thus, this proposed sprayer robot can be developed and employed in the farm for pesticide operation. In future work, this robot will be implemented by a GPS system for more accurate navigation.
Author Contribution: All authors contributed equally to the main contributor to this paper. All authors read and approved the final paper.
Funding: This research received no external funding.

Conflicts of Interest:
The authors declare no conflict of interest.