SEED COUNTING SYSTEM EVALUATION USING ARDUINO MICROCONTROLLER

The development of automated systems has been highlighted in the most diverse productive sectors, among them, the agricultural sector. These systems aim to optimize activities by increasing operational efficiency and quality of work. In this sense, the present work has the objective of evaluating a prototype developed for seed count in laboratory, using Arduino microcontroller. The prototype of the system for seed counting was built using a dosing mechanism commonly used in electric motor seeders, Arduino Uno, with light dependent resistors and light emitting diodes. To test the prototype, a completely randomized design (CRD) was used in a twofactorial scheme composed of three groups defined according to the number of seeds (500, 1000 and 1500 seeds tested), three speeds of the dosing disc that allowed the distribution in 17, 21 and 32 seeds per second, with 40 repetitions evaluating the seed counting prototype performance in different speeds. The prototype of the bench counter showed a moderate variability of counted seed number within the nine tests and a high precision in the seed count on the distribution speeds of 17 and 21 seeds per second (s up to 1500 seeds tested. Therefore, based on the observed results, the developed prototype presents itself as an excellent tool for counting seeds in laboratory.


Introduction
One of the problems found in the elaboration of experiments in the field of robotics (mechanics/electronics) is the complexity in developing new products, which requires organization, infrastructure and development time.One way to deal with this problem is to use development platforms, which are based on microcontrollers that allow rapid prototyping.These microcontrollers consist of programmable microprocessors that perform specific functions, such as controlling machines and different automations [1].
Arduino is a platform that was built to promote the physical interaction between the environment and the computer using electronic devices in a simple way [2].One of the advantages of using a development platform, such as Arduino, is the ability to control devices, receive, process and store data through a programmable interface, as well as make several modifications during the development of experiments in different areas of knowledge [3].
There are several platforms built for microcontrollers on the market, but Arduino has stood out on the world stage for its ease of programming, versatility and low cost.The platform has already been used in several studies involving data acquisition [4], flow analysis systems [5], technological solutions for atmospheric data research [6], temperature sensors [7], and monitoring of electricity consumption [8].
In researches performed in the agricultural area, the use of electronic equipment such as computers and software have been used to reduce working time and increase experiment precision through their capability in acquiring, handling and processing large amounts of data.The microprocessors applied to these devices are able to operate at high speeds, with expressive memory, storing a large amount of data.Some sensors are also used as instruments that transmit electrical impulses in response to physical stimulation such as pressure, magnetism, heat, light, movement and sound [9].Most equipment using advanced technology (precision machinery) is expensive due to the time required to develop, which makes it difficult for some consumers, producers and/or researchers to acquire it.An example is the systems for counting seeds on existing agricultural machinery on the market, which may be coupled with the seeders to meet the principles of precision agriculture (PA) or benchtop equipment commonly used in seed analysis laboratories.
The need for laboratories to measure the number of seeds refers to analysis of samples and research involving grain yield and evaluation of certain plant characteristics.Often, to facilitate the counting process, the method of determining the average size of a sample is by weighing a known number of seeds.The counting of these seeds is manual and slow, which requires a lot of attention, being subject to errors, and the precision being in the order of 98%.There are few studies on seeds and some found have reference to the work carried out [10].In addition, no published studies were found on assembling a seed counter due to patents and their commercialization.
Due to the high cost of seeds and the lack of studies on the subject, the present work aims to develop and evaluate a prototype with low cost components for counting seeds in laboratory.

Material and methods
The development of the prototype was carried out at the Federal University UniPampa -Itaqui Campus, in the Modeling and Intelligent Systems Laboratory, located in the city of Itaqui, state of Rio Grande do Sul, Brazil.This prototype used a precision dosing mechanism the same mechanism that equips seeding machines.An electric motor that supports up to 12 V DC was used as a power source, and the rotation was controlled by voltage variation, making it possible to work with a considerable variety of speeds of the dosing mechanism through a potentiometer.A driving pipe was built to conduct the seed through the sensors.The dosing disk that equips the dosing mechanism has 90 holes, allowing the release of ninety seeds every turn around.Three voltages were used (7, 9 and 12 volts), obtaining different velocities of the dosing disk allowing the distribution out of 17, 21 and 32 seeds s -1 .To perform the tests, soybean seeds of standard size were used according to the diameter of the holes in the dosing disk.To count the number of seeds, an electronic device consisting of an Arduino Uno was used, which has the function of processing the data obtained by the sensors.A Light Dependent Resistor (LDR) was positioned in front of a Light Emitting Diode (LED) in the driving pipe, so that each individualized seed interfered with the measured value by the LDR, knowing when the seed passage starts and ends, with a digital display to show the total number of seeds counted.
The experiment was carried out using a completely randomized design (CRD) in a two-factorial scheme composed of three groups, defined as a function of the number of seeds (500, 1000 and 1500 seeds), three distribution speeds 17, 21, and 32 seeds s -1 and 40 repetitions, totaling 360 observations.From the statistical analysis, the minimum and maximum values, mean, median, variance, standard deviation (SD), coefficient of variation (CV) and standard error (SE) were calculated.The data were submitted to the Tukey test, at 5% probability, which allows the comparison of means, specifying which treatments differ statistically from the others [11].
For the choice of the best speeds employed in the seed counter according to the number of seeds tested, the following criteria were used: lower coefficients of variation between each speed and number of grains tested, lower coefficients of variation between means and significance greater than 0.05.Statistical analyzes were performed using Microsoft Office Excel®, Statistica 12.0® software [12], and SigmaPlot® software.

Results and discussion
From the data collected, it can be inferred that the number of seeds tested (ST) at different speeds, presented a small amplitude (difference between minimum and maximum values) of the number of seeds counted (494 ≤ 500 ST ≤ 502, 992 ≤ 1000 ST ≤ 1002, 1494 ≤ 1500 ST ≤ 1503).The values of the number of seeds counted are similar to the number of seeds used for the tests (Table 1).Dias et al. [13], observed in a sowing operation using the same dosing mechanism.Speeding up work within certain limits did not significantly reduce the final sowing densities, corroborating with the results found.These values showed homogeneity within each test at the three velocities of distribution (17, 21 and 32 seeds), justifying the low variance and standard deviation, as can be observed in Table 1.
The coefficient of variation represents the variability of the data in relation to the mean and is used in the evaluation of the precision of the method or experiment employed, in which the means must be similar [14].According to the criteria adopted by [15], the coefficient of variation can be classified as low (CV <10%), medium (10% ≥ CV ≤ 20%) and high (CV> 20%).Observing Table 1, the CV in the three speeds of distribution oscillated between 0.05% (1000 ST at of distribution grains 17 s -1) and 0.31% (ST 500 at a speed of distribution of grains 32 s - 1), suggesting moderate variability in the number of seeds counted in the nine tests and high accuracy in the counting up to 1500 grains at the three speeds.
A decrease in the CV is observed as the velocity of the dosing disk increases for both number of seeds tested, imparting a greater tangential velocity.As Jasper et al [16], the increase of the tangential velocity of the disc seed density varies, thus increasing the seed density, which may influence the distribution.In relation to the number of seeds tested, the test with 500 seeds presented a lower CV at velocity of distribution seeds of 21 s -1 (0.19%), while in tests 1000 and 1500 seeds with the lowest values were found in the speed of distribution of 17 seeds s -1.(0.05% and 0.09%, respectively).The highest CV in the three tests with different numbers of seeds was observed distribution of 32 seeds s -1.
Therefore, the counting system was more accurate when used for counting seeds at lower speeds, (17 and 21 seeds s -1 ).This difference between the different coefficients of variation found in the tests with 500, 1000, 1500 seeds can also be explained by the speed with which the seeds exit from the dosing disk of the counter passing through the driving pipe, where they are read.The faster the speed is used, the greater the frequency of seeds passing in the pipe driver, as well as the probability that these seeds may overlap or ricochet against the driving pipe walls, making it difficult to read them and causing an error in the counting and accuracy of the equipment.
The distribution of the number of seeds counted in each of the tests performed, can be visualized in Figure 1.Comparing the seed distribution rates used for each test, the speed of distribution that presented highest frequency of data around the mean was 17 s -1 of 1000 seeds tested, followed by 500 and 1500 seeds tested.
At distribution speeds of 21 and 32 seeds s -1 was greater fluctuation in the number of counted seeds, with more distant average points in 1500 tested seed counts and subsequently 500 and 1000.However, it is important to note that, according to the results obtained, the observed increase in standard deviation and error is relatively small, because even if variation in seed counts occurred from one repetition to another, the difference between them causes a little interference in the accuracy count of these respective speeds.It is consistent with findings of Dias et al [13] in work previously mentioned, they observed elevation in the mean deviations with the increase of seeding speed, consequently of the dosing mechanism.This effect was also observed by Teixeira et al [17], when evaluating the longitudinal distribution of bean seeds, mentioning that with the increase of the disk speed, less time is available for the entrance of the seeds in the holes of the disk plates, which increases the number of seeds not distributed, and more precisely, seeds not counted by the sensor.According to Mikhail & Ackermann [18], the dispersion of the distribution of a sample is an indicator of precision, emphasizing in this way the behavior of the coefficient of variation.From this, we can infer that the seed counter showed excellent performance compatible with the need and rigor required for counting the quantities of seeds and at the three speeds of distribution evaluated.The average number of seeds counted at the three speeds of distribution (17, 21, and 32 seeds s - 1) using 500 seeds tested is 499.44 grains counted and a count variation between means of 0.24% (Table 2).In the tests with 1000 and 1500 seeds, the average is 999.05 and 1499.02seeds consecutively, while the variation between the averages are of 0.14% and 0.11% respectively.The tests performed with the highest number of seeds showed less instability compared to the test with 500 seeds.In this sense, it can be stated that the larger the number of seeds used, the lower the coefficient of variation and the higher the counting accuracy.Considering all the tests, there was a high number of results which did not present significant statistical difference.In the 500 seeds tested, there was no statistically significant difference between the three velocities evaluated.Already for the tests with 1000 and 1500 seeds, no significant difference was observed between the means with velocities of distribution 17 and 21 s -1 seeds, however these same speeds differed significantly (P <0.05) at the rate of distribution of 32 seeds s -1.Thus, the seed counter showed a better performance in the measurement of seeds at dosing disk speeds of 17 and 21 seeds s -1 , with more seeds for pointing lower scores of coefficients of variation between the mean numbers of seeds counted and not statistically different.

Conclusions
The prototype showed a satisfactory performance in counting the seed quantities and in the three speeds of distribution.The highest precision in seed counting was obtained at speeds of 17 and 21 seeds s -1 with the highest number of seeds tested.It was also seen that the seed counter was developed with low-cost and with more easily accessible equipment, could be built and used to reduce the margin of error in experiments that require manual counts of seeds and grains in large quantities, thus optimizing this process.Based on the conclusions of this work, it is possible to integrate the prototype developed with seeders, thus executing counting and monitoring the lines (of the sowing machine itself) in real time, preventing losses, for example due to clogging.

Figura 1 -
Figura 1 -Number of seeds scatter counted from the average in tests with 500, 1000 and 1500 seeds at speeds of distribution 17, 21 and 32 seeds s -1

Table 1 .
Descriptive statistics for the number of seeds counted in the tests with seed number and different speeds.
SD: standard deviation; CV: coefficient of variation; SE: standard error.

Tabela 2 -
Average number of values seeds count at in the tests with number of seeds and speeds.