X
ander the cat is a much-loved family pet,
but as his owners live in a flat, he can
get a little bored staying indoors when
they’re out at work. Seeking a way to keep his
cat entertained, Enzo Calogero came up with an
ingenious Raspberry Pi-powered project. “We
noticed that he loves to chase a laser light, so we
decide to create a device to make laser games for
him,” explains Enzo.
The result is the Tri-Lasers for Felines device
which, when the cat’s presence is detected by a PIR
motion sensor, beams a laser dot around the room
for Xander to chase between randomly generated
points. Judging by the video on the project’s
Hackster tutorial page (magpi.cc/trilasers), he
seems to love it.Pan and tilt
The laser’s main movement trajectory is handled
by mounting it on a Pan-Tilt HAT, which has
vertical and horizontal servo motors. “A pair of
coordinates (x, y) is generated randomly,” explains
Enzo. “The laser point moves from the current
point to a new coordinate, following the segment
that connects the two points, at a speed defined
by a status variable. Once the new coordinates are
reached, we loop back to point one.”
To add extra interest for Xander, its movement
is randomised further by switching between three
laser diodes to perform micro random movements
very quickly. “Switching the active laser among
the three allows extremely rapid movements of the
laser dot, to create an extra variability of the light
trajectories which seems more enjoyable for the
cat,” says Enzo.
While the laser point is visible in daylight, it
shows up better when there’s less light: “Xander
prefers it when the room is completely dark.”Keeping a modern cat entertained requires
something more high-tech than a ball of yarn.
Phil King wonders if this is a purr-fect project
Tri-Lasers
for Felines
Enzo
CalogeroEnzo is a field
data scientist,
passionate about
microcontrollers,
Raspberry Pi,
and 3D printer
technologies. He
enjoys creating
IoT devices to use
in day-to-day life,
along with robots.
hackster.io/enzoMAKERThe device’s three laser diodes are set into a
3D-printed triangular holder that sits atop the Pan-
Tilt HAT’s acrylic mount – which would normally be
used to hold a Camera Module. Enzo also designed
and 3D-printed a case for the PIR sensor.Cat-a-log
In addition to handling laser movement, the
Python script saves a log of Xander’s activity: “We
check it now and then out for curiosity,” says Enzo.
“When Xander was a kitten, he was playing with
it very often. Now he is a bit older and much more
prone to sleep rather than play, we switch it on
when we are out in the evening to keep him busy
during our prolonged absence.”
One issue that came up is that, being naturally
curious animals, cats are prone to investigate
any new objects. “We try to put it as high andtilt sensor was added to shut down the device if A
interfered with by a curious catWarning!
Laser eye!Don’t look into a laser
beam, and don’t point
a laser beam at a
somebody’s head.
magpi.cc/lasersafety18 magpi.cc Tri-Lasers for Felines
PROJECT SHOWCASE