Introduction: Bichi Begone! (Cat Water-Spray)

About: Systems engineer, electronics technician.

Well hello there everyone, long time no see!

For those who don't know me, i'm Aoshido and I built a laser engraver like eons ago. If you want to check it out you can see it in my profile.

This Instructable in particular has a lot of storytelling about how I came up with the project and such, so bear with me if some steps/files/instructions are missing, the idea here is to show my "creative" process for this project in particular.

Step 1: Motivation About This Project

In my mom's house we always had cats, and with cats I mean a lot of cats. Since I was little I always grew up with around 3 cats, and we had had anywhere from 3 to 9 cats at any given time. All of our cats are super good, caring, and all in all just good cats...

But! We don't know why or when it started, but they started peeing everywhere, furniture, electronics, floors, catbeds, our beds, backpacks, clothes, computers, televisions, mobiles, people, other cats etc.

They just pee everywhere, without concern for anything (or anyone). We tried a lot of different solutions:

  • Putting food in the places they pee the most
  • Giving them their own spaces
  • Playing (more) with them
  • Placing strong pheromones / things with strong smells like lemongrass
  • Placing strings of tape so they don't get to those places
  • And many many others

All of our cats are properly neutered, so males shouldn't be marking territory. And even if, lets say they just retained the habit of marking, our female cats are also peeing !! (Also, Jackson Galaxy, if you're reading this, please come to Argentina!)

So at that point we kinda ran out of options and bought a product like SSScat and it worked really well !!. The main issue with this solution is that, it's VERY EXPENSIVE, I mean the product works great, it really does but the main product costs around 30u$s dollars, and every refill is around 15u$s. Even at those prices its still around the "rational range" for this kind of stuff, 15 dollars every month or so its "not that much".... but here comes Argentinian prices:

  • Original product 110 u$s dollars
  • Refills not even on sale

So yeah, that was a no-no.

Step 2: Old Designs

My first approach was to use one of those hand-triggered sprays and pull the trigger via a servo with some ropes around the trigger and some kind of pulley or something to be able to literally make a servo "pull". As you can see from the explanation this proved to be WAY more complex than I expected so I quickly (about 2 months later) ditched the idea.

Some time later when i saw this thing I was like "Yes, this is exactly what I need" I could then attach it to any can of whatever put a servo on top and be done with it, so I started testing different versions as shown in picture 2. Also, around the same time I saw a Mark Rober video where he used a servo to activate a can of spray and he used a very similar method so I was on the right track.

The first problem I ran with this design, is that the support for where the servo goes needs to be extra t h i c c because the servos exert a huge amount of force and all of the first ones broke out. (picture 3). After that and some minor hiccups (video) the device was working wonderfully!!

I was really excited about it, I even used different types of sensors, first an ultrasonic one, but that felt like an overkill so i got one of those PIR Sensors and it also worked beautifully.

So all i need now was some kind of canned air/water/whatever not harmful to cats......

Yeah about that, seems like the industry of canned air still hasn't quite bloomed yet, and I couldn't find any pressurized can of "Something not harmful to cats" so i had to discard this idea.

All in all I learned a lot from this design, and the thing works, so if I ever need to trigger some kind of pressurized can I can come back to this design. I'll leave the .stl files here in case anyone needs them.

Also, these designs weren't without fail...

Step 3: New Design First Part

I don't really know what muse hit me, but at some point I thought "why don't I try to use the bottle/atomizer of the bug repellent..."

Boy that was a good idea, here comes Off! Repellent to the rescue. The atomizer (the device that transforms liquid into mist... the orange part) is excellent for this, its pretty easy to push, (you don't need much force) and the amount/range/width of mist is quite big for the amount of liquid that it uses.

Now I wanted my design to be very robust, (the first one was really finicky, and you had to be very careful to make it work) so I wanted to screw my design (the servo holder) into the bottle and the atomizer into my design so it would be VERY solid. (Like in picture 4)

So, to design I had always used Blender because it was my first program and it had very good tools (like boolean operations and such). The thing is, Blender is very very powerful, but also VERY hard to use. At least for me it was REALLY hard every time I had to design something from scratch and make pieces fit each other, taking measures etc etc.

For this reason, in this project I challenged myself to try Fusion360, because every video of every maker I see uses it, and it seems so intuitive, so simple it had to be the way to go!

By god it was. All those days struggling with non-manifold geometries, pieces that looked OK on blender but broken on slic3r, bad measurements, multiple projects for each piece of a same project, all that and so more in the past. I can't put on words what a GOOD change it was to use Fusion360, i'm eternally grateful for that.

Back to the design: First I took some measurements of the screw of the bottle and tried to make a cap (picture 2). This was suuuuuper easy (picture3) , and it fitted really well too (picture4). For how to make the threads I watched this video:

It was super helpful, and I was able to make a fitting for both the bottle and the atomizer. On picture 6 you can see the settings I used (along some chamfers and fillets to make more smooth) to make them fit.

Step 4: Servo Mount

So now I had a solid grip around the atomizer/bottle, all i need was a place to put up the servo, close enough to the atomizer in order to be able to push it. (Pictures 1,2,3 and 4)

First i tried heightening a slice of the cylinder to place the servo (Picutres 5,6,7) This worked really well, so I had most of the mechanical part figured out.

Step 5: Servo Head/horn/sprocket? Also ScrewHoles

Servo horn

The servo worked fine to push the atomizer but it still clogged from time to time or sometimes it would not reach the full atomizer's trajectory, so I designed a slightly longer servo horn ( Is that really the name for that piece?).

Also I based the shape on this Mark's video

This new piece worked like a charm.

Screw holes

Also I've designed the bottom part to be screwed onto the other one (the one that holds the servo) with 2 screws with side-pocket nuts.


Step 6: Electronics

Up until this point I was using my first board (the one with the pressure can) for testing this project. This board's design was very simple:

  • An Arduino* (more on this later)
  • Pinheaders for: Voltage supply, Servo, PIR Sensor
  • An On/off LED
  • A Pulse Switch (sort of..) to turn on and off

The only unusual thing about this design (Besides that switch that it never worked so it had to be bridged) is that the pinheader for the PIR sensor is soldered on the copper side of the board (not the usual component side) So it "couples" with the PIR sensor board.

This design works, but its really crappy so I tried to do something better for the second design, but I couldn't find a better way to put the sensor. So all i did for the other design was remove the switch (because it was useless and I didn't had any other switches at hand) and add a "Signal" led that turns on every time the sensor gets triggered.

As for the arduino im using the almighty ATTINY85. For all the things that this project has to do its not worth using a WHOLE arduino uno/nano/micro etc so I decided to use an ATTINY and even that is slightly an overkill , but since I have to drive a servo I think its just OK.

Step 7: Programming the Almighty ATTINY85

As powerful as it is, you need to have some considerations in order to program this little beast:

Programmer

You need to use some Arduino board as a programmer, so far I've used Mega, Uno and Micro Pro, and all worked great. There are a million of tutorials online about this so I'll just name a few and some details:

https://create.arduino.cc/projecthub/arjun/program...

https://www.instructables.com/id/ATtiny-Programmin...

https://www.instructables.com/id/Mini-Breadboard-P...

IF you use the Arduino Pro Micro as a programmer, pay attention to the option "Arduino as ISP ATMEGA32UA" I couldn't upload my sketches to the ATTINY until i used that option.

Libraries

The default servo library is not compatible with ATTINY so i had to use the SoftwareServo library

Board

Also you need to download board information for your ATTINY, this i suggest you use one recommended in the tutorial you're using to upload sketchest to the ATTINY.

When you manage to:

  1. Upload a blink sketch to the ATTINY
  2. Move a servo with the ATTINY

You're all good to go, after that reading the input from the PIR sensor is very simple.

Servo

As you'll see on my program, the instructions I use to move the servo are:

myServo.write(180);

myServo.write(97);

This is because my servo is modified for continuous rotation. So 180 is full speed in one direction (as you can read from the manuals) and at 97 my servo stays still (For other servos this value can vary so try and see)

Final sketch

I've attached the sketch that i'm currently using. Be sure to check if the pins you're using on the program are the same that you routed on the board (Duh!).

Step 8: Designing the Electronics Enclosure

Now I had my board measures (Picture 1), so all i had to do was design an enclosure so it could all be one piece.

For this I had to ditch the "one side tall" design because there was no place to put the electronics below (I didn't want to place the board below the atomizer's nozzle just in case water got there) so the only place to put them was to keep growing taller and for this i needed a closed cylinder since I don't want to print with supports.

So with those 2 things in mind I did the final design for the bottle (pictures 3-4-5-6). First I closed the opening as much as i could while keeping a not-too-steep slope. Then i just placed (yet another) screw for the electronics "cap".

For the electronics cap I designed it upside down so when you screw the cap, everything stays in place.

Step 9: Putting All Together, Tests

So! At this point I was beyond thrilled with everything, the design process was so so so so good with Fusion that it was what I enjoyed the most about this project.

Assembling it was quite easy as its shown on the firsts gifs (Hopefully, Instructables is really bad for uploading gifs)

All in all it ended up being WAY taller than I expected, and this makes it a bit unbalanced, but still it worked just as I expected (At least in theory, the real proof will be if the cats wont pee anymore on the table!)

Step 10: Problems / Future Improvements / Final Comments

Lessons learned:

Research

So as I was writing this instructable I was gathering information on the SSSCat thing and I learned that you can refill them yourself too... (albeit illegally I think because it was a guy with a tire pump) So yeah, maybe if I had put a bit more into the research I could've used that while I made this project.

Software

I'm absolutely in love with Fusion360, It had literally everything I needed and so so much more, I can't stress enough how happy I am I made the leap. Taking this into consideration I'll try to upgrade my slicing software and some other obsolete programs I'm currently using.

PIR Sensor

When I built the first design for this project, between detections of the PIR sensor, there was like a 5 seconds delay and no matter how hard I tried I could not eliminate that delay. So every time the sensor detected some movement I had to wait. Later I learned that this delay is implanted in the sensor itself so no matter how optimized your code is you'll always have to wait between readings.

I saw this on this AMAZINGLY explained page:

https://lastminuteengineers.com/pir-sensor-arduino...

3D Printer

Even though after like 4 years of this printer I'm starting to get the hang of it, I'm always amazed by how maintenance heavy are this machines. You have to be super careful with everything, one sitting of a bad spool of filament and the whole thing comes apart.

Alternative uses

If instead of water you put rubbing alcohol or something similar, you can use it as a hands-free hand sanitizer! Very useful on this time of need.

Improvements:

PIR Sensor

On my board, the PIR sensor mount is on the opposite side of the components side (picture 1), so its really hard to solder and also every movement puts a lot of fatigue on the solder joints. Inevitably you'll end up with some lifted vias as shown in picture 2.

The PIR Sensor has mounting holes !! How could I be so blind !! For the next upgrade I'll use the mounting holes on the PIR sensor to better attach it to the electronics enclosure and (finally) use a ribbon to connect it to the main board so I can stop soldering things to the copper side of the board.

Motion Detection restrictor: The sensor has a huge field of detection so sometimes it detects another person, or when the cat enters the room, so it kinda defeats the purpose. I want to integrate something like this into the design in order to be able to dynamically modify the range

Voltage supply / battery

As of now the board has a pinhead for plugging in a modified DC transformer. I'd like in the future to make a better enclosing with an appropriate socket (which THEN goes to the board, instead of directly plugging into the board). Also the same thing but with also a battery

Make it smaller

In programming I read once "Make it work, Make it right, make it fast". So now it works, and with the other upgrades I think I have the "right" covered, so as a last step it'd be nice if it wasn't such a gargantuan thing!

Future Projects

I really need to improve my photo/video taking skills if I plan to keep uploading my the things I do.