Introduction: A More Complicated Better Mouse Trap
I live in the Australian bush, a place where almost everything is trying to kill you, but that doesn't mean we have to kill them back.
There is a local rodent...OK, it is a rat...but it is a cool native rat, Rattus Fuscipes not one of those nasty introduced black rats Rattus Rattus (that I won't even dignify by linking to an image). We are very tolerant of native animals in our house, regular visitors include snakes, bats, antechinus, geckos, all sorts of things. But the native rats aren't so welcome as they like to chew stuff.
They especially like food and will chew through anything, including plastic containers and lids to get at it. When we grab a container, it is not at all unusual to find something like the images above.
Step 1: The Problem
For a long time I have used a live trap that works about 50% of the time. The problem with it is that it is mechanical. It relies on the critter entering the trap, pulling on the bait which moves a lever, releasing the door. The next morning they are released, hopefully far enough away that they don't come back.
Did you notice the emphasis on pulling? Check out the images for a schematic of how the trap works
The 50% of the time the trap doesn't work is (I assume) because they push on the bait, securing the door rather than releasing it. Clever, and now well fed, critters.
I love having ideas, making and fixing things and also playing with microcontrollers like Arduino, so I came up with something that hopefully will be the solution.
Step 2: The Solution
This isn't a particularly difficult thing to build, and it would certainly qualify for a prize in an Instructables "Over complicate it" competition, but for now it will have to go into the sensors comp.
In effect, by using the PIR sensor I don't even need to bait the arm of the trap. All that is required is a few tasty morsels scattered in front of the cage to get them interested then an enticing pile inside it so they trigger the sensor.
For What It Is Worth: years of experimenting leads me to the conclusion that the best bait is peanut butter.
Parts required:
- Mechanical rodent live trap - No, not a trap for mechanical rodents. I have had mine for a few years and can't find the same model for sale, but there are similar . things where the principal will work
- Arduino - I am using an Etherten for the prototype, but the final version will be an ATTiny
- PIR SENSOR - a motion detector, they are really cheap on ebay
- Servo - doesn't need to be powerful - also really cheap. I don't think these servos will work :o)
- Breadboard, jumper cables, power supply, bits, pieces, ingenuity
The first thing to do is test your PIR detector. Rather than re-inventing the wheel, here's a tutorial. Obviously the mission is to make sure your Arduino detects motion. As well as the tutorial, you could use the code included in this Instructable as it outputs to the monitor when the PIR sensor is triggered.
If you can't manage it to get this far, then you likely need to go back to Arduino basics otherwise trouble-shooting or understanding the rest of this will be tricky.
Step 3: Get Trapped
Right, we detected some motion with the PIR sensor!
Next let's connect the servo and get it moving via the Arduino IDE. You'll need to ensure the servo library is installed. Does it come as standard with the IDE? I am not sure.
One of the examples from the servo library (file > examples > examples from custom libraries > servo > sweep) is a good place to start. It will simply sweep the servo arm back and forth.
Great! That works too! Now we can assemble our trap tripper.
Remember, this is just a prototype so nothing is permanent at the moment. I used a cable tie to attach the servo to the top of the cage and then some strong thread to connect it to the arm. The hook is nothing more than a paperclip bent to shape. By attaching the servo first, it makes it easier to get the thread length right and adjust it.
I have some insulating material on the bottom of my Arduino, if you don't, be careful not to put yours on the metal cage and cause a short circuit.
Despite having the PIR Sensor set to minimum sensitivity it would still trip the trap if I moved my hand along the outside i.e. when a critter walked past too close. So I wrapped the cage in newspaper as both a shield and also to collect the usual rattish (did you see what I did there?) output when they realise they are stuck.
Notice in the code attached that I have set the final angle of the servo at 135 degrees, your results may vary. I had to tweak it a couple of times to get the start and end positions right. Also, through trial and error I discovered that it needed a 10 second delay at the start before the trap is electronically armed, so you can get your hands out of the way.
Let's try it out
w00t! Watch out rats...
Attachments
Step 4: Improvements?
A few ideas to improve this
- Connect a ESP8266 wifi module and tweet or photograph or SMS or whatever
- Make the internal LED flash forever after it has been triggered so there is an obvious visual clue
- Release some food so the caught animal is rewarded before being relocated
- Make the house rodent proof - I built it, it will never happen :o)
Creating this project was fun, in fact it took more time to make this Instructable :P
The ultimate point is to treat the poor critters humanely. It isn't their fault that we put a huge banquet in front of them and they take advantage of it. Even if you don't complicate your live trap, at least buy one.
Because I can, this is an entry in the Sensor competition, give it a vote if you feel inclined.

Participated in the
Sensors Contest 2017
10 Comments
1 year ago
what keeps another rat from chewing on the controls, etc outside of the trap?
Reply 1 year ago
Nothing. It has never happened.
Why would they want to? And if they do, I will repair it.
Reply 1 year ago
You said they ate plastic.... "They especially like food and will chew through anything, including
plastic containers and lids to get at it. When we grab a container, it
is not at all unusual to find something like the images above."
Reply 1 year ago
I didn't say they "eat plastic", they will chew on it..."to get at (food)".
6 years ago
wtf? A 5 gallon bucket with some water or something sticky on the bottom, a doll rod or bottle or even a ball with peanut butter, cheese( you could even use feces), suspended in the middle with string. WORKS BEST! the rats will jump on the ball and fall in the bucket. It also works for frogs if you add a flashlight.
Reply 1 year ago
I can't believe how old this posting is. I didn't notice that it had been five years when I made my first reply to you.
Reply 1 year ago
I understand your way of catching and controlling the mice population and am glad to know that you are not using poisons that can effect other forms of wildlife. Would it be possible to use a layer of vegetable oil in the bottom of the bucket so that they don't drown. The oil would make their feet too slippery to successfully jump any distance or to climb. Maybe even fun to video. They could be released far from where they were caught and live happily somewhere else. They would be a good food source for wild birds and animals.
Why would you want to catch frogs? I like to have toads, frogs and bats around to keep the bugs at bay. Are they a nuisance where you live, or do you enjoy frog legs?
Reply 6 years ago
You seem to have completely missed the point. Not only is it a live (i.e. humane) trap, it was fun to make the project. And who knows, I might win another Instructables contest.
6 years ago
I love your approach. These animals are just trying to make their way in this world like everyone else, there's really no benefit in killing them.
"Complicating" things is a great way to learn. Constraints like "Can I do this with Arduino" can boost your creativeness, they can "force" you to make the most of it. Whether you fail or not, you'll always learn something. Being creative is overcoming the restrictions.
6 years ago
+1 for going the extra mile to create a reliable live trap instead of a killing device. Best luck for the contest!