The present work was carried out at the Department of Instrumentation and Control Engineering, COEP Technological University, Pune, Maharashtra, India, for period of three years from 2022 to 2025. Considering the Indian farming conditions, a prototype of an autonomous weeder is developed through the steps mentioned as follows.
Dimensional design of an autonomous weeder prototype
Fig 1 (a) represents the dimensional scenario of the Agrobot, along with the assumed dimensions of the inter-row and intra-row spaces, 300 mm and 150 mm, respectively Fig 1 (b) shows the actual onion field on the test soil bin and Fig 1 (c) represents an actual prototype.
Motor selection
The total force is the summation of the rolling resistance force, aerodynamic force and acceleration force. Assuming the motor efficiency is 85%, the power required is 0.4 kW for muddy and 0.6 kW for sandy soil. An electric brushless direct current BLDC motor with the criteria 0.6 kW < Motor power and 350 < Motor rpm was selected to move the weeder.
Design in CATIA and stress analysis in ANSYS
The mechanical frame structure was designed using CATIA software and stress analysis was done using ANSYS software (Fig 2a, 2b). When 250 N was applied, the maximum stress and deformation observed were 7.8 MPa and 0.11 mm, respectively.
Components of the weeder
1. Frame: Made of mild steel (MS), affordable, weldable and machinable.
2. Four wheels: The front wheels are bike tyres and the rear wheels are small activa tyres. The motor is attached to the front wheels through a chain drive-pull and conveyor belt.
3. Web camera: Zebronics zeb-crisp pro web camera (HD), mounted vertically on the frame to create a database for machine learning.
4. Pneumatic cylinder, actuator: The pneumatic cylinder and actuator, controlled by a Raspberry Pi, operate on 24V and 12V, respectively, to control a centrally connected weeding tool.
5. Battery: 48V (Four 12V lead-acid rechargeable batteries in series)
6. Raspberry Pi 4B+: This device has a 64-bit quad-core processor, 8GB of RAM, moderate power consumption, high processor speed, multimedia performance, memory and connectivity.
7. Inter-row, intra-row weeding tools: Two centrally located intra-row weeding tools and two both-sided inter-row weeding tools (HO-M15 Bow, WOLF-GARTEN tools) are market-available.
Dataset collection, data preparation and building a machine learning model
A spring onion farm was cultivated to prove the concept and conduct trials. After many object detection models were tried, the best model was chosen.
Spring onion cultivation
Spring onions are vulnerable to weeds due to their gradual early development and lack of adequate foliage to cover the ground, which hinders weed growth. The spring onions were grown in the designated test soil bin in the University area, with an inter-row spacing of 300 mm and an intra-row spacing of 150 mm. The plants grown on the farm other than the onion crop were assumed to be weeds. (Table 1) shows the details of the test soil bin.
Dataset preparation
RGB images of weeds and spring onions were collected using a Python program developed on Raspberry Pi and a USB web camera positioned 150 mm above the ground while traversing the soil bin. The web camera captured images of 640 x 480 pixels. Photographs of 2600 × 4624 pixels, taken with a mobile phone camera, were added to enhance the dataset’s diversity. All photographs were taken on sunny, cloudy and windy days, in dry and wet soil conditions, encompassing the growth stages from planting to harvesting and saved in .jpg format (Fig 3a-3d). Out of 5,000 images, including blurred photos, duplicates and those without onions or weeds, were removed for better accuracy.
Object detection models
Convolutional neural networks (CNN) consist of input, convolutional, pooling and flattened layers and they use tensors as the foundation for object detection. The transfer learning leverages weights from pre-trained models to improve performance with minimal custom data. LabelImg software was utilized for image annotation. The dataset was split into training, testing and validation sets in ratios of 80%, 10% and 10%, respectively. A balanced dataset was used for two classes: onion and weed. EfficientDetD0, MobileNetV2 SSD, MobileNetV2 SSD FPN-Lite, YOLOv8s and YOLOv8n were trained through varying epochs.
Development of a python code and deployment of a Machine learning model on raspberry Pi
The following functionalities are added by preparing the code in Python on the Raspberry Pi:
1. PWM (Pulse width modulation) signal generation for motor control: GPIO pin 18 was used as the output to control the 48V DC motor by generating a pulse width modulation (PWM) signal. The PWM duty cycle is used to vary the motor speed by controlling the motor terminal voltage
(Katsambe et al., 2017).