Introduction: LazerDazer: Arduino Laser Cat Toy
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.
- 1 x RobotGeek Pan and Tilt Kit w/Servos
- 1 x Laser w/Mounts
- 1 x Geekduino or other Arduino UNO equivalent
- 1 x Sensor Shield (recommended for easy wiring)
- 1 x 7v5a Power supply
Mini Pan-Tilt:
This is a good choice for low cost, but using 9G servos limits the weight of what you can add.
- 1 x Mini Pan-Tilt Kit
- 2 x 9G Metal Gear Servo
- 1 x Laser w/Mounts
- 1 x Geekduino or other Arduino UNO equivalent
- 1 x Sensor Shield (recommended for easy wiring)
- 1 x 6v2a Power supply
Step 2: Assemble Your Turret
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!
8 Comments
Question 2 years ago on Step 5
Подскажите пожалуйста, как поменять код для NodeMCU8266?
Question 3 years ago on Step 3
Is there possibly an updated parts list? Most of the stuff is discontinued and want to make sure I'm getting the right things.
Question 5 years ago on Step 1
I really want to build this, but Is there any way to make it motion activated. I currently have an ssscat in front of the bedroom door to prevent the cat from banging on the door. What I really want is something like the lazerdazer except it automatically turns on when the cat even walks near the door..
6 years ago
https://github.com/fluxaxiom/Arduino_AutoCatLaser
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!
Reply 6 years ago
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.
Reply 6 years ago
Do you have a Instructable on this?
Also, i presume yours is intended to be mounted on the cieling or upside down?
In your code you set:
int rangeRestrictX[] {50,50}; // PAN 50,170
int rangeRestrictY[] {65,160}; // TILT 65,160
What are the two numbers for ea h referring to?
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?
Reply 6 years ago
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 -
Reply 6 years ago
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!