Leveling the Field
A DIY automated weed-spraying drone powered by AI may one day help bring precision agriculture to even very small farming operations.
The integration of robots and machine learning technologies into the field of agriculture has brought about a revolutionary transformation, promising to optimize processes, reduce costs, and enhance crop yields. By leveraging cutting-edge advancements in these technologies, farmers are able to streamline various aspects of their operations, making them more efficient and productive. These technologies have the potential to reshape traditional farming practices and address the challenges posed by an ever-growing global population and shifting climate conditions.
One of the key applications of robots and machine learning in agriculture is precision farming. Through the use of sensors, drones, and autonomous vehicles, farmers can gather data on soil composition, moisture levels, and crop health, or eliminate weeds with precision. Machine learning algorithms can also process collected data to generate insights that guide decisions regarding optimal planting times, fertilization, and irrigation. By tailoring these practices to the specific needs of each portion of the field, farmers can avoid overuse of resources and minimize waste, thus increasing yield while reducing costs.
While the advantages of these technological solutions are significant, they frequently come at a very high cost. The development and deployment of agricultural robots and machine learning systems necessitate significant investments in research, engineering, and infrastructure. As a result, these solutions are often financially out of reach for all but the largest farming operations. Smaller and more resource-constrained farmers may find it difficult to adopt these technologies, which could potentially widen the gap between industrial-scale agriculture and smaller, local farms.
A YouTuber that goes by the handle NathanBuildsDIY has made it his personal mission to demonstrate that AI and robotics are not all that hard, and do not have to be exorbitantly expensive if one is willing to do a bit of DIY work on their own. Previously, he demonstrated how a smaller farmer could create an autonomous wheeled robot that destroys weeds. But recently he has taken to the skies on his quest for an inexpensive, environmentally-friendly solution to weed control. His latest project is a drone that seeks out weeds, then sprays them with precision, avoiding unnecessary blanket spraying of chemicals.
The automation of this build is over the top (in a good way). Once it is set up, the system will essentially run itself. It consists of a drone and a landing area — the drone flies about three to six feet over a field, from waypoint to waypoint, looking for weeds using a computer vision system pointing at the ground. When a weed is detected by a machine learning image classifier, a sprayer is turned on for the precise application of chemicals.
The drone has a maximum flight time of 15 to 20 minutes, so before the batteries run out, it will fly itself to an automated landing pad. Arms driven by linear actuators will then move the drone into position such that other actuators can remove the existing battery and move it to a charger. A second battery, that has already been recharged, is then loaded onto the drone. While this is happening, the chemicals used by the sprayer are also refilled. When the drone is ready for flight again, a base station computer generates a new set of waypoints, and the drone once again takes off.
The frame of the quadcopter drone was built from a kit and populated with 920KV motors and 30 amp electric speed controllers. A 4S LiPo battery supplies the power, and was outfitted with extended contacts made from copper tape to make it easier to dock with the charging station. A Cube Orange flight controller was paired with a GPS receiver for navigation, and a downward-facing lidar unit helps to maintain a precise near-ground altitude. A 900 MHz radio is leveraged for communication with the base station computer.
A Raspberry Pi Zero 2 W single board computer was installed onboard the drone to run the machine learning algorithm. It is supplied with images captured by a Raspberry Pi camera that points toward the ground. When a weed is detected, it activates a motor controller that turns on a pump, which directs the liquid chemicals through a pair of spray nozzles. A reservoir was built into the PVC pipe that doubles as landing gear to store the chemicals. The entire build cost less than $2,000.
Existing weed classification systems tend to not be trained on images taken from a drone, so did not work well in this scenario. Drone images are taken from above, and the drone vibrates and stirs up wind down below, which impacts classification accuracy. So, NathanBuildsDIY captured his own training dataset, which he used to train the TensorFlow Lite model that ran on the Raspberry Pi computer.
NathanBuildsDIY hopes that others will build on his work to develop a more practical system that can help small farmers to cut costs and produce crops more economically. He suggests a few improvements that would help in achieving that goal — adding more batteries, for example, would allow for continuous operation of the drone. Upgrading to a larger size drone would make it possible to cover larger areas of land. He also notes that the classifier should be trained on a larger dataset so that it can work under more diverse conditions, and detect more types of weeds.
R&D, creativity, and building the next big thing you never knew you wanted are my specialties.