OpenTrap Smart Animal Trap

OpenTrap is intended as a tool to aid those working to help animals while controlling the stray/feral animal population.

Similar projects worth following
OpenTrap is a system to give the user control of their live animal trap. A while ago I was trapping a litter of kittens using a trap that was rigged to close when I pulled on a string...As I spent hours sitting near the string, watching the trap and feeling like Wile E Coyote waiting for those kittens to come, the idea for OpenTrap popped into my head.

OpenTrap is an addition to a live animal trap that enables the user to control the trap remotely. A small Remote communicates with the Trap Box via a 2-way wireless link. If the Trap Box detects an animal inside the trap, an audible alarm on the Remote can alert the user. From there, the user can verify what animal is in the trap and, if desired, can actuate the trap door to keep the animal inside. I believe that this system will be a significant help to people who are working to help the stray/feral animal population. According to the ASPCA website, it's estimated that there are tens of millions of 'community cats' living on US streets. There are thousands of people working on behalf of these cats, and I want OpenTrap to make their lives a bit easier.

There are three applications where I believe this trap can really make a difference:

- The T.N.R. (Trap Neuter Release) community. T.N.R. is not only a more humane approach to controlling the feral cat population, but it's the only effective method of controlling the feral cat population. OpenTrap can aide in trapping only a specific animal to have it fixed, while not trapping an already-fixed animal that enters the trap looking for food. There's an auxiliary output on the Trap Box that can be activated by the Remote; this can be used to generate some sort of signal to scare an unwanted animal out of the trap (or actuate the shutter release on a camera).

- Capturing an entire litter of kittens. Capturing a litter of feral kittens to socialize them is a very rewarding experience and it's a lot of fun, but it's also A LOT OF WORK and it can be expensive to get them healthy enough to adopt out. There are a number of websites out there that detail the process and detail the pros/cons of undertaking it...Please don't do this until you understand what you're getting into. If you've got any doubt, leave them with the mamma cat, make sure they've all got food and water and contact a local cat rescue group!

- The OpenTrap electronics may also be used on a trap that's configured for manual operation, alerting the user when an animal is trapped inside. This may be useful at night when the trap isn't visible, or on an exceptionally hot or cold day when you don't want an animal sitting outside and unprotected any longer than necessary.

My goals in making this system include making something affordable. Often people working in the T.N.R. community are stretching their resources very thin, so it's important that this not cost several hundred dollars.

I also wanted it to be install-able/removable to most live animal traps with little to no modification and a minimum of tools required...An animal inside this trap is already having a crappy day; a person spending 5 minutes with a screwdriver to remove the trap components is just further scaring them unnecessarily.

This will be completely open-source and I hope that the result of opening it up is a constantly-improving, reliable and AWESOME system to help forgotten animals!

Technical details are in documents in the 'files' section below...This details section was getting too cluttered. I'd love any feedback on the docs


An Excel sheet with the same data as is in the text file of the same name below.

sheet - 1.12 MB - 04/21/2017 at 19:32



I left the trap running all night with food inside to try to capture data about the possums living under my deck. It looks like the baby possum (a bit bigger than a hamster right now) was in there several times...I'm hoping to catch him and the Momma

plain - 1.07 MB - 04/21/2017 at 19:22


TrapBox Overview.docx

An early document that I plan to expand to cover things in more detail.

document - 17.47 kB - 04/19/2017 at 15:13


Files for the Box, remote and servo mount. The servo mount requires 2 x 1/4" diameter magnets inserted into the 'magnet end' to hold itself to the trap. Hopefully this will be replaced by the solenoid drive in very short order.

Zip Archive - 233.63 kB - 04/16/2017 at 16:01



A pdf of the current version of schematic for the Remote. Eagle files are attached here as well

Adobe Portable Document Format - 33.33 kB - 04/15/2017 at 13:18

Preview Download


A pdf of the current version of schematic for the Trap Box. Eagle files are attached here as well

Adobe Portable Document Format - 34.71 kB - 04/15/2017 at 13:18

Preview Download

Python script that will log data from the trap when connected to the USART Port on the remote. The '/dev/tty.usbserial-A602SF0Z' would need to be replaced by COMx or whatever port the FDTI module shows up as on your machine

x-python-script - 2.78 kB - 04/15/2017 at 12:16




brd - 96.68 kB - 04/15/2017 at 00:04




sch - 368.86 kB - 04/15/2017 at 00:04

See BOM Download



sch - 1007.71 kB - 04/15/2017 at 00:03

See BOM Download

View all 11 files

  • 1 × PTX PCB The PTX PCB is the controller on the Trap Box...This would get too long if I were to print out the whole BOM, but it's in the attached Eagle files
  • 1 × PRX PCB The PRX PCB is the controller on the Remote
  • 2 × Long-Range NRF24L01+ modules I've had really bad luck leading to wasted time while using the cheap modules. It's definitely worthwhile to spring for the slightly more expensive (~$10 for a pair) modules
  • 1 × HS-322 Servo Current iteration uses a servo, I'm hoping that the solenoid version will be ready soon.
  • 1 × 7.2V NiCad battery This battery will power the PTX
  • 1 × Set of 3D-Printed components See attached zip file containing .stl files. Must print Trap Box (2 parts, upper and lower) 2x Trap Box Buttons, Remote Box (2 parts, box and cover) and 5x remote buttons.

  • New boards en route

    roger_archibald2 days ago 0 comments

    Any day now I should be getting the latest iteration of the Big Dumb Boost (BDB) converter back from OSHPark. If it works well then I'll re-spin the main Trap Box Board to include that circuit and also to generally clean up a few things, relocate the power LED and swap out individual gate drivers in favor of some dual gate drivers that will use less board real estate and consume less current when not in use. Once I get those boards stuffed and tested, I think that's the stage at which I'll start trying to get this into the hands of non-technical cat rescue people.

    Last night I sent in the OSHPark order of what I hope to be the last iteration of the Remote Box Board. It's basically the same as what's posted here but I included an FTDI module on the board. In small quantities you can get FTDI chips for ~$2, it makes sense to just include it on the board and not mess around with external FTDI modules and extra wires....I'm using the micro USB connector to charge the battery anyway, might as well use it for data as well. I'll post the schematics here once I stuff the boards and verify they're happy.

  • A night's worth of opossum activity

    roger_archibald6 days ago 0 comments

    I recently learned that there's a family of possums living under my deck. Unfortunately the neighbor's dog got out and decimated 3 of the 4 joeys, and Momma Possum and Baby Possum are living under my deck at the moment. I'm hoping to catch the two of them together using the trap so I can relocate them to a place that's not my deck.

    They didn't come to the trap before I went to bed, so I left the trap logging all night in order to get a feel for their feeding times. It looks like the Baby Possum came and went several times; based on the distance data I think it was that little hamster-sized critter.

    I was pleased to see that the NiCad powering the Trap Box held up EXTREMELY well over the course of the night. It was cool to see the remote battery dripping down to the point where the MCP7831 kicked in and brought it back to 4.2V. All in all I’m really pleased with how this is coming along. Attached in the files are a text file of the output as well as an Excel spreadsheet with the data imported and a few curves plotted.

  • Solenoid testing is going well

    roger_archibald04/16/2017 at 16:49 0 comments

    Initial testing of putting a solenoid drive as opposed to the servo drive is looking good! The plan is to use a simple boost converter to step up my battery voltage enough to fire the solenoid. In the interest of testing this thing as quick, cheap and easily as possible, I made a small daughter board that will plug into the servo connector on the TrapBox board.

    I'm making use of the 3-pin header that used to drive the servo in order to drive the BDB board. I removed the servo circuitry, which consisted of a few transistors to power up the servo (and allow it to be powered down when not in use to minimize overall power consumption) and a big filter cap for bypassing servo power. I kluged on a gate driver to drive a ~130kHz, 40% switcher for the Boost drive. I found that when the boost output is unloaded it will get up to ~40VDC! What I'm currently doing in software is waiting for a few cycles after turning on the switcher, then turning on the low-side gate driver on the solenoid...This lets the voltage get up to ~16V before hitting the solenoid, I'm hoping that extra 'umph' is going to help.

    So the 3-pin header gives me GND, Boost Switch Drive and Solenoid low-side FET drive. I used a wire to bring in VIN to feed the Boost. I'll tweak this design and try to get reliable operation using components small enough to squeeze onto the Trap Box board, then re-spin that board to have everything incorporated onto it.

    Here's a video of this in action...Audio quality is horrible, my phone's microphone is picking up the 40kHz drive for the ultrasonic transducer...Better quality to come!

  • Source Code on GitHub

    roger_archibald04/15/2017 at 21:48 0 comments

    Source code for both the PTX and PRX is on Github here:

  • Out with the servo, in with the solenoid

    roger_archibald04/04/2017 at 20:16 0 comments

    The Ultrasonic transducer arrangement is working quite nicely. I had to use some rubber pads underneath the transducers to minimize direct coupling when firing the transmitter, but after doing that it seems to be happy.

    The next challenge is getting rid of the servo. The original build requires modifying the trap to allow connection of a hobby servo, then the servo is driven by the Trap Box to close the trap. This works reasonably well, but it's got several drawbacks:

    - It requires modifying the Trap by cutting the 'pull rod' to be able to connect the servo to it.

    - It requires over-voltaging the servo to get enough force to consistently shut the trap (7.2V battery on a 6V servo). I've not had any issues in hundreds of cycles on this servo, but it would be better not to run outside the manufacturer's recommendations.

    - Adjusting the connection between the servo and the pull rod is somewhat subjective and it should be more fool-proof.

    -Because the pull rod is connected to the servo, it's necessary to disconnect/cut a connection in order to remove the servo (assuming the user wants to remove all electronics before taking the cat off to the vet, this is a hassle for the user and unnecessary extra stress for the animal).

    What I plan to do here is use a solenoid to actuate the trap. This is a good option since the solenoid is cheaper and simpler than the servo. The problem is that I've not had much luck sourcing a 6V solenoid that has enough force to consistently close the trap. I have a 12V solenoid that works great, but as of now the system works on a 7.2V battery, and when we start looking at 12V batteries the price starts jumping up fast! I'm currently working on a simple boost converter to step my 7.2V up to 12V+ for long enough to hit the solenoid.

  • What was done prior to putting this project on

    roger_archibald02/06/2017 at 18:55 0 comments

    The first iteration of this trap involved using a Passive InfraRed (PIR) Sensor to detect motion and determine when an animal was in the trap. This approach worked great...In the garage and at night. When taking this setup outside into the Texas sunshine and heat, it flagged a lot of false positives. I spent a lot of time toying with the sensitivity, but ultimately I scrapped the PIR sensor. At the end of the day, if it's 98 degrees outside and an animal with a 99 degree body temperature enters the trap, PIR won't be a reliable detector.

    Rev2 involved an active Infrared LED emitting a signal and relying on a 35kHz infrared receiver to detect whether or not there was something in the trap to bounce the signal back. This worked relatively well but I never got it solid to the point where I was confident that I could reliably detect motion.

    At the time I'm putting this on I'm working on an ultrasonic-transducer version to detect whether or not there's something inside the trap. I'll bounce a signal from the roof of the trap to the floor, and based on the travel time of the acoustic signal we can determine if there's something in between the floor and the ceiling.

View all 6 project logs

Enjoy this project?



Alain Mauer wrote 04/14/2017 at 12:55 point

Cool, Check out mine My Idea was, that the trap can inform when a mouse is in the trap

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates