Foxes and Badgers 'Soundly' Defeated
The Furbinator 3000 uses machine learning and a Raspberry Pi to control targeted ultrasonic sounds, humanely keeping nuisance animals away.
There are few things that can relax the body and mind like some quiet time spent in nature. In our fast-paced and technology-driven world, finding solace in the natural world is the perfect antidote to the stresses of daily life. Whether it is a serene stroll through a lush forest, a moment of reflection by a tranquil lake, or simply sitting beneath the shade of a mighty oak tree, nature has a remarkable ability to soothe our souls.
Wildlife can add to the serenity of a nature retreat, but it can also bring unexpected challenges. The gentle rustling of leaves as a deer crosses your path or the melodic chirping of birds in the treetops can add to the enchantment of your outdoor escape. However, there are times when nuisance animals make their presence known. Mischievous raccoons may raid your campsite for a midnight snack, and curious foxes may venture a little too close for comfort. These moments can disrupt the tranquility, but they also remind us of the delicate balance of nature, where both beauty and untamed landscapes coexist.
A creative engineer named James Milward put a lot of effort into turning his garden into a quiet sanctuary where he could escape the day’s stresses, but some foxes and badgers had other plans for the garden. He had no desire to harm his furry visitors, but found that the damage they cause, in addition to the diseases they can carry and the potential threats they pose to his children meant that they needed to be kept at arm’s length from the garden. For these reasons, he designed and built what he calls the Furbinator 3000, a device meant to keep foxes and badgers away without harming them.
After getting fed up with a variety of natural repellents that proved to be ineffective, Milward turned to ultrasonic repellents. These seemed to work pretty well, but not without some issues of their own. For starters, they can only operate at a single frequency, and both foxes and badgers are repelled by different frequencies. Moreover, the devices run all the time, and their solar panels are not quite up to the task of keeping their batteries fully charged, so it is common that the devices will go offline for days at a time without being noticed.
To solve these issues, Milward created a more intelligent solution. He built an animal detector using a Raspberry Pi 4 single-board computer that runs a machine learning object detection algorithm. An existing object detection model was downloaded from the TensorFlow Model Zoo, and was then fine-tuned by retraining it on images of foxes and badgers using TensorFlow Lite.
That retrained model was deployed to the Raspberry Pi such that it could continually monitor for nuisance animals in real-time by examining images captured from existing Ring cameras already installed on the property. When one was recognized, it could remotely turn the ultrasonic repellents on, and crucially, by recognizing the type of animal that was present, it could set it to the proper frequency. This not only targeted the correct animal, but also prevented the repellents from running all the time, needlessly draining their batteries.
Milward reports that the new system is working quite well, and is keeping his garden a safe place for his children to play. The source code has been open-sourced, so anyone is free to use this solution and modify it for their own needs. The write-up walks through all of the tools used, and the techniques that were required to refine the system until it was operating like a well-oiled machine.
Looking beyond his own backyard, Milward envisions a similar solution being deployed in agricultural settings, to reduce the loss of crops in a humane manner, benefiting humans and wildlife alike.