Project - 2023

Autonomous Weed
Detection Drone

Year 2023
Role Builder
Domain Computer Vision · Robotics · ML

A low-cost autonomous drone capable of traversing agricultural land, detecting weeds using Convolutional Neural Networks, and selectively spraying pesticide - targeting only weeds rather than the entire crop area. Built in 2023. The ML model was trained and the software pipeline developed, but the full end-to-end integration was not completed (65% built).

Python TensorFlow Roboflow Computer Vision ArduPilot CNN Drone Hardware
01

The Problem

Improper pesticide application is a pressing agricultural concern. It leads to resistance development in weeds, non-target effects on ecosystems, environmental contamination through runoff and drift, health risks for humans and wildlife, and residue accumulation.

Addressing these problems requires precision agriculture techniques - applying pesticide only where it's needed. This project explores that: a drone that identifies weeds with a CV model and sprays only the detected areas, conserving more crop and reducing environmental impact.

02

Electronic Schematic

The drone integrates a Cube Orange autopilot, 900MHz telemetry radio, LiDAR for altitude hold, an L298N motor controller for the pump, ESCs for the four drive motors, and a 5.8GHz FPV camera system. A laptop running TensorFlow and Mission Planner communicates via USB to trigger pesticide spraying when weeds are detected.

Electronic Schematic Diagram
Fig. 1 - Version 1 camera and electronics schematic

Key subsystems:

Cube Orange Autopilot -flight control, GPS, telemetry
TF Mini LiDAR -downward-facing altitude sensing
L298N Motor Controller -controls pesticide pump (Out3/Out4)
5.8GHz FPV Camera -real-time video feed for CV inference
4× ESC + Brushless Motors -propulsion via S500 frame
4S LiPo Battery -primary power supply
03

Components Used

All hardware was sourced independently. Total cost came in under $1,000 CAD.

04

How It Was Built

Autopilot System

Mount autopilot & GPS

Installed the ArduPilot Cube Orange onto the S500 frame. GPS arrow aligned forward (direction of flight). Connected via CAN1 port.

LiDAR altitude sensing

Mounted TF Mini LiDAR downward-facing on the frame. Wired to Telem1/GPS2 ports. Used for terrain-following at 2m above ground.

Telemetry & radio

900MHz RFD900x radio linked base station laptop (Mission Planner) to autopilot for real-time telemetry and command relay.

Pesticide Dispensing

PVC tank on landing gear

Hollow PVC pipes attached to landing gear serve as the pesticide tank, with ¼" tubing routing to the pump.

Pump + nozzles

Two misting nozzles mounted on the frame connected to the pump output. The L298N motor controller triggers the pump via Out3/Out4 on the autopilot.

Base station activation

When the ML model detects weeds in the camera feed, the base station sends a command over telemetry to activate the pump and spray.

05

Scripts

The ML pipeline runs on the base station laptop. A CNN trained with Roboflow + TensorFlow processes the live camera feed, detects weeds, and triggers the spray command over the telemetry link.

06