Android/Arduino controlled cat feeder


Ash is my Russian Blue cat. The advantage of having a cat is that they are pretty self sufficient. Just provide them with food and they're pretty happy to take care of themselves, so usually they are easy to take care of.

The only problem is that sometimes I go out after work and dont get back till really late, by which time he's been getting pretty hungry. Normally I'd just either leave him on a "crash diet" or ask my brother next door to come and feed him. But being the spoilt little bugger he is, and the geek I am, I have gone the technological route.

On Ebay I found an electronic cat feeder which has just the features I was looking for - big hopper, adjustable serving size, and most importantly, an infrared remote control.

Anything with a remote control can be easily interfaced with a microcontroller - remote control protocols are pretty easy to implement. One of the most popular hobby microcontroller platforms is the Atmel AVR, and more specifically, the Arduino boards. There is a Remote control library for Arduino freely available, so by having it emit IR codes to control the cat feeder, I set about implementing a complete remote cat feeding solution.


The system I set up is actually really easy. I think the only novel part about it is the overall idea of feeding my cat from my Android phone. The basic elements of the setup are:

  • An electronic cat feeder, with an IR remote control.
  • An arduino with an IR LED, programmed with the feeder remote's codes.
  • A USB connection from the Arduino into my wireless router
  • Lighttpd running on my router. The feeder script is the only thing running on this httpd, for security sake.
  • An Android app running on my phone.
Operation is very simple. When I click Ash on my phone, the app sends an HTTP request to my router, and lighttpd runs a simple shell scipt cgi. The script opens the arduino serial port (/dev/ttyUSB0) and sends commands to it. The Arduino takes these commands and fires off the appropriate IR commands to the feeder, which dishes out a serving of cat biscuits.

You might well ask why I dont just set the feeder's built in timer so I dont have to remember. Well...that would be too easy and not geek enough. Also, I prefer to feed him fresh meat when I'm around, so dont want him filling up on biscuits. This is an "emergency" feeder, not everyday food.

Next thing I will implement will be a webcam with built in viewer on the Android app. But my current webcam is crappy and old, I need to buy another. Also, the cat needs to be inside (he's an indoor/outdoor cat, but no flap so he is wherever I leave him). My new place will have a cat flap (of course, I'm planning on Android control for that, also).

Please see links on the left for more information on the device.

I can be reached at bb @ cactii . net

Copyright © 2010.