The Catinator
The idea behind The Catinator started with a tiny orange menace- a cat named Lulu with a fondness for chaos. In particular, she enjoys eating, digging in, knocking over, and otherwise generally disturbing any houseplant she can get her paws on. The typical deterrent as a consequence of these activities is a manual spray bottle. However this isn’t always convenient, especially when Lulu strategically times her attacks between the hours of three and five AM (her witching hours). The obvious solution to this is an automatic spraying device triggered by her proximity to my plants. Naturally, as liberal arts students, we decided to take this a step further by incorporating this automatic sprayer into an animatronic kitty friend (frienemy?) complete with an additional level of protection in the form of laser eyes to shine on the wall away from the plants and distract the tiny menace.
Animatronics, essentially mechanical puppets, are widely created for various uses mostly in the form of entertainment. They tend to be quite uncanny, and although this wasn’t our initial design vision we soon learned it is difficult to make an animatronic that isn’t creepy. Once we made the decision to use a gutted cat stuffed animal as the skin of our creation, things got a little weird.
We hope you enjoy these detailed instructions for making your own Catinator, be it for naughty kitties or just for fun. Disclaimer: we make no promises on the cat-proofness of this design.
Uses
The Catinator has many uses.
- Protect plants from prying paws
- Entertain silly kitties
- Scare away the ops
- Pranks
Supplies
- 1 Arduino Uno
- 1 Ultrasonic Distance Sensor - 5V - HC-SR04 compatible - RCWL-1601
- 2 Laser Diode - 5mW 650nm Red
- 2 Micro Servo with 3-pin JST PH 2mm Cable - TowerPro SG92R - STEMMA Connector Compatible
- 1 relay
- 1 automatic spray bottle
- 3 small breadboards
- 1 5V battery
- 2 4 x AA Battery Holder with 2.1mm DC Jack
- 10 AA batteries
- 1 on-off power button
- 1 cat stuffed animal at least 20 inches in height
- Flexseal Superglue (we found this brand worked the best for securing the servos while they move)
- 3-D printer
- Arduino!
- Fusion 360 or adjacent to design/print skeleton
Design and Build Circuit
This is the layout for our circuit. It consists of three main parts joined by the Arduino. We recommend assembling everything together to make sure it works before moving to smaller breadboards that will fit inside the skeleton.
Arduino Code
Below is our commented code
//First, we identify which digital pins on the arduino have connections with the electronic components.
const int trigPin = 8;
const int echoPin = 13;
const int relay = 3; // the number of the LED pin
const int laserPin = 11;
const int laser2Pin = 12;
#include <Servo.h>
//Here we define the base positions for the servo motors.
Servo servo2;
Servo servo1;
int pos1 = 0;
int pos2 = 0;
int count = 0;
//This line makes the following code dependent on the distance sensor.
long duration, distance;
//This section tells the arduino which pins are doing what.
void setup() {
pinMode(trigPin, OUTPUT);
pinMode(echoPin, INPUT);
pinMode(relay, OUTPUT);
pinMode(laserPin, OUTPUT);
pinMode(laser2Pin, OUTPUT);
servo1.attach(9);
servo2.attach(10);
Serial.begin(9600);
}
//This next section defines the functions of our circuit components. The first part, void sense, is for the distance sensor, //and it tells the arduino how to define distance, and how to report it back to us.
void sense(){
digitalWrite(trigPin, LOW);
delayMicroseconds(2);
digitalWrite(trigPin, HIGH);
delayMicroseconds(10);
digitalWrite(trigPin, LOW);
duration = pulseIn(echoPin, HIGH);
distance = (duration/2)/29.1;
Serial.print(distance);
Serial.println(" cm");
delay(1);
}
//void spray is the setup for the spray bottle. We attached a relay to the spray bottle to turn it on or off, so the function to //turn the sprayer on and off is actually triggering the relay.
void spray() {
digitalWrite(relay, HIGH);
delay(3000);
digitalWrite(relay,LOW);
delay (3000);
digitalWrite(relay,HIGH);
delay(3000);
digitalWrite(relay, LOW);
delay(1000);
}
//void turnFor1() defines the function for the first servo to turn, and allows us to manipulate the range that the servo turns within.
void turnFor1(){
for (pos1 = 10; pos1 <= 50; ) { // goes from 0 degrees to 180 degrees
// in steps of 10 degree
pos1 = pos1 + 5;
servo1.write(pos1); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
//void turnFor2() does the same thing for the second servo.
void turnFor2(){
for (pos2 = 40; pos2 <= 80; ) { // goes from 0 degrees to 180 degrees
// in steps of 10 degree
pos2 = pos2 + 5;
servo2.write(pos2); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
//void turnBack1() returns servo 1 to its original position.
void turnBack1(){
for (pos1 = 50; pos1 >= 10;) { // goes from 180 degrees to 0 degrees
pos1 = pos1 - 5;
servo1.write(pos1); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
//void turnBack2() returns servo 2 to its original position.
void turnBack2(){
for (pos2 = 80; pos2 >= 40;) { // goes from 180 degrees to 0 degrees
pos2 = pos2 - 5;
servo2.write(pos2); // tell servo to go to position in variable 'pos'
delay(15); // waits 15ms for the servo to reach the position
}
}
//void stop() tells the servo to stop moving.
void stop(){
pos1=pos1;
pos2=pos2;
servo1.write(pos1);
servo2.write(pos2);
}
//void laserOn() tells the lasers to turn on.
void laserOn(){
digitalWrite(laserPin, HIGH);
digitalWrite(laser2Pin, HIGH);
}
//void laserOff() tells the lasers to turn off.
void laserOff(){
digitalWrite(laserPin, LOW);
digitalWrite(laser2Pin, LOW);
}
//This next section void loop()is the actual script that ties all the functions together. It tells each component when to //execute its function.
void loop() {
sense();
if (distance < 20) {
spray();
for (count = 0; count < 10;) {
laserOn();
turnFor1();
delay(40);
turnFor2();
delay(40);
stop();
delay(500);
turnBack1();
delay(40);
turnBack2();
delay(40);
stop();
pos1 = 10;
servo1.write(pos1);
pos2 = 40;
servo2.write(pos2);
delay(500);
count=count+1;
}
laserOff();
}
//This section at the end ends the loop, and tells the arduino to wait 500 seconds before starting the loop again.
stop();
delay (500);
}
Downloads
Skeleton Design
The skeleton was designed in two parts; a cylinder that goes around the spray bottle, and a skull that goes on top of this and holds the electronic components in place.
We designed the cylinder first, intentionally leaving the bottom open so we could easily remove the spray bottle. The cylinder has dimensions of 137mm wide by 215mm tall. It is about 10mm wider than the spray bottle at its widest point, and the height extends about halfway up the neck of the bottle. We made an oversight when determining how tall the cylinder should be for the skull to rest on top of it and fit over the spray nozzle, so we ended up printing two extra blocks about 25mm tall for the cylinder to rest on to give it the extra height it was missing. If you are recreating our design, we recommend you make the cylinder height as tall as the bottom of the spray nozzle.
We designed the skull next, which was significantly more complicated. We enlisted our friend Finn, who helped us design and print the skull. It consists of an ellipsoid that is hollow and open at the bottom, with a radius to match the radius of the cylinder it will sit on top of. It has openings for the spray nozzle, distance sensor, and laser diodes, and shelves at the level of the two upper openings to hold the electronics. The shelves have openings for the wires to attach to the arduino, which sits on the bottom shelf with the distance sensor. The back half is open to allow easy access to the electronics, and the shelves extend the full width of the ellipsoid.
Downloads
Assembly
Finally, once we had the circuits working properly on the breadboard and the skeleton printed we were able to begin assembly. The first thing we had to do was size the circuit way down to make it fit into the skull. We used three smaller breadboards, one for the distance sensor and one for each laser diode and servo combo.
The wires we originally used were M-M jumper wires, which have a hard plastic tip that sticks up out of the breadboard. Since the shelves inside the skull are only about 25 mm apart, there wasn’t enough space to fit the breadboards with these wires inside. We replaced these with smaller jumper wires that just have metal tips, no plastic, so that they could lay flat against the breadboard. For the wires that were already attached and could’t be replaced, we cut the plastic tips off and stripped about 5 mm of wire, and then soldered the ends to make them sturdy enough to stay in the breadboard.
The bottom shelf of the skull contains the distance sensor and supporting breadboard and the arduino. The top shelf contains the laser diodes and servos, their supporting breadboards, and the three power supplies. We attached the on-off power button to the back of the right ear using superglue.
For the fursuit, we beheaded the stuffed cat and removed the stuffing. Then, we cut a straight line down the back of the cat, removing the tail, and we fit it around the cylinder. We removed the bottom portion that covered the bottom opening of the cylinder to allow the spray bottle to be removed from this opening. We also added some of the stuffing back into the limbs to give the creature a more cuddly feel, and then superglued the fursuit around the cylinder.
Once we had the electronic components fit inside the skull, we superglued the breadboards and components in place. We used two pieces of metal bent at an angle to secure the servos to the skull, so that they would be angled down and the attached lasers would not blind anybody. Next, we placed the spray bottle inside the cylinder, ran the wires through the hole in the bottom shelf of the skull and into the arduino digital pins, and superglued the skull to the top opening of the cylinder.
The last component of assembly was fitting the face to the skull. The head was cut open from beheading and removing the stuffing, so we extended this hole up the back of the head to just below the top seam. We then slid the face over the front of the skull, leaving the back open so we could access the electronics. We measured where to cut the mask to make openings for the spray nozzle, distance sensor, and lasers, and then carefully cut these openings and secured the mask to the skull with superglue. It was necessary to pay special attention to the loose fur around the edges of the cuts around the distance sensor to ensure that it wouldn’t be falsely triggered. At this point we also adjusted the minimum and maximum angles at which the servos moved, to make sure that the lasers stayed within the slits we cut in the cat’s eyes. We also adjusted the spray nozzle to make a more direct stream as opposed to a misty spray, which helped mitigate the amount of residual water that got onto the fursuit. Finishing touches included using extra scraps of fur to cover the seam between the skull and cylinder, and trimming the back end of the spray bottle to allow it to more easily be removed.
Once fully assembled, The Catinator is ready for business! Thank you for reading, we hope you and your furry friends enjoy!