Making a Better Mouse Trap Using Arduino

There are a lot of things this world needs at the moment.  One of them is a better mouse trap.  Mice are getting smarter every day and if we’re not careful we’ll end up with Planet of the Mice.  Luckily, with the help of a Makerbot Replicator 2 (its enormous 410 cubic inch build volume and 100 micron resolution, “100 microns!”) we can tackle this problem.  And maybe even have a little fun doing it.

The concept is simple:

1 – We set up a real spooky-looking castle.  If movies have taught us anything, it’s that a spooky house is simply irresistible to people.  The louder you scream “DON’T GO IN!” at your TV, the more they want to go in.  I don’t understand it, that’s just the way it is.  Mice should be no different.   We turn the house into a castle for good measure.

2 – Out with the old, in with the new.  A loaded spring just doesn’t cut it anymore, we’re in the 21st century.  We need to throw everything we’ve got at this mouse.  That’s why this castle is loaded with an Arduino Uno.  Yes that’s right, we’re talking a jaw dropping 20MHz of raw computational power, 32K of program space and so much more.  The mouse doesn’t stand a chance.

3 – Hook up crazy sensors and motors into this digital brain to track the mouse’s every movement. (ok, so it’s a couple photocells and such, but it should work).

4 – When the mouse ventures into the den of evil we slam the gate shut, hoist the trembling mouse to the heavens while calling upon the gods to bring out the moon and some lightning.  At this point the mouse will be so traumatized (in a good way) that it will bother you no further.  No need to kill it, just send it on its way with a nod of the head and a tip of the hat.

That’s the plan.

The truth is, creating this design would not be possible without an affordable 3D printer (aka Replicator 2).  3D printing lets you efficiently explore the inefficient.  The 3D printing revolution is not about printing what you normally buy, it’s about being able to create what doesn’t exist.  As playful as this mouse trap is, I’d like to think it’s along that vein.

I don’t have a 3D printer, although I’ve been drooling over one for a long time.  This Instructable is created to enter the 3D Design Contest at Instructables with the hopes of winning a Replicator 2.  This is what I’d like to make if I had one.  Voting for it would be much appreciated.

With that said, I’ve done my best to think through this entire project.  I’ve modeled all components to scale and have confined them to a Replicator 2’s build volume.  I’ve tested out the circuits and micro controller code to the best of my ability.  I’ve sourced all electronic components from Sparkfun.com.  This is a custom built rig (pulled from the depths of my brain) designed to fit together with exacting tolerances.  If you’re looking for a bit of adventure, I think this Instructable is for you.

Step 1: Castle Rundown

Making a Better Mouse Trap

Step 2: In More Practical Terms…

1) A Photocell sensor is placed in one side of entrance.  A Red LED on the other side shines into this sensor.  The micro controller watches this sensor and waits for a drop (when the mouse enters the doorway and blocks the LED).2) When the light again shines on the sensor we assume that the mouse has entered the castle.  A servo is activated pulling a string tied to the gate pin which releases the gate.  The mouse is now trapped in the Den of Evil.

3) A motor is then activated which drives a set of gears.  These gears drive a set of screw hoists on either side of the lift plate which lift the Den of Evil up into the sky (about 2 inches…).  The lift plate has an attached LED.  When this LED shines into the top lift plate sensor the motor is stopped.

4) At this point a second servo is activated which lifts an attached moon into the night sky.

5) To finish things off, a white (lightning) LED located in the left tower strobes to simulate a truly dark and stormy night.

At this point the Den of Evil can be removed from the lift plate and the mouse let on its merry way.

Two buttons are included to move the lift plate up and down.  And two pots are included to trim the gate pin servo and adjust the photocell sensors bias.

Equipment:
-Computer
Makerbot Replicator 2

Electronics:
Arduino Uno
Mini Metal Gearmotor x2
Small Servo x2
Red LED x2
White LED
Photocell x3
Push Button x2
Transistor x2
Potentiometer x2
Diode x2
330 ohm Resistors
10K ohm Resistors

Breadboard
M/F Wires Pack
M/M Wires Pack
Jump Wire Pack
(There’s a bit too man wires here, but it illustrates what you need: jump wires to keep the breadboard orderly; M/M and M/F wires)

Materials:
Makerbot PLA filament (1 spool)
-Scotch Tape
-Fine Sand Paper
-Hair Clipper Oil
-Elastic Bands
-Dental Floss
-White Glue

Tools:
-Xacto Knife
-Needle Nose Pliers
-Wire Strippers

Making a Better Mouse Trap circuit

Step 3: Build Plate Legends

You will need to build three plates on your Replicator 2 using the supplied files.  Use the corresponding build plate legends to reference all components while constructing.  Note that the left/right convention is based on looking at the front/top view of the castle.

These build plates are release under the CC-BY 3.0 license.


About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top