Laser toy for cats & dogs

March 4, 2025
Description
This project is an automated laser toy designed to entertain pets, using an Arduino-controlled pan-and-tilt system. It utilizes SG90 servos to move a laser pointer in smooth, predefined motion patterns, creating an engaging and interactive experience for pets. The servos are mounted on a 3D-printed pan-and-tilt mechanism, allowing precise control of the laser’s movement.
The system follows a set of programmed coordinates, smoothly transitioning between positions using mapped servo angles. The laser remains active while the servos move in incremental steps to simulate unpredictable motion, keeping the pet engaged.
Required materials:
-Arduino microcontroller (Works well in UNO and NANO - just be aware the servos have to be connected to PMW pins)
-Protoboard
-SG90 microservo (X2 ea)
-KY-008 Laser Module (Laser compatible with Arduino )
-Jumper wires
IMPORTANT NOTE:
Before assembly, run the code “CALIBRATION” with both servos connected to the arduino. The job of this code is to set each servo on the correct position so when you install the pan and tilt system, all works as expected.
Build instructions:
3D model was designed to fit a commercial protoboard.
One of the servos is the one in charge of horizontal movement - this is the one which fits the base for the protoboard.
The other one, is the one in charge of vertical movement - this is the one which fits on the upper part of the assembly.
Assembly “Breadboard box support”:
When assemblied, insert the first servo into the base:
Assembly “PAN & TILT X-Axis”:
When assemblied, insert this inside the gear of the servo which was installed on the base.
Assembly “PAN & TILT Y-Axis”:
Then, insert this into the other servo:
And then, insert this servo into the previous assemblied part:
Last but not least, insert he laser module into the adequate space:
About the code:
Remeber to first run the “CALIBRATION” code to endure the servos are on the right position before executing the actual code which moves the servos.
Copy the code from file CODE.txt and upload it into the Arduino. By default, the servos will draw some circles and patterns on the floor so the pet can chase the laser. However, you can change the shape the code does by asking the below to an AI powered tool and replacing the coordinates betwen lines #39 and #52:
on a grid from -100 to 100 in X and Y, give me the coordinates for __________ (insert the shape you want to do)
Following this format:
{X1, Y1}, {X2, Y2}, {X3, Y3}...{Xn, Yn}
Wiring information:
Servo 1 (X-Axis):
Servo 2 (Y-Axis):
Laser:
Schematic: