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.
SAFETY NOTICE
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.
Soldering tools
Small screwdriver
Usb to micro usb DATA cable (be certain it is a data cable and not just charging)
Hot glue
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.
18 Comments
1 year ago
I hope you see this. I need a little help to finish this project. I am trying to create this using an Arduino nano. I have found I am having a lot of trouble powering the device. It seems 4 AA batteries is not enough power for everything to function. I checked the voltage of the batteries to confirm that they are charged and my nano is getting power through the "vin" pin. Do you have any tips on how to properly wire this up using the Nano?
Reply 1 year ago
Hi Sorry you're having trouble. According to the datasheet the trinket input voltage range is 2.3V - 16V and the nano is 7V - 12V. 4 AA bateries should supply between 3.6 and 6V so I think you will need to add a dc-dc boost converter if you are convinced you want to stick with the nano and my 3d case file. This will no doubt affect battery life though. Also, you will most likely have to alter the code to run on nano. Seems it would be easier to order a trinket? I have been wanting to revisit this project because I know it can be improved. Will post the link here if I do. I'd like to see the whole unit be half the size, use a board that is easier to source, print without supports and include a rechargeable battery as well as including the charger internally. Let me know if you get yours to work -
Reply 1 year ago
Reply 1 year ago
I just received my trinket in the mail today. I'm going to wire it up and test it out. Thank you for the tip! The only reason I was trying to use the nano is because I already had one laying around. I would love to see a rechargeable one. Maybe you could design one that uses a few 18650's and a regulator? That might make this unit larger though. I'll make sure to post a video of my furry friend playing with it once I have completed mine.
1 year ago
Hi! I have literally 0 knowledge on this subject, I am just trying to take advantage of the great experts across the internet! I was wondering how realistic a solar powered cat laser would be? Thanks!
6 years ago
Excellent instructable! Considering that the KY-008 is a Class 3R laser (equivalent to the old class IIIa) because the emitter power is about 5 mW, I would suggest using a diffuser screen in front of the laser lens to reduce the risk of retinal damage in the cat eyes in the case of a reflection in the floor or even if the cat stares at the laser source.
Reply 6 years ago
Hi,
I was thinking about the same issue. What would you suggest using for the diffuser screen?
Reply 6 years ago
Hello Wader_669 Please read my recent comment to fluxaxiom regarding the use of a transmission grating built from a CD or a DVD disc.
Reply 6 years ago
I share your concern for the cats eye safety. I would be very upset if even one cat was vision impaired because of this device. Allow me to share my research with you on it so far - There are 2 factors that contribute to eye injury from laser, the power output of the laser and the duration of the beam hitting the retina. As far as power output goes, I wont argue here that it would be better to diffuse the beam or dim it somehow so I would appreciate any input on how to accomplish this. I have only achieved spreading the beam out with any diffusion material and this seems like it may increase the duration of exposure. So the second factor, and this is why I feel it is safe, is the duration of exposure. The beam is constantly moving, and it is very very unlikely to strike the cats retina for more than the 1/4 second that is deemed safe. In addition to this the cats reflex time to look away would be far less than 1/4 second. That being said a little common sense goes a long way. The further the device is from the floor, the better. I will add a safety recommendation about reflective flooring and diffusion, and also that if you have a cat that is staring at the device instead of chasing the dot, maybe this device is not for that cat unfortunately. It would be better not to stress them out and give the device to someone else. I have tested on about 20 cats over the past year and there was only one cat that was trying to murder the device, and thats when I added a ceiling hook which solved the problem.
Reply 6 years ago
Thanks for your thoughtful response and for adding the safety notice to your instructable.
I have been experimenting a lot with commercial optical diffusers for laser beam shaping, but I consider these expensive for a cat laser toy.
A cheaper solution would be making a simple transmission grating from an old CD or DVD disc with the reflecting layer peeled off (use packing tape to peel it without damaging the transparent disc). Just experiment with the distance between the laser diode and the transmission grating.
Using the transmission grating or any diffuser will increase the duration of the exposure but it will reduce the radiation at the retina because the same radiation will be spread over a larger surface (hopefully larger that the eye), so the pupil will allow much less radiation into the retina.
I agree with you that the risk of injury is reduced because the duration of exposure is low. One way to make it lower while keeping the cat interested would be using a simple pulse width modulator with the laser diode to reduce the intensity and to control the continuous duration of the laser beam.
One of my cats always look for the source of the laser or any reflected light that is moving. I will implement the transmission grating and the PWM laser control to avoid accidental injury to her eyes.
I love your integrated battery box and servo mount concept. I will add a 1/4-20 UNC thread to use it with a mini ball head camera mount.
6 years ago
Hey,
Working on the same, but control through BT and android phone.
Code is still sketchy but can share. Android app done in MIT app inventor 2.
Video: https://youtu.be/cb4GSk_pCVU
Reply 6 years ago
@Fluxaxiom Nice work on the code
Reply 6 years ago
Thanks I'm going to post an update to the code very soon. I'll check yours out too.
6 years ago
could you make another and sell it to me?
Reply 6 years ago
Sure send me a message and we can work out the details.
Reply 6 years ago
how do I send you a message?
Reply 6 years ago
Click on my user name and you will see button to send message. Sorry just dont want you to share any personal info in comments
6 years ago
Your instructable is awesome see mine friend's at
https://www.instructables.com/id/Go-Green-Powerbank-W-Speaker-and-LEDs-1