This electronic mousetrap uses a PIR motion sensor to release a door when a mouse or rat enters the trap. The PIR was removed from its case and the sensor peeks through a hole in an aluminum-clad board. It turns out that a rat will gnaw right through the plastic of a typical PIR sensor, if given enough time! The audio beeping from the sensor triggers a two-FET circuit that momentarily closes a relay, operating a motor that pulls a pin, releasing the door. A homemade latch is visible on the left and it was enhanced by the addition of a cabinet latch. They now work together to keep the door tight against the hole. A piece of poster board shields the PIR sensor from the intruder until he gets deep inside the trap. Otherwise, the long tail on a large rat will still be sticking out of the door, letting him escape. Another piece of white poster board along the back keeps IR reflections from triggering the detector early. The box is a plastic terrarium with the screen shield and door replaced with a thick piece of plywood, with an appropriate dado to let it slide into place.
A piece of nylon lacing cord is used to pull the pin holding the door. The cord is secured to the motor shaft by jamming a plastic roller over the string and shaft, pinching the string against the shaft. This is a neat way to make a linear servo with lots of pulling power. The pin is positioned by hand to reset the trap. I leave a little slack in the string so that the motor gets up a little momentum before it tries to pull the pin. Gravity slams the door.
Put the bait off to the right so the little fellow gets all the way inside the trap. The PIR sensor is lined up with the little hole in the aluminum plate. He won't gnaw through that!
Here's the Results Video Look closely and you can see the plastic parts he chewed off the PIR detector.
There are any number of ways to do this project, but I've learned that rats are really, really smart. And they are afraid of "contraptions." My first trap was built into an old Dewalt saw case using a string and trigger platform (no electronics). It was scary-looking and this NIMH rat of mine wouldn't go in it. I had a security camera catching the action. He would reach up and pull on the suspicious-looking door! He'd sit outside looking in at the food, then suddenly jump back, as though he suddenly realized it was a trap! This trap has transparent sides and is much less intimidating. He still hesitated because of the overhead door and he inspected it for a few days before going in. He would leave his back legs outside and try to reach the bait by stretching! I'm dead serious; he must have realized the door could drop. I had to add the paper barricade because his stretching would set off the PIR. When the door fell on him, I think he realized it wasn't heavy or dangerous. I suppose he hadn't figured out what a latch is, although he did inspect it very closely.
Using a motor to wrap a string around its shaft makes for a pretty darned good linear servo with lots of travel.
I discovered that PIR sensors work fine without that big lens, after he chewed it off. I didn't tell you that I caught him twice! The first time I let him go, he saw my truck, jumped in the back and hid in a hole in the bed (where a tie-down is located). I thought he had kept going over the other side of the bed, but I gave him a ride home instead. He was obviously familiar with my truck. Next time, I used a car! I miss the little guy. My cats aren't nearly as smart. Yes, I have cats - go figure. He probably convinced them he was a cat, too.
I remember "rectifying" the beeps with a diode, but I don't see it. It must have turned out that the AC beeps were sufficient to close the relay. Your results may vary.