Arduino-Powered Trap Hopes To Catch Mice

The old adage that you’ll make a fortune by developing a better mouse trap is not super realistic, as the engineers behind Sony’s Betamax video tape standard could tell you. However, you can still learn a lot building your own, as this project from [ROBO HUB] demonstrates.

The trap is intended to catch mice in a humane fashion, without injury to the animal. To that end, it uses an Arduino Nano armed with an ultrasonic distance sensor  to detect when mice have entered a plastic container. The container’s hinged door is is held open with a servo. When a mouse is detected, the servo trips the door to snap shut under the power of an elastic band.

The key to making this design work well is ensuring that there are no gaps in the closed container that the mouse can use to escape. They’re wily creatures able to squeeze through positively tiny spaces, so it’s important to get this right. Besides that, you want to check the trap regularly, lest any caught mice simply claw and chew their way out.

We’ve seen a few mousetraps around these parts before, too. Video after the break.

30 thoughts on “Arduino-Powered Trap Hopes To Catch Mice

      1. Alternative is to use a IR led break beam, or a non-contact capacitive proximity sensor (you can detect though a 1/4″ sheet of glass even).

        As for false pozzies on PIR – places where you’d be trapping mice tend not to be out in the open, and temperature changes tend to be gradual in such locations as well. I have good results with PIR sensors for a variety of projects, though I’ve not used them for mouse trapping. I trap my barn with snap traps with a row of 4-5 small nails driven up from the bottom along near where the snap lands. Not live capture. but quick and assured.

      2. PIR sensors are mostly prone to false triggers due to EMC and electrical noise pickup. The sensor signal is very weak and amplified a gazillion times before it goes into a simple flipflop and timer circuit in the same IC.

        But anyway, if you tap off the analog amplified signal and feed it into an ADC of a uC, then you can analyze the signal and prevent nearly all false triggers. You can also easily buy such microcontroller based circuits, but they cost around EUR200 or so, just because a 50ct microcontroller is added. It’s a crazy world we’re living in.

        I am also quite surprised have not seen projects like this many times before. It’s a quite simple beginners project that can actually do something useful. Instead all the “arduino” level PIR sensors just use the output from the flipflop & timer circuit.

        But plenty of other electrical sensors could work too. From color sensors to a small load cell or a webcam that happens t be available.

    1. By the time the release happens (click) and the door comes down by gravity the mouse is gone.
      Gravity bucket a plastic wastebasket, let the mouse accelerate instead. Live capture.
      Shawn Woods will show you.

      1. Nope, PIR is at end of 300mm wooden box baited with sultanas. By the time mouse reacts door has dropped and they just have to wait. I had 100% success rate. Currently I’ve run out of mice so any future refinement will have to wait also.

    1. This is indeed the difficult issue. Release them too close and they return. Release them too far away and you risk upsetting another ecosystem.

      Maybe get a cat?

      Someone I know ended up gassing them with his exhaust pipe.

      I just used standard old traps. They seem pretty humane to mice, though big rats survive a while and have to be put out of their misery.

    2. Humane method: take em far somewhere like a state park (the mostly wild park not the picnic and beach park) and let it loose. Releasing during winter might pose problem for mice caught in houses as they might not be used to cold weather and have no shelter.

      Personally I prefer spring loaded trap, instantly kills it then I just dispose in the trash.

      1. Relocating a house mouse to the wilderness is anything but “humane”, these animals are used to find shelter and food at man-made dwellings. They will soon fall pray to predators or die from a stress-induced heart attack. Better use traps that kill instantly.

        1. Absolutely not true! I have a friend who actually use to catch mice on sticky boards, after getting them free from the adhesive he put them through rigorous training by building various obstacle courses for them to work through. He also marked the mice because often times they would escape. And he often would re-catch the same mice. Weird? Maybe… But he also spent 30 years straight in prison, where he first started this practice. So, you have to stop and ask yourself, of the two who endured the most inhuname of conditions?

  1. Did they take into account that mice can HEAR the ultrasound sensor ? Not only it could be unconfortable to them, but it could (I don’t know if it is the right frequency) also act as a deterrent and make the trap useless.

  2. So then what? At least where I live (Arlington, Virginia), it is illegal to release critters that you capture on your property anywhere else. You dispatch them (with a few forbidden exceptions) , or you live with them.

    Just use good ol’ reliable snap traps, and don’t let ecofashionistas overwhelm your common sense.

  3. trapping mice is childs play and doesn’t need this level of sophistication. all sorts of garbage traps will work at mice, though it’s hard to beat the classic “count your fingers” snap trap. i get 6 mice in my basement every september so i’ll be going through this ritual soon, i’m sure. my dad made a non-lethal trap out of a small plastic aquarium, a plastic straw, and a bit of coat hanger folded up to prevent the trap from closing all the way.

    the real challenge is rats. they are smart. i had such a battle with rats that i bought a camera. i recorded rats toting snap traps around the basement, edging into traps and stopping just before the sweet spot, just straight up avoiding them, everything. it was very frustrating. i put building a trap like this onto my todo list, because of the dang rats. you definitely want an innocent-looking path leading to some sort of optical detector, with a servo driving a spring-loaded door…or something crazy like that.

    but before i got around to it, i finally killed the last rat. i had put out a field of glue traps all taped together on their undersides, across his little highway. he got one paw in the first trap and when he pulled it back, he paniced, and that energy of that panic travelled through the tape to all the other glue traps and — BAM! — they all went flying towards him. he spent the evening rolling around at the foot fo my stairs covered in 4 glue traps. i got home, checked the camera, saw that my careful field of glue traps had disappeared, and ran down to finish the job.

    don’t look at me like that. no, YOU’RE captain ahab!

    anyways the good news about rats is they are bigger than mice and it is possible to close up all the holes in the outside of your house well enough to keep rats out. 10 years rat free.

    1. Had what I thought was a rat causing havoc. Set up the trail cam (purchased for the purpose) and it was a bunch or rats. Set a trap (the kill the f’er variety) with peanut butter and returned next morning to a shiny, licked clean trap that was still set. Checked footage and sure enough there he was. Then I stuck an almond on the spike and like 10 minutes later I heard a THWAK! Having trapped plenty of mice I was unprepared for seeing a screaming rat smashed in half at the waist. Lacking a decent way to euthanize it, I slowly backed away and came back like a half hour later to- more screaming.
      I learned two things.
      1. Trailcam was invaluable because it actually showed how they were coming and going. I closed that up and no more problems.
      2. Every one has a different definition of humane but that wasn’t it for me. Prevention is best but if you trap them, be prepared to stomach a quick method of dispatch. If I had to do it again I’d get a $30 bb pistol from the sporting goods store and have that on standby.

      1. it’s brutal but i just beat them with a piece of lumber, because i came across a scene like you describe and that’s what i improvised in a moment. it’s quick and a great way to learn how sincere your desire is to see the end of this fellow mammal :/

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.