Introduction: How to Make Arduino Mouse Trap | Harmless Mouse Trap DIY

About: Founder of letsmakeprojects.com...Sciency Guy who always try to make innovative projects,check out what i made in my instructable..

Hello readers in this special Instructables I will show you how I made this Arduino Mouse Trap for your home.

Pests are everywhere and so are the mouse, they can be in your garage, store rooms, and also in the kitchen a few times!

The main reason for making this mouse trap is most people buy traps that are harmful or cause pain to the mouse. Even those are living things and have the right to live as we do.

These words may get on the nerves of a few people, but stay calm folks let them live, if they are in your place and can't go away catch them with this trap and release them far away, and after that, you will never see them.

To make it doable for everyone I used the most commonly and easily available materials.

I have not tested this project on a mouse as I just finished the project today morning, Don't judge my project with these words, they work pretty fine and the mechanism of working is 100% precise.

With all this being said let us gather supplies to build this.

Supplies

  • Mini Breadboard
  • Micro servo(plastic geared)
  • Arduino Nano
  • Elastic bandx3 of small size
  • HCSR04 aka ultrasonic sensor
  • 3D printed case for ultrasonic sensor module(optional)
  • Empty plastic jar(I got from the chocolate container)
  • Hot glue
  • A Small Piece of Wood
  • Empty pen and small piece of steel wire
  • Paper cutter

Step 1: Circuit

After we have all the components ready we can proceed with building the circuit, and start by connecting the wires of the ultrasonic sensor to its pins.

Add the Arduino nano to the breadboard and start connecting jumper wires, Trig to D2, Echo to D3, Gnd to Gnd where as Vcc to 5v pins on the nano.

Wires of micro servo Gnd to Gnd of nano, Vcc to 5v pin, and the servo signal pin to D9 of nano.

After this is done we can connect the wires of the micro servo to the breadboard.

You can also use a small breadboard rather than this mini breadboard if you don't have this, purpose is just to make the project as small as possible.

This is a very simple circuit and can be expected to be completed in less than 5 minutes.

Want to simplify this circuit again? PCBs for your electronic projects from PCBWay.is the best option

Why them? They have provided me with the best PCB and The quality is just amazing compared to other providers in the market

A revolutionary solution that combines the best of both rigid and flexible circuitry to elevate your electronic projects to new heights.

With their expertise in advanced manufacturing techniques, they offer a seamless integration of rigid and flexible components, ensuring enhanced reliability, durability, and space-saving benefits

Check Here for Rigid-flex Pcbs with this your circuit becomes flexible! i have added the images on this step kindly check

I bet you have not seen anywhere such assembly capabilities, Check here to know their best in-industry assembly techniques

Step 2: Arduino Code

Before uploading the codes for this project you might need to install the servo library.

You can get the servo.h library from here( this step is only if you are using the IDE for the first time)

After you download the library, go to sketch ->include .zip library -> select the location of the downloaded library and click ok

After the library is updated, select the type of board and port and click on the upload button.

Now you have the code inside nano and our project's main system is almost ready.

We will now make an enclosure to hold all these components.

Since I will use this cable later for supplying USB power save the wire so that it is handy later

Step 3: Preparing Container

Cut the front part of the container, I found that using this part comes with a lot of advantages the first being the strength

Second is visibility, Start by cutting the front part, and make sure your container is also square in shape, a round shape does not work for this project.

To increase the strength I will add a small piece of wood, this also acts as a holder for electronic components.

Use hot glue to stick this piece of wood, and later make a slot for the ultrasonic sensor by marking and later cutting those.

Paste the breadboard on this wood, use hot glue if you think it's necessary.

Before gluing these make sure you are adding an elastic band.

My size bands are small, so I had to combine two of them, if you have a large one can replace two.

Use hot glue to fill the edges if any when you are adding this holder.


Step 4: Open Close Mechanism

This is the main part of this project, if this is weak then your mouse will be escaping in no time! if it happens what a shame on the hard work! But it won't happen if you follow this mechanism as I did.

I added an elastic band closing mechanism, this ensures the lid is closed in a split second when the mouse enters and as soon as the micro servo horns move.

I marked a small dot on the tip of the jar and made a small hole, the elastic band that we added earlier will be coming here.

This is tricky, use a small piece of fishing wire to insert the elastic band into the hole and lock it with a toothpick or a screw.

Now for the stick part, I used an old pen tube that was strong.

Use hot glue to stick this pen to the lid of the jar, and test if the lid closes after you open it with good force.

If it works add one more elastic band, this will be the stick holder that plays the role of trigger.


Step 5: Build Phase 2

Test if the stick functions smoothly and there are no gaps in the jar when the lid is closing.

You can refer to the first visual that shows the locking method.

After this we can proceed with the servo part, you can use that unused space on the wood!

I used a small drop of hot glue to get this on the piece of wood. Make sure that the glue is not too hot which may disfigure the micro servo!

I made a small part from steel wire that was added to the micro servo horn.

The open wires seemed to be messy so I used a strip of cardboard to hide them, seal them using hot glue.

Step 6: How to Use

Using this device is easy as eating cupcakes! Yeah, you heard it right.

To use this device make sure the power bank USB is disconnected.

Pull the pen down, this is like pulling a catapult but with very less force, after you pull the stick/pen hook the rubber band on its tip.

Now the steel wire from the micro servo horn will be attached to this elastic band.

Place something inside the jar so that your mouse can give a visit inside.

Now connect the power supply from the power bank to the Nano board.

Go finish your chores and check back later, if the food you placed inside the jar is mouse favorite definitely you will find them trapped inside.

After you finally have them, go outside may be the woods or nature around you, and release them :)

This brings great joy for me and hopefully you too

Step 7: Working Video

The project sounds amazing but the working is just awesome, watch this video that shows step-by-step instructions on building and working on this project, this project delivered a 100% success rate and there is no chance of missing anything that goes inside!

Hope you will try to build this project, All the best have a great day :)

Unusual Uses Contest

Participated in the
Unusual Uses Contest