Journal of Agricultural Machinery (Dec 2024)
Development and Comparison of Interrupt-Based and Analog-to-Digital Converter Algorithms for Seed Counting in Precision Planters
Abstract
IntroductionImproving field operations through precise spot planting rates depends on the accurate functioning of seed flow sensors within the working rows. Despite the availability of these sensors in the market, achieving measurement precision remains a challenge in their optimal design. Seed flow sensors can be categorized into two primary types: optical and non-optical. Among these, optical sensors—particularly infrared sensors—are gaining popularity among researchers due to their distinct advantages, including simple circuit design, cost-effectiveness, and a strong correlation with seed flow. However, the accuracy of these sensors tends to diminish over time due to dust accumulation from planting operations and the effects of sunlight. In response to these challenges, researchers are actively exploring various solutions, employing diverse approaches such as the development of different algorithms and the utilization of alternative hardware configurations. Each research initiative aims to address specific challenges associated with these sensors, with the overarching goal of facilitating effective commercialization, optimizing resource use, and minimizing waste.Materials and MethodsTwo distinct algorithms, utilizing analog-to-digital converter and interrupt-based methodologies, were meticulously developed and thoroughly evaluated to determine the more effective method for monitoring. Correspondingly, unique circuits were engineered for each algorithm.To enhance the sensitivity of the sensor while simplifying the circuit's complexity and dimensions, the lm324 Op-Amp was used in the interrupt-based sensor circuit. Adjusting sensitivity was made feasible through a multi-turn potentiometer, enabling precise adjustment of the external interrupt within the microcontroller. On the other hand, the analog-to-digital converter-based circuit, without relying on the LM324 chip, provided a more straightforward and quieter configuration.The intricate nature of construction mandated the design of circuits using Altium Designer 17 software, which was then printed onto circuit boards. Both developed circuits featured the deployment of the STM32F103C8T6 microcontroller, renowned for its robust capabilities and cost efficiency.In the interrupt-based algorithm's development, the microcontroller's external interrupt was used, selecting its sensitivity to detect both rising and falling edges. This strategic configuration ensured comprehensive scanning of all receivers by the analog-to-digital converter upon any interruption in the infrared sensors. Given the singular passage of seeds in precision seeding, each pass was counted as a single seed.At the start of the planting operation and upon reaching the end of each planting row, the microcontroller employed a micro-switch to sample the output of the infrared sensor, which were then used to execute further calculations based on those samples. Throughout the planting process, the microcontroller continuously performed sensor scanning and promptly converted the sensor outputs into binary values based on defined thresholds. Then, it counted the seeds based on the predetermined counting thresholds for the number of passes.The efficacy of these developed algorithms and sensors underwent rigorous testing encompassing hybrid corn seeds, popcorn, soybean, and mung bean. The evaluation was conducted on an 11-meter-long conveyor belt platform, tested at three different speeds: 4, 7, and 10 km h-1, through five distinct iterations. This comprehensive evaluation ensured the robustness and reliability of the algorithms across diverse seed types and varying operational conditions.Results and DiscussionTest results indicate that interrupt-based sensors demonstrate impressive seed counting capabilities; however, they may encounter issues such as susceptibility to dust and the need for manual recalibrations. Moreover, these sensors exhibited acceptable performance across various crops, including corn and soybeans. Nonetheless, variations in seed characteristics could affect counting accuracy. Additionally, simultaneous seed passage through the sensor under certain conditions posed challenges, diminishing the sensor's precision. On the other hand, sensors employing analog-to-digital algorithms showed promising performance. They offer enhanced adjustability compared to their interrupt-based counterparts, showcasing adaptability to diverse conditions. In summary, each sensor type has its strengths and weaknesses. Sensors that utilize analog-to-digital converter algorithms may offer superior performance in varied scenarios due to their advanced features and adaptable configurations.ConclusionThis study developed and tested two seed counting algorithms: one based on interruption and the other utilizing an analog-to-digital converter. Both algorithms effectively counted seeds larger in diameter than the distance between adjacent LEDs with remarkable accuracy. However, due to their reliance on infrared optical components, both were susceptible to dust generated during planting operations. The algorithm utilizing the analog-to-digital converter demonstrated a notable advantage. Its ability to adjust the threshold either at the start of planting or at the end of each crop row provided a distinct edge over the interruption-based algorithm. Consequently, the analog-to-digital converter-based algorithm was selected as the superior choice for this research.AcknowledgmentThe authors express appreciation for the financial support provided by the University of Tabriz.
Keywords