← Back to portfolio
Field report
Field report · agricultural robotics · published research

Aiming a 20W laser at a weed and only the weed.

A low-cost, laser-based weeding vehicle built for smallholder farms in Pakistan — a fully integrated mechanical, electronic, and computer-vision system designed to be affordable, replicable, and practical for local research groups.

Applied research lead
NCAI Smart City Lab
2023
field-tested and published
ROS + YOLOv5
core stack
Peer-reviewed
published in Machines
01 · Overview

Context

Weed control is one of the most labor-intensive tasks in agriculture, and in Pakistan it is still done almost entirely by hand. The project set out to build a weeding robot that broke from the pattern of commercial systems by prioritizing precision, low cost, and easy replication over raw speed. The broader goal was to create a solution that could be affordable enough for a smallholder farm or local research group and practical enough to operate in actual field conditions.

The work was carried through to publication: Development of Cost-Effective and Easily Replicable Robust Weeding Machine — Premiering Precision Agriculture in Pakistan, published in Machines in 2023, giving the project both a field validation and a peer-reviewed record of its performance data.

02 · Challenge

02Every existing approach fails differently

Existing weeding approaches all failed in different ways: chemical spraying pollutes soil and water and contributes to herbicide resistance, mechanical weeding can damage crops and compact soil, and hand weeding is reliable but slow, expensive, and physically demanding.

A viable robotic alternative needed to be precise enough to kill a weed without touching adjacent crop plants, light enough to avoid field compaction, adjustable enough for different furrow widths, and affordable enough for local adoption — a combination that ruled out simply scaling down an existing commercial machine.

Project snapshot. Field: Agro Living Lab, Gadap Town · focus: precision weed killing and crop-safe operation · impact: autonomous field trials with published performance data.
03 · Journey

03What was built

The robot's chassis was a 1.524m cube-frame assembly of 12 machined and welded metal parts, deliberately over-engineered toward simplicity so it could be assembled and disassembled with minimal tooling. Each limb paired a brushed DC motor with a chain-sprocket drive and a custom hydraulic shock absorber for rough terrain, plus a 3D-printed encoder disc for position feedback.

Welded cube-frame chassis of the weeding robot mid-build
The welded cube-frame chassis mid-build, deliberately over-engineered for easy field assembly and disassembly.

The weed-killing mechanism itself was a repurposed 20W engraving laser mounted on a two-axis rail gantry driven by stepper motors. Rather than building bespoke laser hardware, the team extracted the instruction stream from the laser's engraving software and converted it into an Arduino-driven routine to treat weed removal as the same process as engraving a shape but aimed at a plant stem instead of a material sheet.

A computer-vision model — a YOLOv5 variant retrained by transfer learning on a self-collected dataset of roughly 9,000 images covering three crops and four weed species — ran on an NVIDIA Jetson Xavier AGX to identify weed plants for the laser to target.

Assembled weeding robot with gantry, chassis, and vision stack, from the published Machines paper
The assembled weeding robot as depicted in the published Machines paper, gantry, chassis, and vision stack together.
04 · Architecture

04System thinking

Electronics and communication

The machine used a decentralized master–slave layout over RS485 with a Raspberry Pi 3 as master and one Arduino Uno slave per limb. ROS publisher/subscriber nodes handled communication, while each limb kept its own 12V battery to handle current spikes on uneven ground.

Control modes

The robot supported both manual RC operation and a semi-autonomous laptop-interface mode where the vehicle worked one furrow line at a time before advancing to the next, keeping the operator in control of the overall speed.

Steering and localization

True Ackermann steering, motor limits for safety, encoder feedback, and IMU data were combined to compensate for wheel slip and irregular field conditions that make encoder-only odometry unreliable.

Laser targeting

Vision-guided targeting allowed the system to aim the laser at the weed stem with enough precision to minimize crop damage while maximizing weed kill probability.

Retrained YOLOv5 model detecting weeds against crop plants
The retrained YOLOv5 model detecting weeds against crop plants, the input that told the laser gantry where to fire.
05 · Impact

Results and lessons

Field trials were conducted at the Agro Living Lab in Gadap Town, Karachi, on a 201m × 20m okra field with 132 furrows. At the tested speed of 0.07 m/s and with roughly 5 seconds of laser time to kill each weed, the calculated time to weed a full acre was about 23.7 hours. This was slower than a human crew, but it ran unattended, without chemical inputs, and without measurable crop damage. The vision model reached 88% mean average precision with only 0.4s inference time, fast enough for real-time targeting on edge hardware.

The biggest lesson came from the plant-specific behavior of the laser itself: different weeds required different intensities. Grasses needed only about 55% power, while tougher weeds like horseweed required close to the full setting. The project also identified the clearest path to a faster practical next version: a 35–50W laser would reduce weed-kill time to roughly one second, and solar charging would remove the multi-hour battery-charging bottleneck. This made the system very capable as a research and field-validation platform, while also clarifying exactly what changes would make it commercially stronger.