Author Topic: TTP223 capacitance sensor rat trap for outdoor use?  (Read 1665 times)

0 Members and 1 Guest are viewing this topic.

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
TTP223 capacitance sensor rat trap for outdoor use?
« on: September 29, 2022, 06:53:59 am »
Would using a capacitance sensor outdoors where it is exposed to possible fog but not direct rain be going down a rat hole?

I'm currently using a IR emitter receiver pair as a trigger controlled by and Arduino that activates a relay to trigger a modified snap trap. This works very well but has a few downside. The MCU is sleeping over 99% of the time waking up 50 times /sec, activating the IR pair and triggering if necessary. The average current draw is less than 0.4ma. Now that I have a 3d printer I would like to make a "better mouse/rat trap." The current design is larger than needed, moderately hard to set and the BOM of Arduino mini, 12v tool battery is "expensive" for mass use and if used outdoor kills too many birds.

I would like to lower the cost and power use by eliminated the use of a MCU. Both passive IR motion and capacitance sensors use less than 50ua so leaving them on all the time wouldn't matter. Adding a light sensor to trigger only during night would minimize or eliminate killing birds. The possible advantage of the capacitance sensor is the trigger's head placement would be more exact and birds would be less likely to even activate the trigger. I'm assuming a bird's pointed beak will have much less capacitance than a rat's head. Downsides of the capacitance sensor I believe is reduced reliability. False triggers would be a big negative!

Would a capacitance sensor even work or would it be going down a rat hole?
« Last Edit: September 29, 2022, 06:57:11 am by BlackICE »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1395
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #1 on: September 29, 2022, 08:51:54 am »
Would using a capacitance sensor outdoors where it is exposed to possible fog but not direct rain be going down a rat hole?

I'm currently using a IR emitter receiver pair as a trigger controlled by and Arduino that activates a relay to trigger a modified snap trap. This works very well but has a few downside. The MCU is sleeping over 99% of the time waking up 50 times /sec, activating the IR pair and triggering if necessary. The average current draw is less than 0.4ma. Now that I have a 3d printer I would like to make a "better mouse/rat trap." The current design is larger than needed, moderately hard to set and the BOM of Arduino mini, 12v tool battery is "expensive" for mass use and if used outdoor kills too many birds.

I would like to lower the cost and power use by eliminated the use of a MCU. Both passive IR motion and capacitance sensors use less than 50ua so leaving them on all the time wouldn't matter. Adding a light sensor to trigger only during night would minimize or eliminate killing birds. The possible advantage of the capacitance sensor is the trigger's head placement would be more exact and birds would be less likely to even activate the trigger. I'm assuming a bird's pointed beak will have much less capacitance than a rat's head. Downsides of the capacitance sensor I believe is reduced reliability. False triggers would be a big negative!

Would a capacitance sensor even work or would it be going down a rat hole?

Hi,

I guess this is part of the "Build a better mousetrap" global project :-)

A simpler way is to use a relay contact switch, a solenoid, an inverted shoe box or similar, and a plastic  CD case that has hinges.
The rodent steps on the CD case, it hinges and folds causing the relay contacts to either open or close which then activates the solenoid, the solenoid slips out from under the shoe box, the shoe box falls, the creature is trapped.
The relay contacts are connected to the 'top' of the inverted shoe box and the CD case cover so when it hinges the contacts either open or closed.  With the solenoid energized all the time the contacts would open and the solenoid spring would pull back moving the shaft which then releases the inverted shoe box and it falls on the top which traps the rodent.
If you dont want to expend the energy, then perhaps a solenoid that pulls in when the relay contacts close and thus releasing the inverted shoe box and it falls.

In case you are wondering if this works, it works, tried and tested over several years.
The one catch i found is if you use a plastic shoe box you cant leave the rodent in there too long before you do something with it because it can slowly chew it's way out.  That means if there will be a lot of time before you can release the animal you would have to use a stronger material like aluminum.  An inverted aluminum box would be good i think, with a extra weight attached to the upper side to hold it down once it falls.  The box is tilted up so only one end is above ground like a lean to tent.  The bottom has to be metal too if you cant get to the animal fast enough.  So you have something like this:


« Last Edit: September 29, 2022, 09:06:32 am by MrAl »
 

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #2 on: September 29, 2022, 09:28:04 am »
I suspect this may work some of the time but not all of the time. The Trap design I've been using is 100% effective and kills most rats within less than 15 minutes from when they first see the trap. The longest living rat that's saw my trap died in 2 days. There has been zero rats that saw the trap that lived. Trap designs often fail where the rat doesn't trip the trigger, avoids it all together, or is trapped but escapes. The Trap design I use the rat doesn't need to touch anything, it only needs to be curious enough to poke his head in the right location and it's dead. You never want to give a rat a second chance because they're pretty smart and never fall for the same trap twice. Also I don't want to have to deal with a live rat, only dead ones. If you are curious and not repulsed by morbid videos you could do a search on YouTube for rat trap Chronicles. It will demonstrate my rat trap in action. My goal is to duplicate a similar trap but to lower the cost and size so that I could deploy 10 plus of them around my property without killing other animals besides rats.

If I can't think of a suitable design that's doesn't use a microcontroller I believe I have a plan where I can use a Firebeetle ESP32 with three AA batteries that should work. The advantage of using the esp32 is I can have  periodic reporting of the battery and trap status sent over wi-fi to alert me when the trap needs servicing. Additional cost will be about $10.
« Last Edit: September 29, 2022, 10:15:18 am by BlackICE »
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3032
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #3 on: September 29, 2022, 11:47:53 am »
Quote
...  and Arduino that activates a relay to trigger a modified snap trap. ...

You mention using a tool battery -- what voltage is needed for the relay?
 

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #4 on: September 29, 2022, 12:17:01 pm »
The tool battery is 12 volts in used to activated 12 volt solenoid. Running with less than 5 volts with three batteries that won't be possible. It's difficult to find a low-cost powerful enough solenoid that would work with only three double A batteries. So I'm thinking of using either a 5 volt Servo motor or muscle wire as an actuator.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3032
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #5 on: September 29, 2022, 01:09:20 pm »
You might be interested in this video for snap trap triggering ideas:

Rats Will Never Steal Your Bait Again With The MICRO RAT TRAP. Mousetrap Monday
https://youtu.be/UbLgYDzC57U

Based on pics of the battery pack it looks like it uses around 6 or 7 1.5V cells.

The Amazon product page has close-ups of the solenoid triggering mechanism:

https://www.amazon.com/gp/product/B09CBD343B

Seems like a small 6V solenoid should be able to do the job.

 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: ca
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #6 on: September 29, 2022, 06:43:01 pm »
OP, the TTP223 is a piece of shit. I tried using it for a (garage door handle) burglar alarm project and found the IC to be junk design.
In a nutshell, the IC auto-nulls only on power-up or touch. This is of course a fail. Outdoors the temperature drift moves enough to cause the (initial) auto-null to be way off, as well the IC is extremely sensitive to VDD changes, even 3.3V down to 3.2V would cause it to never detect any touch capacitance (because the ref osc goes below the sensor osc) and sit there in a stupid state doing nothing. You'd have to cold boot the IC. Atmel AT42QT1010 worked great though. Most MCU's have touch-sense capability but a rat doesn't have much capacitance at all and they do pee on things.

I would suggest using a cheap vibration sensor, the pin-in-a-spring style. Have the rat bump a paddle or something.
You have to debounce the signal and this can also set sensitivity or use pulse count. I'd start with an SW-18010p high sensitivity. There are cheap chinese boards with a LM393 comparator but these are junk, you can't adjust the time properly so I made my own H/W debounce, but you can do it in firmware as well.
The most super-sensitive vibration sensor is the (normally closed) SW420 with roller inside. But it picks up everything, wind included.

Commercial rat/mouse traps do use conductivity across an array of floor electrodes, so the paws/feet/tail cause a drop below a few megohms when the pest is on the wire mesh grid. Their fur is a pretty good insulator. But they pee on the mesh too which spoils the sensor. This is how the electro-shock traps detect the pest, and then they apply a few kV pulses to same electrodes to terminate...

Youtube channel Mousetrap Mondays is very good for ideas.
 
The following users thanked this post: BlackICE

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #7 on: September 29, 2022, 11:34:50 pm »
Thanks that was exactly the information I was looking for. Didn't want to go down a rat hole testing a device that wasn't going to work. Just put my current trap to work and got a rat within a few hours. Trap set at about 6pm rat caught before 11pm. To lazy to clean up the trap until the next afternoon. I'm too late lots bottle flies laying eggs. This event brought to mind that that I should go all the way and use and ESP32 to report trap status so I don't wait to service and trap and have a bigger mess on my hands with flies, ants, etc. Since I'm going to use a MCU anyway that eliminates one of the virtues of the TTP223 low power use. The shake sensors seem like viable lower cost option and zero power, but I have some concerns about tuning the sensitivity and the rat's head placement when triggered. The rat's whiskers could set it off while its head is it the wrong position. I think I stick with the use of optical sensors, IR motion sensors would have the same problem with head placement.

I have watched many of the "mouse trap  Monday" / Shawn Woods videos. That's where I got most of my inspirations to build a better rat trap. His videos are toned down to be PC for viewers so that the channel can be monetized. The "Rat Trap Chronicle" channels shows the read raw footage rated R so people get correct picture of what it really takes to catch and terminate rats. Adult rats are much harder to terminate than young rats or mouse. Large adult rats are very cautious and when struck by off the shelf traps, often escape or aren't killed humanly. The "industry standard" Victor Rat Trap is IMO unlikely to kill larger rats, but likely only injury them. The make a trap effective for large rats would probably incur too much product liability to sell to the general public. Thus one must DIY! :)

Current thinking is Firebeetle EPS32 controller, IR opt sensors, with 5v servo motor actuator, powered by a 3 cell AA battery pack. With proper firmware I hope to get the batteries to last 6 months or more.




« Last Edit: September 29, 2022, 11:39:24 pm by BlackICE »
 

Offline floobydust

  • Super Contributor
  • ***
  • Posts: 6923
  • Country: ca
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #8 on: September 30, 2022, 02:35:00 am »


I dislike the IR because it uses a lot of energy and it didn't seem great in the one video "You Have Mail" Trap, complicated the construction and wiring, cleaning etc.
Animals can see IR LED's, I think it's the little bit of red they emit. They can also hear buck-converter whine. So make sure the electronics is not annoying them and making them leave.
ESP32 has capacitive touch inputs more here.
You could use the two sensing techniques combined, sense direction, size etc. I'm lazy and would use the vibration sensor and mechanical trip for an input.

Youtube is ridiculous about censoring his channel's stuff, you can't even kill a hornet without a complaint and youtube takedown. You can't stomp a bug?  :palm:
 

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #9 on: September 30, 2022, 08:32:27 am »
IR does use a lot of power but by activating it for a very short period of time the average power consumption can remain low. I was only powering up the receiver and emitter using an output pin for 50us about 20 to 50 times per second. The MCU sleeps the rest of the time. I tested the lowest emitter current that work and doubled it. I was bummed that the detector wasn't stable unless I waited 50us for it to settle.

The sensors I was using were about $4 per pair. Now I have found these cheaper reflective sensors rather than the break beam type. Also found this low cost shake sensors. I will test both to them. Of course as your stated the shake sensor has the advantage of zero power use and I can keep the MCU sleep all the time and wakeup only by a sensor interrupt rather than a periodic wakeup 20 to 50/sec to power cycle the IR sensors.

I believe the rats can see the IR beam, but it doesn't seem to bother them at all when pulsed for only 50us. I have more than 30 videos to demonstrate that. In fact maybe the pulsing of the IR beam attracts them like bugs are to light :)

If I decide to go with the shake sensors I will definitely have to have the triggers disabled by schedule when the gardener uses his leaf blower. That should be covered buy my planned default programming of disabling the trigger during daylight to not trigger on birds.


https://www.amazon.com/gp/product/B07W97H2WS/ref=ox_sc_act_title_1?smid=A30QSGOJR8LMXA&psc=1

https://www.amazon.com/gp/product/B07S6GFLWK/ref=ox_sc_act_title_2?smid=A1THAZDOWP300U&psc=1




« Last Edit: September 30, 2022, 08:37:43 am by BlackICE »
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1395
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #10 on: September 30, 2022, 10:24:08 am »
I suspect this may work some of the time but not all of the time. The Trap design I've been using is 100% effective and kills most rats within less than 15 minutes from when they first see the trap. The longest living rat that's saw my trap died in 2 days. There has been zero rats that saw the trap that lived. Trap designs often fail where the rat doesn't trip the trigger, avoids it all together, or is trapped but escapes. The Trap design I use the rat doesn't need to touch anything, it only needs to be curious enough to poke his head in the right location and it's dead. You never want to give a rat a second chance because they're pretty smart and never fall for the same trap twice. Also I don't want to have to deal with a live rat, only dead ones. If you are curious and not repulsed by morbid videos you could do a search on YouTube for rat trap Chronicles. It will demonstrate my rat trap in action. My goal is to duplicate a similar trap but to lower the cost and size so that I could deploy 10 plus of them around my property without killing other animals besides rats.

If I can't think of a suitable design that's doesn't use a microcontroller I believe I have a plan where I can use a Firebeetle ESP32 with three AA batteries that should work. The advantage of using the esp32 is I can have  periodic reporting of the battery and trap status sent over wi-fi to alert me when the trap needs servicing. Additional cost will be about $10.

What trap have you been using?
 

Offline MrAl

  • Super Contributor
  • ***
  • Posts: 1395
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #11 on: September 30, 2022, 10:31:53 am »
IR does use a lot of power but by activating it for a very short period of time the average power consumption can remain low. I was only powering up the receiver and emitter using an output pin for 50us about 20 to 50 times per second. The MCU sleeps the rest of the time. I tested the lowest emitter current that work and doubled it. I was bummed that the detector wasn't stable unless I waited 50us for it to settle.

The sensors I was using were about $4 per pair. Now I have found these cheaper reflective sensors rather than the break beam type. Also found this low cost shake sensors. I will test both to them. Of course as your stated the shake sensor has the advantage of zero power use and I can keep the MCU sleep all the time and wakeup only by a sensor interrupt rather than a periodic wakeup 20 to 50/sec to power cycle the IR sensors.

I believe the rats can see the IR beam, but it doesn't seem to bother them at all when pulsed for only 50us. I have more than 30 videos to demonstrate that. In fact maybe the pulsing of the IR beam attracts them like bugs are to light :)

If I decide to go with the shake sensors I will definitely have to have the triggers disabled by schedule when the gardener uses his leaf blower. That should be covered buy my planned default programming of disabling the trigger during daylight to not trigger on birds.


https://www.amazon.com/gp/product/B07W97H2WS/ref=ox_sc_act_title_1?smid=A30QSGOJR8LMXA&psc=1

https://www.amazon.com/gp/product/B07S6GFLWK/ref=ox_sc_act_title_2?smid=A1THAZDOWP300U&psc=1

Get a pin diode they are fast.
 

Offline ledtester

  • Super Contributor
  • ***
  • Posts: 3032
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #12 on: September 30, 2022, 09:41:42 pm »
Regarding batteries... don't forget about D-cells which can have several times the capacity of AA's.

Regarding sensors... you could use both the shake and infrared sensors... the shake sensor to wake up the MCU and the infrared as a verification. That would allow you to move the trap without having to disarm it.

 

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #13 on: October 01, 2022, 12:25:43 am »
That's a good idea to use the vibration sensor to turn on the IR sensor adds a small addition cost but lowers power use while keeping good head location. Same can be said with using a IR motion sensor to turn it on. I prefer to stick to AA batteries for lower cost and smaller size. The Firebeetle sleeping uses 10ua, nothing really. The batteries would die just as fast sitting on the shelf. If I use a solenoid than I may have to go with 4 AA NiMHi batteries because of the high current draw, if I use a 5v servo motor may be able to get away with using 3 or 4 AA alkaline batteries.

https://wiki.dfrobot.com/FireBeetle_ESP32_IOT_Microcontroller(V3.0)__Supports_Wi-Fi_&_Bluetooth__SKU__DFR0478

 

Offline BlackICETopic starter

  • Regular Contributor
  • *
  • Posts: 219
  • Country: us
Re: TTP223 capacitance sensor rat trap for outdoor use?
« Reply #14 on: October 02, 2022, 09:49:11 am »
I tested both sensors, the vibration sensor I bought wouldn't work at all. I took a lot of force to trigger them. Cautious rats wouldn't trigger it. The reflective IR sensor works great. As is it using about 28ma at 3.3v. The settling time from power up, worst case measured 20 us. That when I used an external pullup resistor on the output. If I leave the output floating (from schematics post it already has a 1k pullup internally) then it may work with less than a 3us setting time. I have to do more testing with an MCU rather than touch power lead to simulate a power on cycle. The power can be reduced further by about 3ma when I remove the power on LED.

So periodic wakeup of the MCU to poll the sensor should work while keeping power consumption low.

Thanks to all that responded, especially the tip not to use the TTP223.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf