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!