Introduction: Bobcat Defense System for Chicken Saftey

Ever since quarantine, the popularity of chickens as a household pet has risen incredibly. After all, chickens are great: they're cute, great pets, and provide eggs. But, the biggest threat to chickens and chicken owners is bobcats. Bobcats are large cats that are heavily populated in North America. They tend to do their hunting during dawn and dusk when humans are not outside to protect their chickens. Bobcats prey on people's free-roaming chickens, tending to kill all of them unless a rooster is present. However, most people who keep chickens don't have roosters due to their aggressive behavior, leaving their chickens at risk. All chicken owners can fix this problem with a simple defense system that doesn't harm the chickens or the bobcat. This system functions similarly to a rooster by scaring away the bobcat with a loud noise.

Supplies

The Bobcat Defense System is not that hard to make, as long as you have access to a 3D printer and Amazon.

You will need:

  • A 3D printer
  • 1 9-volt battery
  • 1 Ultra-Sonic Sensor (HC-SR04)
  • 1 Arduino Nano Every/small microcontroller
  • 1 small breadboard
  • 1 loud Piezo buzzer(I used these)
  • Electrical tape
  • Hot glue gun and glue sticks
  • A soldering iron and solder
  • A Dupont connector and wires

Step 1: Making the Case

To start, we need to make the case that holds all of the electronic components. Use the attached STL file for this. The case needs to be printed in a certain way for the system to work. First, you should use the recommended settings for printing: A nozzle size of .2 mm for detail, an infill of at least 20%, and tree supports to make the supports easy to remove. While these settings are good, they are only recommended for more common printers. Second, you need to make the side of the case with the 3 holes to be touching the base plate in order to save filament on supports. Print the mount separately from the case to save filament on supports and hot glue it later. Then, for the cover, you should print it flat side down, as you don't need support for this. Then, you can additionally print out the fence mount and glue it on if you want to mount the system to a fence(bars must be 1 inch thick). Afterward, slide the cover into the slot on the back of the case. If it doesn't fit, try sanding the sides on the cover slightly, which should fix the problem.

Step 2: Wiring

Of course, to start this step, you need wires. You need them for all the components and for attaching the power and ground to the breadboard. Wire the trigger pin to pin 9 on the Arduino Nano Every, and the echo pin of the ultrasonic sensor to pin 10. Then, stick the positive end of the buzzer into a female end of a wire, and the other female end into a pin 9 of the Nano. Next, hook up the ground and power of the Nano to their respective places on the breadboard. Finally, give power to the ultrasonic sensor and attach a ground to both components. The process for powering the Nano is a little tricky but can be done easily. To start, you need a battery connector/converter that makes the battery split into positive and negative wires. Then, solder the positive wire to the VIN pin and the negative wire to a ground pin on the Arduino. You also have to solder the buzzer. Remember, when soldering, you should have a fume extractor to get rid of toxic air and wear a face mask/covering. I connected the buzzer wires to a male wire(to plug into the breadboard), and the connector to a female end(to put into the Arduino). Finally, connect the negative output of the buzzer to a negative wire on the breadboard, and the positive to pin 8 on the Nano. In the wiring diagram made with Tinkercad, I used an Arduino Nano for the microcontroller in the diagram.

Step 3: Code

The code for this project is simple: what the code needs to do is turn on the alarm when the ultrasonic sensor is triggered. To do this, upload the code in the attached file to your Arduino Nano Every. This code sets up the ultrasonic sensor, which calculates the time it takes for an ultrasonic wave to leave it and come back to it, and then converts that into a distance. What the code does is check for when the distance is less than its maximum using an if statement. If the value is less, it starts a loop for the alarm to sound for 3 minutes, which is long enough to discourage the bobcat from jumping over your fence and attacking your chickens. During the 3 minutes, if the alarm is tripped again, it will restart the timer for 3 more minutes, meaning it will go until the bobcat leaves. If the area around your fence is smaller than most, you can edit the code to make it activate when the distance the ultrasonic sensor calculates is less. Go into the code, and change the value in the if statement to be more or less depending on the space behind your fence. You can also change the sound pattern the alarm makes. Currently, the alarm turns on for 1 second, then off, and on again. To change this, edit the code inside the nested for loop to your liking.

Step 4: Assembly

To assemble the system, get all your parts together. Start by putting the battery in the corner slot, and use electrical tape to secure it. Then, put in the ultrasonic sensor and buzzer in their respective slots, securing them with duct tape. Third, use hot glue to attach the mount on the left side of the case, close to the top. Next, you want to make sure the code is uploaded to the Arduino Nano before putting it in the Nano holder. Put the wires through the holder before securing it to have an easier time installing it. Finally, put the breadboard in there and secure it with tape.

Step 5: Installment

To install your finished defense system, go past the fence, behind your backyard. There are many ways to install it: securing it to a stake and planting it in the ground, attaching it to a wall, or using the version of the back plate with the standard fence mount. But, when mounting it, you must make sure that it is 1.75-2 feet off the ground. This is the normal height of a bobcat, so planting it higher will allow the bobcat to go past it without triggering it. Also, it cannot be lower, as it could trigger when smaller, harmless animals such as raccoons, rabbits, and rats pass by. Also, put your system within 0-4 feet of the fence, as that distance is where bobcats tend to begin their leap over fences. Another way to mount it is by putting it on top of your fence to trigger when the bobcat is sitting there. In the photo, I put mine right up against the fence, as I noticed bobcats in my area tend to prowl close to the fence before jumping. Also, you may notice that the alarm does not go off when it should. A fix for this is putting a flat surface (such as a piece of wood) at the maximum distance. This is because the ultrasonic wave can reflect unpredictably and doing this will nearly guarantee that the wave correctly returns to the ultrasonic sensor. Once the system is set up, it will go off whenever a bobcat crosses it. If you want to disable the alarm, you can open up the case and unplug the wire from pin 8, or you could reset the alarm by restarting the Nano(hitting the white button on it). If you don't live in a dry area, I recommend covering it to prevent rain damage. Also, check the system once every other week to ensure the integrity of the components.