Building A Better Mousetrap With The Raspberry Pi

Build a better mousetrap, and the world will beat a path to your door, but what about a smarter mousetrap? [Alain] decided to find out by making a Raspberry Pi-powered, Internet-connected smart trap. The brains of the operation is a Pi running Arch Linux. Connected to that is a IR trigger, a servo to unlatch the sliding door, and a camera to see your new friend.

The housing of the trap is CNC cut foam PVC board, which is both easy to cut and to clean. Once the IR beam is broken the Pi turns the servo, which pulls a pin on the front door. Once your new friend is settled in a LED light turns on to illuminate the subject, a picture is taken and sent via email.

With automated alerts you don’t have to manually check the trap, and you also don’t have to worry about a trapped animal being inside for too long. Join us after the break for a demonstration video showing off all the features, and a real world example.

25 thoughts on “Building A Better Mousetrap With The Raspberry Pi

  1. neat! can he remotely spring/re-arm the trap, or is the servo & ir-beam a seperate thing ? I’m guessing that is the case cause of the little end-run-switch behind the servo horn..

    1. It could be done if the door mechanism works like a lever ratchet hoist, so each back and forth motion off the servo pulls up the door. If you are clever, you can also use the same servo to hit the quick release on the far end of its swing.

  2. Great project! A build something similar using a Arduino, and IR distance sensor. The housing was a empty pack of pringles and the “door” closed via servo. I caught 7 mice and set them free in nearby forest.

  3. No door needed no trip just use the sensing to energize the grid floor with a charge of HV. Then with a delay of a few seconds the corpse is flipped off into a disposal can. Bait is under the grid, ready for more and more.
    Anyone trying to be St. Frances to mice should watch the videos of rampant mice in Australia, or live in the four corners area where the Hanta virus came from. I often have to work on the organ or piano that has become a mouse city. Birdseed, cat and dog food, pasta and other man provided foods are found in the stores of mouse city.
    Mouse city has no bathrooms! Your piano is a mouse toilet and worse.

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.