What type of sensor to detect my cat on my porch?

I'm designing a system to alert me when my cat, after being let outdoors, has returned and wants to be let back inside. I'm using two JeeNodes (Arduino-compatible + RFM12B wireless radio) as remotes, one each for the front and back porch. These talk to a JeeLink base node plugged into my computer, which feeds data to a Python script, which sends me a text message using Twilio. All of the wireless communications, interface to my computer, and Twilio integration work fine.

My problem is that I'm struggling to find the right sensors attached to the remotes. I first tried an ultrasonic range finder (Parallax PING and a very similar generic knock-off). This wasn't effective, probably because (a) the beam width is narrow, and the darn cat often went around it; (b) my cat's curved, furry back isn't a very good surface for sound waves to bounce off nicely; and (c) the cat often runs through the area the sensor points at quickly, and even though I configured the sensor for a very fast re-ping rate I found this reduced detection rates. It's possible the Maxbotix sensors would perform better -- I know there are various flavors, some with wider beams. But the products I tried performed so poorly that I'm not optimistic.

I also tried a passive infrared sensor (also the Parallax brand, as well as a similar generic). In my indoor tests, this worked very, very well: a very high likelihood of sensing true cat motion, and a very low likelihood of false positives. But when I moved it outdoors (pointing down on my porch from above), the performance degraded a lot. The biggest problem was frequent false positives, primarily I think due to changing shadows when tree branches blow in the wind. But surprisingly I also saw a meaningful rate of false negatives. One possible solution is Zilog's ePIR, which I saw on Sparkfun.com -- it's a PIR with an embedded MCU, and is supposedly smarter + programmable to improve accuracy. But I haven't tried it, and my experience with PIRs in the wild has been poor enough that I'm skeptical.

Some other things I've researched online, but have no direct experience with:

  • RFID. The idea would be to put a tag on the cat's collar, and a reader on the porch. I think I'd want a passive device on the collar so I don't need it to have a battery. Given the cat's erratic behavior, the reader would need a minimum range of at least a meter, and ideally 2-3m (this would enable me to put the sensor + JeeNode unobtrusively on the roof of the porch). My impression -- though I'm unclear on this -- is that an RFID solution with this kind of range is either nonexistent, prohibitively expensive, or requires an active tag with a battery.
  • RF. Here the idea would be to place on the cat's collar a wireless RF radio that operates in the 915MHz, 2.4GHz, Bluetooth, Wi-Fi, or some other unlicensed band. The sensor would then be a complementary radio that listens for the cat's periodic broadcast. TI, for example, sells a number of low-power radios that might work; Pololu's Wixel is based on one of them. But I have two concerns. First is that the electronics (including a battery, which would need to be a coin cell) on the cat's collar need to be pretty svelte. Second, unlike RFID, my worry is that the range would be too far -- my cat often hangs out across the street or in my backyard, in which case I don't want to be notified.
  • GPS. It seems to me that this would solve the range imprecision problem but exacerbate the collar weight / bulk problem. But maybe there's a viable solution I'm unaware of.
  • Laser-based "trip wire". This involves shining a laser beam (or alternatively a directed infrared light beam?) at a photosensor across a threshold. The sensor detects movement when the cat crosses the threshold, thus temporarily blocking the light beam. This seems promising, though (a) it would require me to put the electronics in places that are less unobtrusive and less protected from the weather; and (b) my back porch has no obvious "guaranteed threshold".

It may be that there's no perfect solution, and that I have a good sense of the options and their pros and cons. I'm okay with that possibility, but wanted to throw it out there before investing a lot more time. And I'm aware that there are several commercial pet-tracking products available, but I'm not interested in them -- somewhat because they're expensive, certainly because I want to integrate my solution into a larger home automation system that I'm planning, and most of all because what fun would that be?

To be clear, my requirements are:

  • The apparatus on the animal itself, if any, needs to be small and light enough to be comfortable for a 10-lb cat to carry around, cheap enough that I won't freak out if it loses its collar, and have minimum 30 days battery life -- hopefully more -- so I don't have to worry about that all the time.
  • I want to reliably detect true movement within a radius of several feet, ideally using a sensor placed overhead and looking down. I need to be able to distinguish between cats and {leaves, shadows, etc.}, but not between cats and humans -- I don't get that many visitors.
  • I'd prefer not to spend a huge amount of money, but if there were a solution that would definitely meet my needs with little-to-moderate risk or fuss, I would certainly pay a premium for it.

Thanks for your help!

Capacitance? You could put a sheet of foil under a plate of plexiglass and turn it into a cap sense input device.

Weight triggered switch? Spring loaded plate with a push button under it. Or something like a Dance Dance Revolution mat for the welcome mat.

Metal detector? Put a metal trinket on the collar, and put a big metal detector coil under the welcome mat.

I don't know your cat, but most cats seem to get the hang of doors and cat flaps pretty well. I'd have thought the best option was something using RFID to detect when the cat came to the right place to open the door, where 'the right place' is something you need to negotiate with the cat. (For this to work without the cat automatically being let in, I think you'd need to be pretty prompt about letting cat in on request so that it got positive reinforcement when it did the right thing.)

I think a stronger laser beam and a microphone would work.
When the cat walks into the laser beam and emits a Loud "Meeeowrrr!" the mic will pick it up & let you know.

Perhaps lower mounting of the PIR is required, like a foot above the floor and aimed across the door.

We had 6 cats for a while (now down to 4) and after being shoved thru light weight screen door flaps a few times they eventually got the hang of it.
However, the raccoons did too, and many a time I had to chase one out that had a paw thru the door trying to pull the cat food bowl out, or an arm and a head thru. After a skunk came in the house, had his fill (with me staying out of site at the opposite side of the houses central staircase!) and eventually left thru a wide open front door (didn't make any motions towards heading out the same way he came in, and I wanted a clear path out for it), the cat doors were wired shut and then removed.
So now we get out exercise and hop up & down all night to the cats in & out.

What about an RFID cat collar?

Outdoor cats don't generally do well with collars. They go in tight spaces and can get trapped, so the collars need to be breakaway types. Even flea collars, they never last long once they get outdoors.
We've had 8 cats over the years, none have had collars. Collars on dogs work better, need one to take them on walks, or for electric fence.
We had one cat trained to walk with a harness (figure 8 kind of thing), that turned a lot of heads!

A dog makes a good sensor. So can a cat on the inside. Works here at least :smiley:

I was about to post the same thing.

If the cat is Schrödinger's cat, you may need a Geiger Counter. Fortunately, there is already a shield for that.

Yeah. Geiger counter and a lump of uranium or vial of plutonium on the cat's collar.

I was trying to think of a way to get a bar code scanner to work. Maybe dye the cat's fur the right colors? Probably not practical.

However, you might be able to use a laser pointer to get the cat to move close enough to whatever sensor device you end up using. Cats like to chase laser dots.

Well, if it were Schrödinger's cat, then I wouldn't need a sensor because it would already be both inside and outside, no?

Only if you didn't know where it was, then you could say it both inside and outside.

Only if you didn't know where it was, then you could say it both inside and outside.

You can never know, for certain, where Schrödinger's cat is.

Have you thought about using a CATalytic converter? :slight_smile:

On a more serious note [it's the weekend, after all], does the cat usually sit right in
front of the door, or off in a favorite place, or anywheres it pleases on any given day?

In my old place, my neighbor's rather smart tom cat from across the street taught
itself how things worked. It would sit on the porch railing, looking in through the
curtain [which blocked viewing inside, but did not block the lighting completely].
When it saw a movement through the curtain, it would jump down on the porch
surface with a loud thud, signaling it was willing to be let inside.

I was thinking maybe a simple photointerrupter or two, placed in strategic locations
where the cat likes to sit and wait, might do the trick.

PaulS:

Only if you didn't know where it was, then you could say it both inside and outside.

You can never know, for certain, where Schrödinger's cat is.

That is Heisenberg's cat.

CrossRoads:
We had 6 cats for a while (now down to 4) and after being shoved thru light weight screen door flaps a few times they eventually got the hang of it.
However, the raccoons did too, and many a time I had to chase one out that had a paw thru the door trying to pull the cat food bowl out, or an arm and a head thru. After a skunk came in the house, had his fill (with me staying out of site at the opposite side of the houses central staircase!) and eventually left thru a wide open front door (didn't make any motions towards heading out the same way he came in, and I wanted a clear path out for it), the cat doors were wired shut and then removed.
So now we get out exercise and hop up & down all night to the cats in & out.

Crossroads, you can get your cats microchipped if they aren't already, then you can get a cat flap that reads the microchip and only unlocks the cat flap if it recognizes the chip. I use the one from PetPorte and it works fine with my cat. The neighbors cats have given up trying to get in. For those who don't know, a microchip is a miniature RFID tag that is implanted in the animal, usually at the back of the neck.

rweaver, you might be able to condition your cats to go up to a sensor to activate it. Have the sensor trigger a beep or buzzer on the porch as well as alerting you. The cat will get to associate the sound with you opening the door, and will seek out the sensor in order to trigger it. This would allow you to use a less sensitive PIR or microchip detector and avoid false positives.

Thanks, will keep that in mind.
I don't mind the exercise after sitting at a desk all day tho.
I will admit, the skunk coming in the house was a surprise! We'd seen him on the back deck a lot, he didn't bother the cats and they ignored him.

I bet you could do a bar code reader on the skunk.

Hi,
Do you think a baaaa code might work for my pet lamb?
John.