I live in an old, less-than-airtight house not far from the Colorado foothills, and sometimes doors and windows get left open. Mostly this isn't a problem, as long as you don't mind the occasional wolf spider, but sometimes (and this is one of those times) there are mice.

Mice are cute, but they're also disgusting, noisy little disease vectors who steal my popcorn and run all over the counters being gross at three in the morning, so I bought some traps.

As it happens, I also just got an Adafruit IO beta account, and I was curious how hard it'd be to automatically log some concrete data about my mouse problem. Despite a few hiccups, it turns out to work pretty well.

To replicate this project, you'll need:

  • A suitable mousetrap - You could probably adapt most mechanical traps to the simple sensors used here with a little work; I went with a model of live trap that I've had good luck with in the past.
  • A baseplate and fasteners for the trap - more on this in a moment.
  • Peanut butter, tasty dry noodles, or other suitable bait.
  • Raspberry Pi - I used a model B+, but nearly any version should work.
  • Internet connectivity, plus a WiFi dongle or ethernet cable that reaches to your trap location.
  • An Adafruit IO account - since IO is currently in limited beta, we'll also explore how to log data to SQLite (and hey, that's pretty handy anyhow).
  • A PIR motion sensor.
  • A door sensor.
  • Jumper wires.
  • Mice.

Before You Begin

This project should be fairly easy going for beginners, but it does lean on a few basic electronics and software skills. You might want to keep these other resources in mind:

This guide was first published on May 01, 2015. It was last updated on Mar 08, 2024.

This page (Overview) was last updated on Apr 28, 2015.

Text editor powered by tinymce.