Rats chew wires for a mix of biological needs, environmental factors, and opportunistic behavior. The behavior is common in urban, agricultural, and domestic settings and has predictable causes and consequences.
— Rando on Quora
“Vegetarians, and their Hezbollah-like splinter faction, the vegans … are the enemy of everything good and decent in the human spirit.”
— Anthony Bourdain, Kitchen Confidential
Bait in a cage. Rat walks up, sniffs, keeps going. Peanut butter, cheese — same stuff that worked on other rats before. Nights went by. The cage stayed empty.
If the rat won't come to me, I need something that can find the rat and do something about it — on its own.
~$300/month. Done in a week. Zero emotional scarring.
05I am an engineer.
Nothing fancy. Single-class detector, trained locally on the laptop I already had.
Looked fine on validation. That should have been my first warning.
Printed mount clamps over the trigger guard of a Daisy pellet rifle. A single micro-servo arm pivots down and pulls the trigger when the detector sees a rat.
(There's also a shell script you can SSH in and run, if you want to fire it manually.)
Pellet rifle with a servo on the trigger. Raspberry Pi 3 left over from another project running detection. I saw this photo the next morning in the rig's own capture log.
Back-facing Reolink frames weren't enough. I added four new buckets — positives from every angle I could get, and negatives of everything that isn't a rat.
Honestly, I just didn't know how to use the existing tools. So Claude Code wrote a single-purpose Python/Tk app that does exactly what I needed — nothing else.
I assumed I had to carry the full load of the rifle on a custom rotating platform. Sat in Fusion 360 for a weekend — YouTube in one window, CAD in the other — iterating on a thrust-bearing design before touching a printer.
Switched to a CO₂ pistol — lighter, shorter, lower moment arm. No thrust bearing needed; a simple cradle grips the grip and a servo rotates it for pitch.
Open-source LeRobot arm. Load-rated, 3D-printable, designed around Feetech serial servos — way more capable than the hobby servos I had been fighting.
Vibe-coded a tiny browser UI: live camera feed with a crosshair overlay, sliders for yaw and pitch, a center button, a trigger button, and keyboard nudges. Useful for calibration, for testing the detector in-situ, and — importantly — for pulling the trigger yourself.
First clean end-to-end run. Detector locks on, SO-101 slews to target, pitch drops, Daisy goes off.
It is genuinely unsettling to watch a weapon track something on its own — even on an iPad.
Eventually glanced over and the viewfinder was pointed somewhere new.
The Reolink was parked on the burrow — the hole we'd been watching rats come and go from for weeks. After this night: empty. Possibly a hit. Possibly he just moved. Ultimately: shrug.
The camera sits on top of the barrel, so the sightline is offset. To fire accurately, the crosshair on the video feed has to be calibrated back down onto the actual line of fire.
This calibration is only valid at one distance. Change how far the rat is, the offset shifts. Later: a whole failure mode.