It watches her. When she loses interest it walks the dot into her line of sight and trembles until she looks. When she finally lands a paw on it, it waits a beat — then bolts the other way and the hunt starts again.
Ordinary auto-lasers sweep in patterns. Cats aren't hunting patterns — they're hunting something that reacts, gets caught, and gets away again.
The client, conducting a rigorous inspection.
Thirty times a second, the same three steps a real predator runs.
A camera on the turret head. Every frame goes through a detector that knows a cat when it sees one.
Frame-to-frame change gives speed and heading. A filter smooths the noise and projects forward.
Aim just ahead of her, not at her — close enough that the pounce is worth trying, quick enough to slide out from under her paw.
Cat not playing? The dot walks into her line of sight and trembles right in front of her until she looks — then scampers off in one direction for her to follow.
When she freezes and stares, it freezes too. Prey that stops moving is the one thing a cat cannot walk away from — so she commits and ambushes it.
Her paw lands on it. It waits a beat under her foot — long enough to feel like a win — then bolts the opposite way. Caught, never kept.
Move your cursor (or finger) around the box — you're the cat.
Open it on any phone on the same wifi. Live camera, live aim, live score.
Nothing else in this category tells you anything about your cat.
Not a simulation — this is the toy on a bucket, a laptop running the vision, and a cat who has done this before. Sound on: you can hear her land on it.
Every component got a custom mount with Lego studs — so printed parts and bricks share one grid.
Supervised CAD. Every mount modelled around the real part.
A project still being tuned needs to change shape. Bricks mean balance, camera angle and laser alignment can be redone in seconds instead of a four-hour reprint.
Yellow and blue aren't decoration. Cats are dichromats — blues and yellows read clearly, reds and greens wash out to grey. The toy is coloured for the species using it.
Version one was a laser pen zip-tied to a servo, balanced on a glass box, aimed by hand — just enough to prove the geometry worked.
Prototype one. Ugly, and completely necessary.
It isn't a sealed box. It's a parts list, a set of printable mounts, and a brick-by-brick guide — change the shape whenever you want.
Screw the electronics into their printed mounts, then stack the whole turret in bricks.
Camera, laser pen, both servos, the board and the breadboard each get screwed into their printed holder first. Do this before any bricks.
Place two 2×4 bricks with 5 studs of gap between them. These are the turret's legs.
Sit the horizontal pan servo module on top of both bricks so it spans the gap, output shaft facing up.
Attach a 2×6 to the servo's metal spinning disc. This becomes the rotating platform — everything above turns with it.
On the 2×6, add two 2×2 bricks with a 2-stud gap. That gap is the pass-through for the camera cable.
Mount the tilt servo module upright on the two 2×2s, then clip its support handle on top of the module.
Same trick again — a 2×6 onto the tilt servo's spinning disc. This is the head.
Clip both holders side by side on the 2×6, facing the same direction. That alignment is what lets the software aim without calibration.
Attach the ESP32-S3 tray and the breadboard tray to the free edges of the baseplate, away from the turret's sweep.
Feed the camera cable and servo leads up through the 2-stud channel. Leave plenty of slack — panning twists them, and a taut cable stalls a servo.
Four kinds of connection. Nothing else touches the board.
A microcontroller can't run a neural network. A laptop can't hold a servo steady. So each does one job.
Mounted on the head, so it always looks where the laser points.
YOLOv8-nano finds the cat. A Kalman filter cleans it into position + velocity.
Predicted position drives a proportional loop that outputs pan and tilt.
Angles stream at 20 Hz. Two servos move the head; the laser rides alongside.
Each decision had a much harder path on the other side. Each failure produced a rule worth keeping.
A fixed camera means solving image-plane-to-floor geometry, then floor-to-servo angles, and recalibrating whenever anything moves. Mounting it beside the laser turns it into: cat left of centre → turn left.
Deleted a whole calibration stageAiming straight at the cat is easier and completely wrong — a dot she can hold down ends the game. Leading her keeps it inside pouncing range but still able to leave, which is the band where she keeps playing.
The lead distance became the fun dialRunning detection on the microcontroller was never possible. Keeping vision in Python meant a real debugger and instant iteration.
Tracking was proven before any hardware arrivedCustom mounts with Lego studs meant the geometry could change in seconds rather than a reprint.
Balance re-tuned a dozen times at zero costServos drew current through the controller's 5 V rail. Each move sagged the voltage and reset the chip mid-loop — which looked exactly like a software bug. A rewiring slip during the fix killed a board outright: 60 °C in two seconds.
Rule: servos get their own supply, sharing only ground.When the board reset, its USB-serial device vanished and the connection went stale. Auto-reconnect kept it limping, which hid the real cause for far too long.
Rule: a workaround firing constantly is a symptom, not a fix.Once the camera moved with the head, the sign of the error flipped. The turret chased away from the cat and lost her instantly — a stable-looking loop, wired backwards.
Rule: confirm loop polarity before touching gains.High gain overshot and wobbled; low gain trailed behind a moving cat. A jittering dot near centre made both worse.
Rule: tune gain for capture, add a dead-zone for rest.That deserves more than good intentions.
Detection, lead prediction, servo control and the live app, end to end.
Switching the laser from a pin unlocks prey behaviour: freeze, vanish, play dead.
Move vision onto a single-board computer so it runs with no laptop.
Hold her success rate near 70% — the band where play stays addictive.
A camera, two servos, a pile of bricks, and a cat who wins just often enough to keep coming back.