Arduino mouse trap


[scott] had a need to capture a mouse and wanted to learn about how to program an arduino, so he built an Arduino controlled mousetrap. It is made from things he had laying around the house, like some Tupperware containers and wooden rods. The program is pretty simple, when a trip wire is touched, the servo jerks the wooden rod out of the way, closing the container. You can see it working after the break. The trip wire seems like a big failure point. he states that it is just a wire, slightly above a tin foil strip. That seems like it would only be a tiny area that the mouse would need to touch to trigger it. What better switch could he design as cheap and quick as possible?


  1. kormsbee says:

    what about using a laser to trip the trap?

  2. Sprite_tm says:

    With lasers! Everything works better with lasers ;) But seriously, you could mount two mirrors on the sides of the device and then bounce a laserbeam a few times between them before letting it fall into an LDR or so. That’d mean the mouse has quite a lot of areas to avoid if he doesn’t want to be locked up.

  3. Sprite_tm says:

    Kormsbee: GMTA, I guess :)

  4. Kyle says:

    I was going to suggest lasers, but now I’ll have to go with capacitance

  5. TinFoilHats says:

    Two sheets of foil.

    Fold the edges of the topmost sheet so that it straddles the lower, and make them the full width of the trap. Mouse steps on the top sheet, crushing it down onto the bottom sheet.

    / ________ \

  6. TinFoilHats says:

    Bleh, my ascii-fu is weak.

  7. Use that palm pilot you were gonna throw out.

  8. aqua_scummm says:

    I’d go with infrared sensing… Paint the whole thing black, or use black construction paper to line the inside. Use a few cheap IR LEDs at the top pointing down to fill the trap with IR light, and use a few IR sensors to detect when there’s something to reflect back IR light.

    Anyone know if mouse eyes are sensitive to IR light?

    I like the idea above with the two big sheets of foil.

  9. aqua_scummm says:

    Is that black thing in the background a cat? Must be a spoiled, lazy cat if so :/

  10. Joe says:
  11. no says:

    no not a cat, thats obviously a persons head

  12. PKM says:

    Bend a piece of card or thick paper almost in half, attach aluminium foil to the inside surfaces, connect foil to wires = pressure plate. The only slightly hard part is getting a small gap that can be closed with a small pressure but that will only take a few minutes bodging.

  13. Gabriel says:

    I like the tinfoil but would add a little scotch tape to keep it in place and a piece of notebook paper over top to keep any reflected light/movement from scaring off the mouse.

  14. Gabriel says:

    plus, scotch tape and foil we all have. spare lasers and ir sensors might be more problematic for the less technical kiddies. :)

  15. liebesiech says:

    I’ll try this as cat trap! Just needs a little bit of scaling :-)
    Thanks for this!

  16. BigD145 says:

    Any thrift store printer will yield IR sensors.

  17. zacdee316 says:

    I do know of a switch that would work better. I recall on this site seening a doormat pressure switch. I tried to search for it but could’nt find it. if anyone can remember what i’m talking about please post the link here.

  18. Todd Grigsby says:

    Wiley Coyote would be proud. And probably scanning the page for the scaled up RoadRunner catching version…

  19. aredhel says:

    A single sheet of tin foil, connected directly to a pin and to V+ through a resistor( someplace between 1K and 10M. 500k works for humans with a sq foot of tin foil). Pull the pin low. Set it to high-z. Time how long it takes for the pin to go high. average 8 times. When the average jumps, some thing is touching or close to touching the tinfoil.

  20. awhaley says:

    A webcam running motion detection software on a nearby PC would be a little more complex but also give him an opportunity to play with that technology and practice developing a very simple real time PC control system. It could communicate via UART or by simple parallel port command to run a line high…

    If you were looking for random ways to trigger it, you could also play with a microphone to detect the sound of mouse in box…

    But obviously the active IR and tinfoils solutions that have already been thrown out are probably the best if actually catching mice is more important to you than playing with more peripheral gizmos. :) Other ideas are just fun.

    And I’m ashamed of any of you that want to add a laser to this project… WITHOUT upgrading that to a rodent-vaporizing cutting laser! Or at LEAST a bright laser directed at the rodent’s face to disorient and nauseate the rodent while the trap mechanism is closed. :P

  21. Gabriel says:

    hahahaha that only works if you plan to monologue to the mouse about your evil plans.
    What about one of those tilt sensing mercury switches out of a thermostat?

  22. Andrew says:

    I would do changes in resistance… but that’s because I don’t know how to do capacitance sensing.

  23. collinstheclown says:

    I would’ve just used some wire, a 9v and a motor from a hand fan with some kinda tin foil pressure switch.

  24. localroger says:

    You know, I had this game when I was a kid. That version had more plastic parts and less electronics. Also, I have it on good authority that actual biological mice can chew their way through Tupperware.

  25. hum4n says:

    flip what you have dude. have the tinfoil on top where when stepped on it gets smooshed on the wire or other tinfoil or whatever. you just need to complete a circuit, KISS.

  26. Psymansays says:

    I would suggest an old PS/2 optical mouse, mounted just above the small entrance hole. The PS/2 signals can be “easily” translated by the MCU, and if a mouse enters, it will tell the MCU that the mouse has moved. There’s a web site on using PS/2 mice that I have bookmarked:

  27. Khordas says:

    I call arduino abuse here. I’m seeing so many projects where the draw is that they use a microcontroller, and when you get into the build, they’re basically using the micro to simulate a switch. This is a good example. Are people so needy for hacking goodness that they have to hack an elaborate and relatively expensive piece of hardware to dumb it down to the level of a momentary contact switch? This project already incorporated a switch, though one of questionable utility.

  28. therian says:

    as for sensor I would suggest using fet static charge detector or high frequency generator and receiver connected by foil pad, if something came close or touch capacitance will change this will result in frequency drift and receiver will stop receive and trigger something

    but there is more simple and better solution, charge a capacitor with high voltage and connect it to pad,something like instant death to anything stepping on it

    or low tech humane solution a bottle trap

  29. eric says:

    Yeah. I have a lot of respect for analog circuit design for problems like this. There is nothing quite like a functional design using opamps, transistors, and passive components.

    That said– you have to learn somewhere, why not learn the hardware while doing something useful like catching a critter?

    zacdee316 — I think this is what you are looking for:

  30. free4all says:

    yes yes …use a “”LAAZZZER”” and kill the mouse

  31. Dan Fruzzetti says:

    Make the floor conductive (foil) and slightly concave (using a plastic can lid, upside-down). A contact just slightly touches the foil on the floor when there is no weight on the plastic. It can be as soft a floor as you like, so the weight of a mouse will easily trip it. The “nominal” position for this circuit is closed, so when the switch opens, the serve yanks out the dowel.

  32. awhaley says:

    I suppose while we’re talking about all the foil contact plates… you could also consider just hooking a neon sign transformer to the foil… and then the tupperware is just there to contain the singed mouse carcass. ;)

    Though I do like the irony of using a ps2 mouse to sense an actual mouse.

    And yes, it IS doing something with a micro that doesn’t require a micro… but if he goes with more advanced sensors in the future, or finds an advantage to adding a delay after the detection before the mechanism activates… I could see the project outgrowing the simple “when this line goes high, set this line high” stage. Now… doing capacative sensing or adding a delay without using a micro would be a much cooler (though still not too difficult display of hackery.

    And for the person who remarked about not understanding capacative sensing… I’m sure there are tutorials out there… basicly you build an RC oscillator, where the mouse( or your finger) could come into contact with the capacitor part, and you time the circuit’s oscillations. When someone touches the capacitor, it takes longer to charge as now there’s more capacitance in the system. The delay indicates a sensor event.

  33. ex-parrot says:

    This did not need a microcontroller. It barely needs any active electronics at all. A latching relay and a limit switch would have done it, or a 555 in one-shot mode at a stretch.

  34. I love all the responses to this. It reminds me of the “How does * replace a light bulb?” joke. I’d have to go with foil contact as the easiest solution, capacitive sensing as the second easiest (as far as having non-specialized components go).

  35. Add glue.

  36. nubie says:

    I see others have mentioned this, but the switch could just close the contact on the motor itself.

    (although as I typed that I realized that the “switch” could just release the “door” on its own.)

    I guess he didn’t want to kill the mouse, but I like mousetraps.

    I keep meaning to hack a mousetrap so that I get an LED or some kind of warning that it has sprung. They are usually placed in an out-of-the-way location and you can forget to check them after a couple months.

  37. Nick says:

    What about a piece of steel wool through a hole in the cheese/crackers? Seems easy enough, and you know the little guy is going to be messing with the food.

  38. Lochan says:

    Gee, we’ll have some robotic mice sometime. Wait until they beat the trap! :D

    Nice play.

  39. willilittlefire says:

    this country gramma thinks this is a real good idea. now… can u add a way to track the mice pathways and with this info, plan multiple traps along their trails? oh ya, what are u using for bait?
    good idea, wish u were my grandson.

  40. draeath says:

    Hang the bait down a single copper wire strand, which passes through a spring. While still, no contact between the wire and sprint, but as soon as the trap is nudged (or the bait is touched) it swings in any direction… and closes the circuit.

    Bad diagram:

    | | |
    / | /
    \ | \
    / | /
    \ | \
    / | /
    \ | \
    / | /
    | | |

  41. richard says:

    Dear Sir/Madam
    My Name is richard from witley and Sons Co.I want to order some mousetrap from your company.and i will really appreciate if you email me with the types you do carry Instock and are available for prompt sale.also let me know your terms of payment.
    Thank you and reply at your earliest convenient

  42. me? says:

    Add a chansaw and some explosives. That makes ANY project better. :)

  43. Edward says:

    “add a chansaw and some explosives. that makes any project better. :)”

    and less legal!

  44. Bleser says:

    cool picsxxx

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,700 other followers