CatCam

CatCam - webbased catflap camera

Background

There are 3 main reasons why one may want to know whether your cat entered or left your house:

  • During the week: see whether your cat is OK (aka enters your home while you are away)
  • On holiday: see whether your cat is OK (aka still enters your home while you are on holiday)
  • When your cat is missing: see whether you have to look for your cat is INSIDE or OUTSIDE your house

Cats can sometimes be obscure little devils. Cats have ways to minimize the contact hours with you or make themselves disappear. They may spend all of their time in your house when your are away, but make sure they left the house when you are around.

Basic approach

Ingredients:

  • Hardware
    • Catflap with electric lock (ie SureFlap)
    • RaspberryPi with internet connection
    • USB webcam (later upgraded to PiCam-IR or PiNoir)
    • Interface (electronics) to toggle GPIO when electric lock is activated (opto-isolated)
    • Interface (electronics) to switch IR LEDs on when GPIO is set (added later on)
  • Software
    • SD-card with Raspbian (Debian/Linux) image for RaspberryPi
    • Python installed (by default)

Basic timeline:

  • Cat enters catflap
  • Catflap reads chip
  • Catflap activates lock (when positive ID)
  • Interface detects lock activates and toggles GPIO on RPI
  • Python script on RPI
    • monitors GPIO and is triggered by changed level on GPIO
    • activates LEDs and camera
    • stores grabbed image (0.5s per image) on disk
    • stores thumbail of grabbed image on disk
    • loop until GPIO is no longer active
    • removes old images (above certain age)
    • updates JSON image index
    • syncs local storage dir with remote storage dir (via FTP)

NOTE: I could highly recommend the SureFlap. It is very easy to use, robust and consumes almost no power at all (last set of batteries now already last at least 6 months!).




Live DEMO

CatCam LIVE DEMO (or follow all moves of our cat Higgs!)

(the LIVE DEMO is realized with the help of our cat 'Higgs', who is more than willing to demonstrate CatCam for you)


Schematics and PCB

SureFlap interface (schematic only)



Pictures