About the author: Don Schleede currently manages the iDigi security office. Don has worked in the IT field for 25 years. He has served as a Chief Technology Officer for 12 years in mid-sized level financial and technical companies. For the last 7 years, he has exclusively served in security roles as a Senior Security Analyst, Engineer, and Architect. Don holds a number of certifications such as the CISSP, MCSE, RHCE, CCNP, CEH and others. Today, he works in at Digi International, where his love of embedded things, microcontrollers and security can be expressed.
Why a Cat Doorbell?
Recently, a friend of mine moved. This friend has a few cats who like to go outside. Because of their new surroundings, we weren’t sure that the cats would know where to return to. One night, all the cats except for one came back home. While the cats have been trained to come in when they hear a whistle, this cat must have been out of whistle range– doing whatever cats do. It was getting to be a cold night so we were worried. We did notice that the cats would stand at the door when they were ready to come in, but of course, we would have to see them standing at the door and open it for them. In the morning, we found one cold kitty waiting at the door. No major harm, but we felt guilty for not letting the cat in– the idea of the Cat Doorbell was born.
Here’s how I made the Cat Doorbell and how you can make your own.
I didn’t want to get too in depth and design our own board for this project, so I used standard parts that I had around. Here’s what I picked from my supplies:
- Waterproof box — Salvaged from an old Access Point. The box is fairly large and will seal.
- 1 Arduino Uno
- 1 Piezo speaker from RadioShack – 273-073
- 1 Parallax PIR sensor from RadioShack – 276-135
- XBee series 2
- 5v wall power supply
- A few resistors
This was assembled as a prototype. For longer term operation, I would suggest mounting things better, and using a level converter for the data pins.
1. First, I wired up the PIR sensor to the end of the box. The PIR sensor fit perfectly where the waterproof Cat-5 connector was, so I added some crazy glue. I connected the GND and 5V lines to the Arduino, and I connected the sensor line directly to the Arduino, pin 7.
2. I glued the Piezo to the bottom of the box, and I soldered in a 1Kohm resistor in series and plugged it into the Arduino, pin 8.
3. I used some pins to solder the XBee Series 2, which was already programmed with a XIG configuration to the 3.3v and GND lines.
4. Next, I connected the data lines to the Arduino pins 5 and 6. I have heard that the data lines of the XBee Series 2 are not 5v tolerant, but I know many people who have connected these to Arduinos without a problem. For more information, see Rob Faludi’s web page at http://www.faludi.com/bwsn/xbee-level-shifting
5. With some double side tape, I taped the XBee to the side.
6. With the XBee using the XIG, I have a Digi ConnectPort X4 gateway in my house. I loaded the XIG code onto the gateway and validated that the communication works with the XBee. You can find more information on the XIG project here.
7. Next I programmed the Arduino, the program follows this flow:
- Look for activity on the PIR sensor
- Send a URL string to the XBee (is used the SoftSerial library)
- Beep the Piezo like a doorbell
- Wait 60 seconds. Don’t want multiple activations.
- Go back to step 1
The URL that was called went to a server that is hosted at Rackspace. The URL is actually a PHP web page, that will interface to SMS to my cellphone (via email). After testing and validating, I put the device outside so it would detect when a cat (or anything else) is at the back door. To call this complete, I waited for a bit for one of the cats to come back. And, sure enough, I got an SMS message on my phone. I went and opened the door and a cat proudly walked in.
Have questions or comments about the Cat Doorbell? Let me know in the comments section below or on Twitter. As I iterate the Cat Doorbell I’ll continue to update this post.