Tuesday, February 22, 2011

Okay, so I just installed an electronically-checkable mousetrap

I've got a little critter living in my ceiling. For the past couple days, I've heard him skitter around up there at night. Kim mentioned it after hearing it in the floor of the bathroom upstairs, which is over the same space. It was time for a mouse hunt. The problem, though, is that the mouse is in the ceiling, which is an inconvenient place to have to check a mouse trap frequently. (If you've ever failed to check a mouse trap for a day or two and had a mouse in it, you know why it's important to check. BARF.) This brought to mind a project I'd seen on The Internet- a guy wired up a mousetrap so that he could check the status by a light. It's not hard, actually- it took me less than an hour to replicate. The basics are this- when the mouse trap is set and ready for a mouse- that is, not tripped- the bait holder and the little bar that holds back mouse death are touching. When a mouse springs the trap, these two break contact. They are also copper-coated metal, so they are electrically conductive and solderable. One can wire these two pieces as a switch between a power source and a little light, and then when the mousetrap is set off, the light will turn off. Ta-da!

I decided to do this, and hunted around for some parts. Two LEDs were harvested from an over-designed computer case. A few months ago I combined two broken aquarium lights into two working ones, and harvested a 5-volt power supply from that, as well as some wire I used. That got wire-nutted to a 110v power plug and after some trial-and-error soldering, an electronically-checkable mousetrap was born. Here's how I originally soldered the mousetrap up:

 The red wire seen at the back is soldered to the trip bar (I'll call it) and as you can see, black to the bait holder. The wire color is insignificant here, as really it's just a switch, and therefore, monopolar.

 Hey look, my camera takes good macro shots. This is a bad place to solder to, as the presence of the wire causes the bait holder to shift and not hold the trip bar in place at all. I removed it from here and soldered it onto the staple that holds it down, which works a treat.

Here it is installed. Argus the ever-watchful deer is playing stand for the power supply. The wires going up into the ceiling are connected to the mousetrap, and the power supply is made up of the transformer hanging behind Argus' ear and a rectifier/capacitor package shrinkwrapped inline downstream of the transformer. From there, it's just an LED/resistor package wired in series with the mousetrap. When the mouse trap is tripped, then Argus will no longer glow blue. The wires coming down from inside his ears are earbuds, not part of the project.

Now, as soon as some unfortunate mouse covets the delicious peanut butter in the trap, I will know because the blue LEDs will go out. All I have to do to check the trap is look at Argus once in a while.

I'm not sure if this even qualifies as 'electronic' rather than just plain electric- the only semiconductors in the whole thing are the diodes in the rectifier and the LEDs, and those aren't the heart of the mini-project. Maybe I can integrate the MSP430 microcontroller I just got courtesy of Texas Instruments into this somehow to make it twitter when a mouse is caught or something. (Not likely with 2k of memory)

Update: Hello hack-a-day-ers! When I got up this morning, the lights were out, and sure enough, I found a little mouse interloper in the trap. And yes, the deer head looked like that before I did this project.