The Petting Problem
Inspired by projects such as the tweeting cat door and CATaLOG [sic] I’m wanting to add some form of automated access control to our pet door to control who can go in and out, when.
The Players
We currently have three cats, one dog and one pet door. Note: Click on any picture to see a larger view.
The Mischievous Mutt
Toby, our two year old Labrador needs access to the backyard anytime, day or night for access to his food, water and other amenities.
The Clutter Kittens
Bazyl and Kismet, are free to go out during the day (sometimes even encouraged) however in an ideal world the pet door would only allow them to come in, but not out again after dark.
The Wanderer
UPDATE 2010/01/17: Unfortunately, Murray is no longer with us. Old age finally caught up with him.
Murray, the venerable 17 year old veteran of the family who has a habit of going walkabout. At this stage in his life, it would be best if he stayed indoors.
The Portcullis
Our pet door, that allows the rabble to go out on the deck and into the backyard. The door is fixed in a wooden panel in the frame of what was originally a window.
Requirements Summary
So basically we need something that is able to stop the door swinging outwards during the evening, except when Toby is in proximity, and any time Murray is in proximity. We don’t need to worry about foreign cats coming into the house (you’ve met Toby, yes?) and if we really want to lock the dog out we put the barricade in place as shown below. (We soon learnt that the little plastic lock on the door is not gonna stop him if he really wants in!)
I’m planning on using an Arduino board as the control unit, and think I need twoone RFID tags – one for Toby and one for Murray – at the minimum to handle the rules I’ve outlined above.
So the preliminary parts list is:
One Arduino controller board.
One light sensor for sensing daylight hours.
One RFID scanner.
Two RFID tags that can be attached to the animals’ collar.
One solenoid or something else that can be used to stop the flap opening to the outside.
A red/green LED to indicate if the door is currently locked or not.
A three state switch to enable us to set the door to always open, always locked, or on automatic as required, although we expect it to be on automatic most of the time.
The concerns I have are finding the right RFID scanner and tags that’ll work in this environment. I’ve no experience with RFID but hear a bit about range issues. One tag will be on the collar of a big Labrador, the other on a medium sized cat, so there is a reasonable height difference. The proximity sensing cannot be flaky for this to work, especially for Toby who will get confused if the door only works some of the time and just not bother.
I have been considering an ID-12 or ID-2 scanner with a custom antenna, but people I’ve talked to think the range will be too small. The size difference between a domestic cat and a Labrador is fairly significant in this case.
Another option might be bluetooth. This would also have the advantage that it could act as a true proximity sensor, detecting when the animal comes into range, remains in range, and goes out of range, whereas RFID is generally triggered once each time the tag comes into range after not being in range. The disadvantage is batteries.
Any other ideas for proximity sensors?
The other thing is the mechanism to block the door. Ideally something that can shoot out out a little bolt to block the path of the door, or retract it to leave the door clear to open. Preferably not something that is spring loaded that needs an active voltage on it to either hold it open or hold it closed. Should only need to apply voltage to change state, not maintain state.
If a bolt is not available, I’ve seen a stepper motor with a bit of metal on the spindle used to do the same thing. To lock it simply rotates the bit of metal into place, to unlock is rotates it out the way.
UPDATE 2009/11/02: Some smart people over at chiphacker also had some good suggestions on a locking mechanism. Adam suggested using a linear actuator, and Zklapow had the novel idea of taking apart an old CD drive and using the workings that slides the tray in and out. And his suggestion reminded me that this isn’t the first time a CD drive has been used as part of an access control system either!
So, any and all feedback on the above would be welcome. Once I’ve figured out all the bits I need, I’m planning on again visiting the friendly folk at Melbourne Hackerspaces to get help on sourcing the parts and get up to speed on the fun world of Arudino programming (this time I’ll remember to bring my laptop.)
UPDATE 2010/01/17: Have finally ordered most of the parts I need for this, as well as the hermit crab tank humidity control, which I’ll probably build first (‘cause it’s simpler). I went with an ID-20 RFID scanner to start with, so we’ll see how that goes. Unfortunately, my copy of Practical Arduino which I’ll be using as a reference apparently wont arrive until mid-Feb so progress will be slow before then.









Pet microchipping is RFID, isn't it?
Talk to your vet about the tags used for identification microchipping and see what’s up there. It’d be great if you could use your pets’ ID tag for the door as well as the obvious identification benefits.
RE: Microchips
I did talk to my vet about that and they didn’t have any info. I’ve gotten the (possibly false) impression that the microchips the vet inserts are not suitable for this sort of application. Probably something to do with detection range - given that the reader would have to detect the tag through a layer of skin and a bit of muscle.
Thanks for the suggestion though. Keep ‘em coming.
[UPDATE] Looking at pictures of the cat flaps at Pet Porte reinforce the idea that the inserted tag does not have a practical range for my needs. Will be looking at something I can attach to collars. (Thanks Jon Oxer for the link.)
Very Cool Project
This is a very cool project, and you’ve got my brain working… unfortunately, I think I’m about as familiar with this stuff as you are. Couple of thoughts:
I don’t think bluetooth would be a valid solution. Bluetooth works in pairs and has an operating range of ~150 feet in doors, and ~300 feet unobstructed. BT is probably not the best solution for close (3-5 feet proximity).
For your mechanism, I think your best shot would be running a geared motor that would lock and unlock the flap on a full revolution. If you use a tab (stronger than the one you have currently), the tab could be geared to the motor, and half a resolution would set it locked, and another half would set it unlocked. You would likely want to have some sensor to determine when the tab was closed or not (a light sensor would work well) , as the motor’s turn speed will not be reliable as it wears.
One thing I’d be concerned about is the logic involved when multiple animals show up. If the cat and dog get there at the same time, can your program decide who wants to go outside? Another thing is tag positioning. The antenna will be able to read tags that are parallel to it, but not necessarily in other positions…
RE: Very Cool Project
Hi, Aaron, and thanks for the feedback.
wrt bluetooth working in pairs: it wouldn’t have to communicate back and forth, the receiver on the door would just have to detect when the transmitter on the animal came into range* - but I think you’re right that the range will be too great. I’ll be trying RFID first, I think, as it has more pros than cons compared to BT (unless I can come up with a third way to do proximity/identification).
* I have a program for my laptop that would do a similar thing, locking the screen when my mobile went out of range and unlocking when it came back in. Was very useful when working in some public offices.
wrt geared motor and a sensor: this is where I was thinking of a stepper motor, to get the locked/unlocked positions right.
wrt multiple animals: Yeah, I’ve already been thinking about that. Basically the important thing is to keep Murray in (at least at night, when he’s likely to get lost) so that would take priority. I’ve also been thinking of adding a reed switch to the flap so I can tell when somebody has gone through.
Post new comment