Introduction: CheetahBeam - a DIY Automatic Cat Laser Toy
I probably don't have to tell you that chasing a laser pointer is something cats love to do. But there are many of us who either don't have enough time to play with our cats, or maybe we need a way to distract the cats while cooking, or say, typing on a laptop. This laser plays with your cat for you. This device consists of a 3d printed case holding 2 servos and a laser pointer, batteries, a switch, and a small micro-controller. The software that is uploaded cycles through 12 functions at random. I made the functions by playing with my cats with a laser pointer, and when they responded to something I would translate that to code.
If you don't have access to a 3d printer you can still build this using any small project enclosure, and any reasonable way of sticking the servos and laser together. My first prototype used velcro on servo horns and it worked fine it was just ugly. There are also a number of cheap pan tilt mechanisms available but be aware that if they mount differently it may change the way the patterns are projected.
Above is a video showing my cats playing with the CheetahBeam. There is also a way to calibrate the device to the size of your space! We don't want the laser pointing out the window onto the street below. You can roughly change the play area by pulling off either servo mount or laser mount and rotating the desired angle before pressing back on. If you are comfortable programming in arduino you can change a few lines of code to have even more control over the area the laser covers.
Lasers can cause eye injury. The laser used in this project is low powered but please use some common sense. Do not use in a room with reflective flooring (linoleum, polished hardwood etc.). Place the laser as high up as you can, use the hook to hang it if necessary. Discontinue use if your cat seems stressed or is just staring at the device. Do not use lithium AA batteries. I also don't recommend using for more than 15 minutes at a time. You may also add a piece of diffusion material or laser diffusion screen in front of laser module to be certain there is no risk of injury.
Step 1: Gather Materials
For this build you will need:
The 3D printed case, or your own enclosure. Case files are here. If you are printing the case yourself follow the instructions on thingiverse.
Adafruit pro trinket 5V - You need the pro, unfortunately the sketch is too large for the regular trinket. The code may work on other small arduino boards, but I haven't tested. Sketch size is 9600 bytes and it uses the servo library.
1 standard size servo (Radio Shack, Parallax, Hi-Tec, Futaba, etc.)
1 SG90 micro servo (Tower Pro, Turnigy, etc.)
KY 008 laser module
SPDT slide switch - Use this one for a perfect fit.
4 AA batteries - Rechargeables are fine.
2M of 26 AWG silicon wire
AA battery contacts or a small battery box to rip them out of - I used this one.
2 x 2mm and 4 x 2.5mm screws that should come with your servos but may not.
10mm rubber feet - optional.
Usb to micro usb DATA cable (be certain it is a data cable and not just charging)
Double sided mounting tape
If you are printing the case you will also need; needle nose pliers, xacto knife, and a small flat file.
In later steps you will also view the wiring diagram and download the program.
Step 2: Prepare for Wiring
Prepare switch, laser, and servos. You don't have to replace the small servo wires but silicon wires are much more flexible, and it looks nicer when all the exposed wires match. Prepare 2 short wires as a jumper for power and ground to the board.
Press the battery contacts into the battery holder. Start them with needle nose pliers but you may need to finish with a small flat screwdriver. If you got your contacts out of the battery box in my link the switch will slide in the upper slot so there is no need to desolder it, just make sure it is in the on position before you bury it.
Step 3: Hook It All Up
Follow the wiring diagram and solder all the connections. You can build the entire circuit before installing in the case. Be sure to leave yourself enough wire though. The laser and small servo need at least 8" of wire but you can always zip tie up the extra if they are too long so make them a little longer.
Step 4: Download From Web. Upload to Microcontroller. Test.
Software: You will need to download and install the Arduino IDE from here if you don't already have it installed. To add the pro trinket to your list of boards in Arduino follow the instructions here.
Download the software from my github repository HERE and move it to your arduino folder or open it and allow arduino to move it for you. Under Tools select Pro Trinket 5V/16MHZ as your board and USBtinyISP as your programmer. Make sure the pro trinket is in bootloader mode (red light should flash when reset) and upload.
After uploading unplug the usb cable. INSTALL BATTERIES AND TEST before going further. After a few seconds the laser should come on and both servos should have movement. The servos will not work when powered by usb so do not test this way.
Step 5: Assemble
Press in the little rubber feet. There are 11mm holes that are perfect for the 10mm diameter rubber feet that are pretty common.
Press in the switch. It is a tight fit so a flat screwdriver will help.
Press the laser into the bottom of the laser mount. It should snap in.
Mount the servos using small screws. The small servo mounts with 2 2mm screws.
The larger servo mounts with 4 2.5mm screws.
Hot glue the switch in. Hot glue the cap on the laser mount and the small servo mount. You can hot glue the board down on its mount or you can use double sided mounting adhesive or 2mm screws, whichever you choose be sure it is firmly mounted and slid all the way back against the port in the case.
Tidy up the wires, and route the wires for laser and servo through the slot in front.
Seat the battery box on top of the base, place the lid and snap the side clips on to hold everything together.
Push the small servo mount on to the large servo, and then push the laser mount onto the small servo. See finished photos for approximate orientation, but you will probably have to remove and re-aim anyway to suit your space.
Install the hook on the side if you plan to hang from ceiling.
Step 6: Test and Adjust
OK you have the thing working, now you have to orient the laser. Decide if you want to set it on a shelf or ledge as in the photo, or if you will hang it from the hook. Put the laser where you will use it and turn it on to observe the area it is passing over. Give it a minute and the extents will become obvious. Turn off the laser. Remove the servo mount or the laser mount by pulling straight out on them. Rotate the desired angle and reinstall by pressing back on. If you would like further control over either axis consult the documentation on github for how to adjust the range settings in software.
Step 7: Play
Once the software is uploaded to the board, and you have calibrated the device to your liking, put it up high and turn it on! Your cats will quickly learn the servo sound and come running to play as soon as they hear it. Please if you make one, post a video in the comments of your cats playing with it!
Step 8: Improvements
I am open to ideas and suggestions about new functions, or ways to refine my current functions. The software is a work in progress.
If I have time in the future to update this project I would like to make it interactive in some way, like a video game for cats! I have a few ideas of how this could be accomplished without expensive hardware but would love to hear yours.