Monday, May 31, 2010

The Guardian: Inexpensive AVR-based Cat Food Protection



Over 6 months ago we added two kittens (Duke and Ella) to our household, and we found out that our dog, Riley was eating their food.  To prevent this, I built the Guardian, an AVR-based protection system that humanely keeps Riley away from the cat food, but is not triggered by the cats themselves.

I wanted this setup to be cheap, so I decided to use an infrared "trip-wire" system.  On one side of the hallway is an always-on infrared emitter, and on the other side is an infrared receiver, an AVR ATmega8 microcontroller, and a buzzer.  The micocontroller continuously checks to see if the beam between the emitter and receiver has been broken - if it has, it sounds the alarm, which Riley hates, driving him away.  The microcontroller is programmed so that small, fast things (such as cat tails) do not trigger the alarm.  Also, the whole rig is place at Rileys shoulder height, which is much taller than the cats bodies.

This may not work for most dogs, as Riley is a pansy and afraid of loud noises, but here are the schematics, source code, and a rough bill of materials:

Schematics (Eagle, PNG)
Source Code
Bill of Materials

3 comments:

  1. What if the dog is running? Nice project by the way.

    ReplyDelete
  2. Poor doggy ;*( He will end hungry ;)
    Nice work.

    ReplyDelete
  3. Hi. Nice project! But I can't find a buzzer in the scheme. Could you write how to connect it, or reupload your scheme please?? Thank u.

    ReplyDelete