Boesling *) Gun 3.0 - a Cat Protection System

by ArminPP in Circuits > Arduino

83 Views, 0 Favorites, 0 Comments

Boesling *) Gun 3.0 - a Cat Protection System

Boesling Gun V3
Boesling and Fellina.jpeg

*) boesling means 'bad boy' in the Austrian dialect

First of all: I really like cats and pets.

But most of all I love my cat :-)

(The water gun in the video above does not spray water. I removed the water container due to the sub-zero temperatures while filming this little video...)

My cat, Fellina, is about +15 years old (around 80 years in human age) and suffers from atrosis. We live in the country and there are lots of other cats nearby. Every now and then a new young player appears and tries to bully Fellina. She is a tiny cat weighing 3.5kg and sometimes finds it difficult to protect her territory. I can watch it with some "CatCams" I've installed in the past, but I can't help her if a bully shows up.


So I decided to build a repellent that would scare away other cats but not hurt them.

After some internet research I came across 2 remarkable sites:

https://randomnerdtutorials.com/esp32-cam-pan-and-tilt-2-axis/

https://github.com/jonathanrandall/esp32_cam_electric_watergun/tree/main

I took both program ideas as a basis and built my own modifications around them.

The software wasn't so much of a problem for me (due to the great preparatory work from above, especially of course the great work of Rui Santos from Random Nerd Tutorials), but the hardware was a big challenge.



More detailed information and the source code can be found on my GitHub page: https://github.com/ArminPP/BOESLING-GUN-V3?tab=readme-ov-file


Supplies

Software

Webserver.jpg

I use PlatformIO to write the code.

As far as I know, the ESP32-S3 Cam is only supported by Arduino V3, which isn't officially supported by PlatformIO. So I used a workaround form Max Gerhard https://community.platformio.org/t/moving-from-arduino-ide-to-platformio-ide/42372/9. (Please see the platformio.ini file)

Alternatively, you can also use the Arduino IDE, it supports Arduino 3+ from the scratch.


Most of the web interface is self-explanatory, a few small things are not:

There are 4 predefined positions that are approached immediately. The idea is that if I spot a Boesling on a CatCam, I first have to connect remotely, open the website and use the navigation keys to navigate to the destination. Then turn on the lamp and fire the gun. At this point, every cat is out of the woods! The POS keys do all this for me, and I can at least catch the tip of a Boesling's tail ;-)

If the "Aim & Fire" option is checked, the flashlight and water gun will also be launched.

Prototype

Prototype.JPG
Overview.jpg
Fellina.jpg

I would suggest making the device as high-quality as possible because it should work outside in the rain or even in winter when temperatures are below zero.

My first prototype was built with this cheap plastic touretts [Amazon.de link] available on the Internet. The whole thing was extremely wobbly and the small micro servos were too weak to hold the load.

Fellina doesn't care about the mess during prototyping as long as there's enough to eat :-)

Final Version: Turret

Bottom_1.jpg
Bottom_2.jpg
Bottom_3.jpg

I shortened the upper servo-arm to get better torque.


Final Version: Craddle

Servos_1.jpg
Servos_2.jpg

Cradle for the water pistol and the flashlight.

Assembly of the top plate with 2 U-profiles for the flashlight and the water gun. In the middle is the mount for the GoPro housing

The flashlight and the watergun are attached to the U-profiles with a zip tie.

Final Version: Watergun

Disassembled Gun.jpg
Motor Tuning.jpg

Dismantle the water gun and tuninig the motor.

I equipped the motor with a freewheeling diode and interference suppression capacitors. (https://custom-build-robots.com/raspberry-pi-elektronik/raspberry-pi-roboter-elektrische-stoerungen-der-entstoerkondensator/7930)

Final Version: Flashlight

FLASHLIGHT_3.jpg

Instead of batteries (3x1.5V) I use an adjustable step-down converter. I had to learn it the hard way that with LED flashlights every 1/10 V counts. At the beginning I used 5V DC and after a few tries the LED lamps burned out :-(

Final Version: Camera & Housing

CAM_3.jpg
CAM_2.jpg
CAM_6.jpg

Gluing the tiny antenna plug is recommended. I use the programming board as an additional option and soldered the wires there. This means the cam fits better in the housing.

The cam only holds by being clamped with various foam rubber blocks.

In addition, a small packet of silica gel is included to absorb the condensation.

Final Version: Electric Box

BOX.jpg

This is still the box with the power supplies from the first version, but the current version is basically the same...

(The video above shows the new and larger green box)

I use a 230 VAC cable to power both devices (yellow one from the left). The USB plug-in power supply is used to supply the ESP and the peripherals, the large power supply for the motors and pumps and the flashlight, see circuit diagram.

Circuit Diagram

Schematic.png
Electronics_1.jpg
Electronics_2.jpg

The circuit diagram is not too complex, I use two independent 5V power supplies to avoid any EMC interference.

In the 3rd (and last!) version of this project I use a 5V@12A (! there was no smaller one available ;-) power supply for LED strips. It is waterproof and strong enough to absorb the extreme voltage peaks of the water gun's simple pump motor. The original switched-mode power supply always switched off briefly due to the peaks, which is unfortunately not usable.

Nevertheless, I use a buffer capacitor (1000µF) for both voltage sources.

Both sources are independent, but the grounds are connected.

The relay shield also works with 3.3V from the ESP32, and it is possible to change the logic via jumpers. This is important because the ESP's GPIOs are 'high' during booting and the cannon might start firing...

For the LED flashlight I use a MOSFET (motor driver) to be able to switch it on and off every hundrets of milliseconds.

I use a relay shield for the pump motor.