Introduction: Smart Mouse Trap
For this project, this is an improved version of -Gary's Arduino Mouse Trap (https://www.instructables.com/id/Arduino-Mouse-Trap/) . Once a mouse is caught, an email will be sent to your email address that can be seen on your phone or your computer. Another advantage of this mousetrap is that this is a no-kill trap and the mouse can easily be released by the user once caught. The reason for this design was to be able to catch a mouse and be notified when it's caught rather than having to check on it every so often.
Step 1: Components Required
- Adafruit Feather HUZZAH ESP 8266 (connected to wifi) https://www.adafruit.com/product/3213
- 1 10K ohm resistor
- 1 330 ohm resistor
- Jumper wires
- 1 Servo motor [3V-6V DC]
- 1 IR photo transmitter
- 1 IR emitter
- Case and door for trap
- Bait (once trap is set up)
- Micro USB cable or lithium battery (to power Feather)
The total cost of the trap is about 25$ but several parts could be salvaged from other builds such as resistors, IR emitters, jumper wires, and the case/door for the trap. Also, make sure IR photo transmitter and emitter are at the same wavelength.
Step 2: Fritzing Schematic and Codes
Please make sure to follow the notes on the circuit diagram. Also, when using the mousetrap code in Arduino when you are entering your email and password for your gmail account, make sure to use base 64 encoding with the following link. https://www.base64encode.org/
Further reference for the gmail coding can be referred to here:
The Gsender code is what allows the huzzah to send email through gmail. This code was chosen because gmail would be able to be accessed by the user (other sender codes can be used as well).
Step 3: How to Assemble
To make sure that the circuit worked, I tested the components and the pinouts with an Arduino UNO and modified the code accordingly. After making sure it all worked, then switch the IR emitter and phototransistor to hook up to the cage/box. There are several ways to do this such as little mounting kits. But for sake of ease, I simply slid the box on top of the two. Furthermore, the cage is simply modified chicken wire and the door is a piece of plastic taped to the servo to which the servo is hot glued to the cage. If desired, you can move the servo and adjust the angle of opening and closing accordingly along with the door you use. This design would encage a mouse. However, the door would definitely need to be strengthened in order to hold in a mouse, such as with a thicker piece of plastic or even metal.
Step 4: In Action
In the video, the trap is set to close and shown is simply the door opening and closing.
Have fun building and catching the mice!