loading

Cats just want to straight up do a murder on that little red laser dot. Hunting is great exercise for cats, and it's always amusing to watch them go on the attack! Sure you can just grab your laser pointer and go for it, but you always know where the laser is going to be. Let's inject a little chaos into the mix with a pan/tilt turret to make a laser that moves to random positions at random intervals!

Step 1: Project Parts List

This should work with any hobby servo driven pan/tilt turret. Here are two suggestions:

RobotGeek Pan and Tilt:
This is a great choice if you'd like to add a camera or attach a fishing pole type cat toy.

Mini Pan-Tilt:

This is a good choice for low cost, but using 9G servos limits the weight of what you can add.

Step 2: Assemble Your Turret

If you're using the RobotGeek Pan/Tilt, assembly instruction can be found here.

If you're using the Mini Pan/Tilt, assembly instruction can be found here.

Attach the Laser, and let's wire it up!

Step 3: Wiring

Device Pin Type Pin #
Pan Servo Digital 10
Tilt Servo Digital 11
Laser Digital 2

Make sure to set the voltage to VIN for larger servos running 7v. You can keep it on 5V for 9G servos or run it VIN with a 6v power supply. Super simple wiring. On to the code!

Step 4: Programming

Grab the RoboTurret Sketches from GitHub and drop them in your Arduino Sketches folder.

Open up roboTurret3_lazerDaser and upload it to your board.

Grab your cat and power it up (power up the turret, not your cat. Your cat provides its own power. Do not attempt to power your cat)!

Step 5: You're Done!

Now you can just sit back and watch your cat rush and attack the evil red dot!

<p>https://github.com/fluxaxiom/Arduino_AutoCatLaser</p><p>Awesome! I had built one of these a year ago, and my cats loved it. It is an excellent way to distract them when I'm trying to do work and they wont leave me alone. After they got a little bored with it I decided to expand the functions and add more variation. Check out my code on github if you're interested - there are functions to make the laser zig-zag, do circles, scan the room, boomerang, bounce, creep slowly etc. The code would have to be adapted to the RoboTurret but I'm sure some may be interested in taking things a little further. I also adapted a power regulator into a light bulb base so it can be screwed in my ceiling fixture (I wouldn't recommend this if you don't know what you're doing). So much better than the disappointing commercially available product which I won't name but you can find easily on google. Thanks for sharing!</p>
<p>Amazing code, good job. It looks like you had a lot fun doing it. =) I've also made an AutoCat Laser, maybe i'll publish the code when i refactor. The diffrence is mine can play music and be controled by a joystick. </p>
<p>Do you have a Instructable on this?</p><p>Also, i presume yours is intended to be mounted on the cieling or upside down?</p><p>In your code you set:</p><p>int rangeRestrictX[] {50,50}; // PAN 50,170</p><p>int rangeRestrictY[] {65,160}; // TILT 65,160</p><p>What are the two numbers for ea h referring to?</p><p>Is there any way to write some code that will allow you to make a test of rangeRestrictX and rangeRestrictY in a loop to test the setting?</p>
<p>I don't have an instructable on it sorry. So the range refers to the range of motion on the servos - unrestricted being 0 - 180 degrees (maybe your servos have more range). To test just make a simple sketch that puts your servos at 0,0 and align with one edge of your floor unless you want it to come up on your wall a bit. Then increase the servo position (first one servo at a time, then both) incrementally until you get to the other extreme of your space. I got to those numbers in the sketch through trial and error, but they are strange numbers because I am avoiding a staircase so my cats don't chase the laser off a cliff so to speak. Hope this helps -</p>
<p>Oh wow, that's fantastic! Love the patterns, and we're sure the cats will too! You certainly blew the commercial product which will not be named out of the water! Thank you for sharing!</p>

About This Instructable

1,793views

24favorites

License:

Bio: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our ... More »
More by robotgeek_official:Voice Control Chip-E With Google Home Rock'em Sock'em Literal Robots 3D Printed Automatic Small Fish Feeder (Single Servo and Arduino) 
Add instructable to: