A mousetrap is a type of animal trap specialize to catch small animals, particularly rodents like rats, mice, hamsters, etc. This project is a kind of mousetrap that is intended to keep a captured animal alive. In this way, the hunter can release the captured animal later to the wild.
The PIC12F683 microcontroller acts as the heart of the project; it is programmed to meet function of the design. The sensor used in this project is a pair of infrared transmitter and receiver. An infrared LED connected to the GP2 pin of the PIC12F683 transmits continuous infrared signal to the TSOP1138 infrared receiver connected to the GP1 pin of the PIC12F683. To avoid the effect of ambient light, the generated signal at GP2 pin to the infrared LED is modulated at 38kHz frequency. Once the infrared beam is broken, the GP1 input changes, thus, the PIC12F683 reacts by triggering the GP4 pin connected to the BS170 MOSFET that act as a switch of the relay. The relay switch is set to shut the door when triggered. A push button connected at GP3 pin of the PIC12F683 is used for reset.
This project has a simple concept; the trap is built on a box fitted for a rodent to enter. The bait is placed inside the box to lure the rodent in. A sensor will be triggered once the rodent is inside the box, then a single door will shut lock behind the captured rodent.
For more detail: Electronic Live Capture Mousetrap