Cat Laser Tower

by snowbiscuit in Living > Pets

12242 Views, 165 Favorites, 0 Comments

Cat Laser Tower

DSC00878.JPG
Cat laser tower

Cats share few defining traits with humans, but love of lasers is definitely one of them.

Often, my cat's enthusiasm for 'chase the laser' continues long after my own enjoyment of 'look how silly the cat is' has ended, so I turned to technology to find an answer.

The cat laser tower is the purr-fect solution for a lazy cat owner like me. The Arduino powered laser tower (which can double as a scratching post) zips a red dot randomly around the floor for you, allowing you to sit back and enjoy the ridiculous antics of your feline friend.

It's easy and cheap to build, requires no soldering and only very simple coding. I don't know who had more fun, the cat, or everyone watching the cat.



*****************************************************************

NOTE: This project uses a laser and lasers can be dangerous. As we're using one which is no more powerful than your standard laser pointer, your (and your cat's) blink reflex should prevent any serious damage to your eyes (just please don't stare right at it). However, it is still something to be aware of, please only do this if you feel comfortable with it.

Happy making!

*****************************************************************

What You Need

DSC00732.JPG
DSC00740.JPG

To make the tower:

1 x Plate (for the base)

2 x Pringles tube

1 x piece of hessian or burlap material

1 x clear plastic pot

1 x small piece of polystyrene or similar

Duct tape (in the picture there is glue and gloves, duct tape is much better)

To make the laser:

1 x Arduino Nano (or other Arduino compatible board)

1 x servo

1 x laser module (like this one)

1 x USB power bank (anything like this)

1 x USB to micro USB cable (power bank to Arduino)

3 x male to female jumper wires (servo to Arduino)

2 x female to female jumper wires (laser to Arduino)

Electronics

cat tower circuit_bb.jpg
DSC00736.JPG
DSC00765.JPG
DSC00745.JPG
DSC00763.JPG

First, connect up all your parts and wires as shown in the diagram above.

Using the male to female jumper wires, connect the wires of the servo to the Arduino. The brown wire should go to GND, the red to 5V and the orange (which will carry the signal) to D5.

Using the female to female jumper wires, connect the laser module to the Arduino. The pin nearest the "-" should go to GND and the pin nearest the "S" should go to D6. There is a pin in the middle which we won't use in this project.

Next we need to mount the laser on the servo. To get the right angle, so that the laser would point to the floor instead of the wall, I used a small piece of polystyrene cut into a triangle. Initially, I tried using super glue to attach the laser module to the polystyrene, but it just melted into a weird gluey paste and got everywhere. Learn from my mistakes, use tape.

You can always readjust the angle once you've got it running and test out what works best for your tower, but I found a steep angle worked quite well.

Arduino Code

Next we need to program the Arduino.

This is the code I used. As long as you have used the same input/output pins as I did, this should work fine without modification.

/**
 * Cat scratching post laser turret.
 *
 * Pin 6 to 'S' pin on module.
 * Ground pin to '-' on module.
 * 
 */
 
#include <Servo.h>

// pin constants
#define LASER_PIN 6
#define SERVO_PIN 5

// declare servo objects
Servo servo1;

// Random number
int randNumber;

void setup() {
  Serial.begin(9600);
  
  // if analog input pin 0 is unconnected, random analog
  // noise will cause the call to randomSeed() to generate
  // different seed numbers each time the sketch runs.
  // randomSeed() will then shuffle the random function.
  randomSeed(analogRead(0));
  
  // set pinmodes
  pinMode(LASER_PIN, OUTPUT);
  
  // initialise servo objects
  servo1.attach(SERVO_PIN);
}

void loop() {
  // make sure the laser is on
  digitalWrite(LASER_PIN, HIGH);
  
  // print a random number from 0 to 180
  randNumber = random(180);
  Serial.println(randNumber); 

  // write position to servo
  servo1.write(randNumber);
  
  // sets time between movements. Change this to make the laser
  // pause for a shorter or longer time
  delay(800);

}

Building the Cat Tower

DSC00750.JPG
DSC00754.JPG
DSC00755.JPG
DSC00757.JPG

I modeled the laser tower on a scratching post, so that it wouldn't look out of place in the corner of the living room and also so that my cat could scratch it if he wanted.

The Pringles tubes, when duct-taped together, make up the body of the tower and a nice heavy plate makes the base. Having a heavy and wide base helps stop the cat being able to push it over and you can normally get a good cheap plate from a charity shop.

To make it good for scratching, I used hessian for a covering. First I cut a square that would easily cover the plate, then cut a cross in the centre. This can then slide down the Pringles tubes and cover the plate to leave no gaps. The excess can be tucked underneath and taped down on the underside.

Another piece of hessian is used to cover the tower. Initially I wanted to use glue to give it a clean looking finish, but I found that super glue wasn't very effective so I turned to the old fail safe of duct tape. Before wrapping up the tower completely, the electronics need to be installed, as you will need to cut a small hole in the tube.

Installing the Electronics

DSC00768.JPG
DSC00771.JPG
DSC00789.JPG

First, the USB power bank needs to be secured to the inside of the tube. This was the the most fiddly part of the project, even with my small hands I found it tricky to manipulate things inside a Pringles tube with any finesse.

The power bank is taped to the inside wall of the tube and a hole is cut in the cardboard where the on/off button is located. I found that when I tried to press the button, the whole power bank would move backwards as the tape wasn't quite tight enough. To fix this problem, I took a wooden toothpick (any straight object will do), cut it to the right size and wedged it behind the power bank. This meant I could put quite a bit of pressure on the button and it puts less strain on the tape holding it up.

The Arduino nano is light enough that it can just dangle inside the tube and the servo-laser unit can be mounted on the top of the power bank. I positioned the laser to be in the centre of the tube rather than the edge, as I knew I would be covering it up with the transparent pot and I wanted to give it enough room to swivel around with the wires coming out of the back.

Now that everything is installed, the rest of the hessian can be wrapped around the tube. Any excess at the top can be tucked into the inside of the tube and taped down to make it neat. Again, my initial plan was to use glue to secure the hessian, but I ended up using clear tape (which is hard to see in the pictures).

I decided not to cut a hole in the hessian where the button was, as mine lights up when it is on and I quite liked the effect. To make sure I knew where it was, I marked the square with pen.

Cat-proofing

DSC00776.JPG
DSC00838.JPG

Cats are notoriously curious creatures and we don't want any electronics getting pawed at or eaten, so some cat-proofing measures are essential.

A clear pot is secured around the top using duct tape (where would I be without it), making sure that the laser has enough room to swivel around inside.

This can always be removed when you need to charge up the power bank and replaced as necessary.

Testing

DSC00780.JPG
SillyMax.png
DSC00803.JPG

Now for the fun part...tormenting the cat.

I hope this project brings you and your cats as much enjoyment as it did for me and Max.

Have fun!