Hackster is hosting Hackster Holidays, Ep. 7: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 7 on Friday!

Shining a Light on Weed Control

This environmentally-friendly DIY robot uses machine learning to locate weeds, then it scorches them with focused rays from the sun.

Nick Bild
1 year agoRobotics
Environmentally-friendly weed control robot (📷: NathanBuildsDIY)

Controlling weeds in agriculture is a significant challenge that farmers face worldwide. Weeds compete with crops for resources such as sunlight, water, and nutrients, leading to reduced crop yields and quality. The scope of the weed problem is vast, as weeds can infest fields, orchards, and vineyards, negatively impacting agricultural productivity. According to estimates by the Food and Agriculture Organization, weeds can cause up to 34% yield losses in major crops, leading to substantial economic losses and food security concerns.

One of the primary methods employed to control weeds is the use of herbicides. Herbicides are chemical substances specifically designed to kill or inhibit the growth of unwanted plants. They are widely used due to their effectiveness in weed control. Herbicides work by targeting specific physiological processes in plants, such as photosynthesis or cell division, leading to the death of the weeds, without impacting the crops.

While herbicides have been effective tools in weed management, there are concerns associated with their use. Environmental considerations are one of the key factors driving the exploration of alternative weed control methods. Herbicides can persist in the environment, potentially leading to water contamination and detrimental effects on non-target organisms, including beneficial insects, birds, and aquatic life. There is also the risk of herbicide resistance development among weeds, rendering certain herbicides ineffective over time.

YouTuber NathanBuildsDIY recently built a weed-destroying robot that presents another possible path forward. While it may not be practical for all situations, it looks like it would be a lot of fun to build, and it seems to be working just fine for NathanBuildsDIY’s garden. His robot leverages computer vision and machine learning to drive around and scout out weeds. When they are located, a lens focuses the sun’s rays on the weed to burn it into oblivion.

The frame of the robot is constructed of wood, with a pair of bicycle wheel frames and a pair of lawn mower wheels driven by electric motors. A movable arm is equipped with a Fresnel lens to focus sunlight on weeds as needed. A linear actuator moves the arm up and down such that the light passing through the lens can be focused on a small area of the ground. A Raspberry Pi single-board computer controls the robot, and a Raspberry Pi Camera is used to capture images of the environment.

To locate weeds, the camera captures a stream of images and feeds them into a MobileNet neural network for detection. Retraining the model with existing weed datasets did not work well for small weeds with the camera two feet above the ground, so NathanBuildsDIY collected his own dataset from his garden to train the model. Images were split up into a grid of squares so that weeds could be more precisely localized.

When a weed is found, the robot’s arm swings into action — first a rough calibration process is initiated. This process makes use of four photoresistors, pointing upwards, that are separated by cardboard dividers. This information helps align the arm such that the sun is shining through the lens. Next, a fine alignment process is triggered. Normally, a cover is placed over the lens so that it does not burn everything in its path — but it does have a few holes in it to help with targeting. This light is used to line the focus of the lens up exactly with the square in which the weed is located.

Finally, the cover is lifted off from the lens, and the linear actuator adjusts the height of the arm to ensure it is tightly focused on the target. The arm then moves about the entire square scorching everything in its path. After the job is finished, the lens cover moves back into place, and the linear actuator drops the arm down closer to the ground to take it out of focus for maximum safety before it rolls on to the next area in need of treatment.

Speaking of safety — in addition to burning weeds, the lens is quite capable of setting just about anything flammable on fire, like leaves, mulch, or dry grass, so one needs to be careful using a robot like this. NathanBuildsDIY recommends remaining in the area while the robot works so that you can keep an eye on it, just in case of a problem.

After going through the development process, NathanBuildsDIY realized that there are some areas that could be improved to create a more refined version of the robot. First, the frame is unnecessarily large — cutting down on that bulk could allow for the use of smaller, less expensive components, and would also help the robot to fit into tighter spaces. Also, replacing the wheels with tank treads would help in traversing difficult terrain. NathanBuildsDIY also notes that ideally, the algorithm should locate the center of a weed and focus on that rather than burning a larger area, which could also unintentionally destroy crops.

Nick Bild
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles