Project in progress
Mouse-O-Leum (Multiple Live Catch) Mouse Trap v2.0

Mouse-O-Leum (Multiple Live Catch) Mouse Trap v2.0 © CC BY-SA

Commercial traps are too small or not good enough so I designed my own electronic version. Mice *cannot* escape if they trigger the IR beam!

  • 4,377 views
  • 12 comments
  • 17 respects

Components and supplies

A000066 iso both
Arduino UNO & Genuino UNO
×1
Infrared Obstacle Avoidance Sensor For Arduino
×1
Solenoid - 5V (Small)
×1
TowerPro MG996R 10kg Servo 10kg / 0.20sec / 55g
It can be any servo but it has to be able to lift the trap door...
×1
Fairchild semiconductor fqu13n06ltu image 75px
Power MOSFET N-Channel
this is needed to drive the solenoid.
×1
5V 1 channel Level Trigger Optocoupler Relais Module for Arduino
I used this to notify my domotica system when catching a mouse
×1

About this project

2018-11-06:

In the coming days I will complete the story and will add the new sketch and schematic.

Why design a mouse trap if you can buy dozens of different model traps?

We have chickens so mice are feasting on the feed and it is hard to avoid having mice rampaging the chicken coop at night.

We first decided we want to catch the mice alive so I first bought some good trip trap mouse traps and set them. Curious what was happening at night in the chicken coop I installed 2 camera's and a Network Video Recorder.

To my frustration the mice did not enter the traps I bought! They sniffed a bit night after night but entering them? No...

From that moment on it was a case of MANKIND against MICE!

I TOOK OUT THE HEAVY GUNS and made a microcontroller powered trap. But this first version of the MouseOleum trap was not good enough because older mice were so incredible fast when the trap doos opened! They could turn and jump out in a matter of 0.1 (!) seconds. I first could not believe my eyes...

Look at some footage of the first build. The 3rd mouse did escape:

3 mice entering the trap, 1 managed to escape!!

Still I caught 12 mice with this trap but still, the score was: MANKIND: 0 - MICE: 1

The MouseOleum v2

Demonstration of the mouse trap:

The "making of video":

Design considerations

A trap door model seemed to me the most simple solution to catch multiple mice. When entering the trap they are 'lowered' into the lobby of the MouseOleum and the trap is ready for the next guest. To prevent escape when triggering the trap, a front door is lowered simultaneously with the trap door.

IT IS IMPORTANT to leave a 5mm gap when lowering the front door because else the tail of the mouse will get stuck and they will be hurt.

Ventilation holes provide enough fresh air. Some hey to provide a soft landing and to hide in and pieces of apple and bread will keep them alive and well.

How does the MouseOleum trap work?

Some peanut butter (NOT cheese...) will lure the mice. I used some wire mesh to make it easy to climb onto the trap. Mice have to get used to a trap so I put some peanut butter on the entrance area, midway and all the way in the back of the trap.

When a mouse enters the trap, it will trigger the first infrared beam. (They cannot see the IR light so are not scared away.) When it goes (often reluctantly) further to the back, the mouse will at some point trigger the second infrared beam and immediately the front door is lowered and simultaneously the trapdoor is opened.

GOTCHA! We now have caught a very frustrated mouse...

NOTES:

TWO IR BEAMS: The first IR beam will trigger a 15 second timer. In this time the second IR beam has to be triggered to actually activate the trapdoors. I designed this on purpose because else a moth or other nasty bug can trigger the trap sometimes continuously!. I observed this on my first design.
As long as a mouse is present in the trap, the timer will reset itself so the 15 second limit is then never exceeded.

The FRONT DOOR is lowered in a 45 degree angle. This way the door closing time can be MUCH faster as when we would use a 90 degree door! Mice are so incredibly fast so I didn't want to give them a chance...

The TRAPDOOR opening time has to be as short as possible. 0.3 seconds open time is more than enough. Any longer and a mouse can maybe jump up.
But I should that happen: the front door is only opened when none of the IR beams are triggered / no mouse is present.

to be continued...

Code

Mouse-O-Leum code 1.0C/C++
//    __  __                              ____         _                              
//   |  \/  |                            / __ \       | |                             
//   | \  / | ___  _   _ ___  ___ ______| |  | |______| |     ___ _   _ _ __ ___      
//   | |\/| |/ _ \| | | / __|/ _ \______| |  | |______| |    / _ \ | | | '_ ` _ \     
//   | |  | | (_) | |_| \__ \  __/      | |__| |      | |___|  __/ |_| | | | | | |    
//   |_|  |_|\___/ \__,_|___/\___|       \____/       |______\___|\__,_|_| |_| |_|    
//                    _ _   _       _        _ _                       _       _      
//                   | | | (_)     | |      | (_)                     | |     | |     
//    _ __ ___  _   _| | |_ _ _ __ | | ___  | |___   _____    ___ __ _| |_ ___| |__   
//   | '_ ` _ \| | | | | __| | '_ \| |/ _ \ | | \ \ / / _ \  / __/ _` | __/ __| '_ \  
//   | | | | | | |_| | | |_| | |_) | |  __/ | | |\ V /  __/ | (_| (_| | || (__| | | | 
//   |_| |_| |_|\__,_|_|\__|_| .__/|_|\___| |_|_| \_/ \___|  \___\__,_|\__\___|_| |_| 
//                           | |      | |                                             
//    _ __ ___   ___  _   _ _|_| ___  | |_ _ __ __ _ _ __                             
//   | '_ ` _ \ / _ \| | | / __|/ _ \ | __| '__/ _` | '_ \                            
//   | | | | | | (_) | |_| \__ \  __/ | |_| | | (_| | |_) |                           
//   |_| |_| |_|\___/ \__,_|___/\___|  \__|_|  \__,_| .__/                            
//                                                  | |                               
//                                                  |_|                               


// free to copy! by Erik de Ruiter
// 2018-10-02 - Version 1.0



//  ########  ######## ######## #### ##    ## ######## 
//  ##     ## ##       ##        ##  ###   ## ##       
//  ##     ## ##       ##        ##  ####  ## ##       
//  ##     ## ######   ######    ##  ## ## ## ######   
//  ##     ## ##       ##        ##  ##  #### ##       
//  ##     ## ##       ##        ##  ##   ### ##       
//  ########  ######## ##       #### ##    ## ######## 


// servo timing data, different for every servo!
// value for servo type:
//                    0 degrees   180 degrees
// Fitec FS5106B:     850         2390
// 0 degrees:
int servoDownTimingMs = 850;
// ~100 degrees:
int closeTrapDoorTimingMs = 2000;
// 180 degrees: (not used, just for reference)
int servo180 = 2390;

// define variables
bool closeTrapDoor;
bool mouseDetected;
unsigned long timer1 = 0;

#define SOLENOID 2
#define SERVO 3
#define IR 4
#define RELAY 5
#define LED 6
#define ARDUINOLED 13

//   ######  ######## ######## ##     ## ########  
//  ##    ## ##          ##    ##     ## ##     ## 
//  ##       ##          ##    ##     ## ##     ## 
//   ######  ######      ##    ##     ## ########  
//        ## ##          ##    ##     ## ##        
//  ##    ## ##          ##    ##     ## ##        
//   ######  ########    ##     #######  ##        
void setup()
{
    // define the Arduino port for input or output
    pinMode(IR, INPUT);
    pinMode(SOLENOID, OUTPUT);
    pinMode(SERVO, OUTPUT);
    pinMode(ARDUINOLED, OUTPUT);
    pinMode(RELAY, OUTPUT);
    pinMode(LED, OUTPUT);

    // to be sure, set the servo to it's idle position, lowering
    // the servo arm, ready for the solenoid to release the trap door.
    closeTrapDoor = false;
    // deactivate the mouse-in-trap-notification relay
    digitalWrite(RELAY, LOW);
}

//  ##        #######   #######  ########  
//  ##       ##     ## ##     ## ##     ## 
//  ##       ##     ## ##     ## ##     ## 
//  ##       ##     ## ##     ## ########  
//  ##       ##     ## ##     ## ##        
//  ##       ##     ## ##     ## ##        
//  ########  #######   #######  ##        
void loop()
{
    // the servo needs CONTINUOUS pulses to keep its position
    // so be careful not to use a delay function in the loop 
    setServo();

    // check the infrared sensor. if a mouse walks between the IR transmitter
    // and receiver, a signal is sent.
    checkForMouse();

    if (mouseDetected == true)
    {
        // YAHOOOOO! The mouse will not be happy because the trapdoor
        // is being activated!
        unlockTrapDoor();

        // now we have to do several things in sequence WHILE SENDING THE SERVO
        // positioning data in the loop (setServo()) so we CANNOT use a normal delay funtion!
        if (millis() - timer1 >= 300)
        {
            // after the trap door is opened by the unLockTrapDoor function
            // we close it by the servo after 300Ms
            closeTrapDoor = true;
        }
        if (millis() - timer1 >= 800)
        {
            // after 500ms (800-300) we lock the trap door using the solenoid
            lockTrapDoor();
        }
        if (millis() - timer1 >= 900)
        {
            // now we can lower the servo arm again, ready for the next event
            closeTrapDoor = false;
        }
        if (millis() - timer1 >= 1000)
        {
            // activate the relay so we get a notofication using for example
            // a domotica system.
            digitalWrite(RELAY, LOW);
        }
        if (millis() - timer1 >= 1500)
        {
            // deactivate the relay and reset the mouseDetected variable so we can now
            // look for the next mouse to appear.
            digitalWrite(RELAY, HIGH);
            mouseDetected = false;
        }
    }
    else
    {
        // reset the timer and we keep doing so until a mouse is so stupid
        // to enter our trap...
        timer1 = millis();
    }
}

//  ######## ##     ## ##    ##  ######  ######## ####  #######  ##    ##  ######  
//  ##       ##     ## ###   ## ##    ##    ##     ##  ##     ## ###   ## ##    ## 
//  ##       ##     ## ####  ## ##          ##     ##  ##     ## ####  ## ##       
//  ######   ##     ## ## ## ## ##          ##     ##  ##     ## ## ## ##  ######  
//  ##       ##     ## ##  #### ##          ##     ##  ##     ## ##  ####       ## 
//  ##       ##     ## ##   ### ##    ##    ##     ##  ##     ## ##   ### ##    ## 
//  ##        #######  ##    ##  ######     ##    ####  #######  ##    ##  ######  

void checkForMouse()
{
    if (digitalRead(IR) == HIGH)
    {
        // mouse detected by the infrared optical sensor.
        // I use the Arduino on board LED only for testing.
        digitalWrite(ARDUINOLED, HIGH);
        // set the variable so we can give the mouse a little surprise...
        // HAHAHA!
        mouseDetected = true;
    }
    else
    {
        // no mouse detected, BUMMER!
        digitalWrite(ARDUINOLED, LOW);
    }
}

void setServo()
{
    if (closeTrapDoor == true)
    {
        // close the trap door by lifting it up.
        digitalWrite(SERVO, HIGH);
        delayMicroseconds(closeTrapDoorTimingMs);
        digitalWrite(SERVO, LOW);
        delay(20);
    }
    else
    {
        // set servo arm to the lower position, ready for the solenoid
        // to open the trap door.
        digitalWrite(SERVO, HIGH);
        delayMicroseconds(servoDownTimingMs);
        digitalWrite(SERVO, LOW);
        delay(20);
    }
}

void unlockTrapDoor()
{
    // activate the solenoid so the trap door will immediately open / fall down
    digitalWrite(SOLENOID, HIGH);
}

void lockTrapDoor()
{
    // after the trap door is lifted up by the servo, deactivate
    // the solenoid so the trap door is hold in position.
    digitalWrite(SOLENOID, LOW);
}

Comments

Similar projects you might like

Arduino Bluetooth Basic Tutorial

by Mayoogh Girish

  • 455,921 views
  • 44 comments
  • 242 respects

Home Automation Using Raspberry Pi 2 And Windows 10 IoT

Project tutorial by Anurag S. Vasanwala

  • 286,003 views
  • 95 comments
  • 672 respects

Security Access Using RFID Reader

by Aritro Mukherjee

  • 231,180 views
  • 38 comments
  • 241 respects

OpenCat

Project in progress by Team Petoi

  • 198,205 views
  • 154 comments
  • 1,379 respects
Add projectSign up / Login