Dandelions are everywhere, and because they grow so quickly and spread seeds all over the place, they make for some of the most annoying weeds. It only takes a few days for a dandelion flower to appear after mowing, well before the grass has had enough time to catch up.
That’s why I wanted to build a robot that could hunt down flowering dandelions and end them before they have had enough time to grow to maturity.
Due to this being an outdoor robot, I wanted a chassis that had tracks and powerful motors to overcome tufts of grass and clumps of dirt. DFRobot’s Devastator Tank Chassis was a perfect fit for this project thanks to its tough tracks and aluminum body. Running the motors at 12v provides enough force to defeat low obstacles.
I wanted this robot to be able to seek out flowered dandelions, which meant that it needed a way to see and process available targets. Rather than use a complex system that relied on object recognition, I went with the Pixy 2 camera, which relies on detecting objects with similar colors.
To get it to recognize dandelion flowers, I set it outside and loaded up PixyMon, Pixy’s PC to Pixy2 control software. I simply held up a flower to it and then drew a box around the yellow portion. Now the Pixy2 was able to detect its targets.
The premise of the program is simple: detect a flower, go up to it, and then cut it down. Thankfully, Pixy has created a library that allows for detected objects to be easily identified and tracked. The program causes the servo to slowly rotate and find possible targets. When one is found, its position is saved and then the tank rotates to align itself. Next, it moves forward while making small adjustments to keep the flower in front.
Objects seem to get larger the closer they get, so by measuring the size of the object’s bounding box, a basic size can be obtained. Once the flower is close enough, the tank backs up, turns on the cutting tool, and then drives forward to cut down the flower.
Hunting Down Dandelions
After waiting a few days, there were finally enough dandelions to cut down. I simply set it down and calibrated the Pixy to ensure it was detecting everything correctly. Then I added some power and let it go. Overall, it worked really well at cutting down those obnoxious weeds.
Currently, there is no way to remotely or automatically stop the robot once it is finished, so I would like to implement a method that can shut it off once it can’t detect any more targets. Additionally, I would like to integrate a GPS receiver so the robot can return to a home position.