Internet enabled catfeeder ... powered by Arduino
Our two cats, Tiger and Scully are usually fed in the week by about 7:00. Unfortunately, they also expect on weekends and other holidays that we get up, use the can opener in the morning and fill the food bowls. If we stay in bed, the psychological terror begins: They start to meow and run with growing enthusiasm over us as if we were doormat - to us it is infuriating and one of us goes down, filling the food bowls.
Inspired by Mathew J. Newton’s Internet Enabled Cat Feeder, I built a cat feeding machine, which can also be activated via the Internet. Unlike Newton, who has rebuilt an old Cisco switch for online access, I wanted a solution using the open source development platform "Arduino” I was just on tinkering with it anyway.
The solution should satisfy the following conditions:
- Manual feeding directly on the machine using a button
- Manual feeding on the Internet via web interface
- Fully automatic feeding at fixed times
It started with the mechanics. Here I searched for a cheap as possible and yet robust way to measure out the dry food - like Newton - and landed in a cereal dispenser, which is available on the internet for only 15 euros. The dispenser was mounted on a nice wooden structure that my father built. The outlet was further extended by using PVC pipe slightly so that the dry food does not shoot across the room. The handle was glued, but could be removed with side cutters and a sharp knife and the handle should be replaced by a gear motor. But how should the motor be connected to the axis? From a fellow modeler, I learned that shaft couplings would be ideal. I found a seller on Ebay, Dold mechatronics, which sells reasonably priced couplings at the right sizes. Initial tests were promising, but in time the plastic axis in the shaft coupling started spinning through so I quickly threaded hole in the coupling and used a screw for the axis and it was fixed.
In order to control the feeder with the Arduino Uno, I would need the matching Ethernet Shield for the network connection and a relay shield. I realized I would certainly be able to implement something cheaper, but to me it was just right to explore the possibilities of the Arduino development platform even closer. Despite my not very advanced programming skills a little program was fast knit, which evaluates specific UDP packets from the network and the relay shield that controls the motor. At the same time, a little tune is played so that our two fur tigers really noticed the feeding. Now I could, from any computer, start manually feeding via my web server (a Synology NAS is in my internal network). A small PHP script provides the appropriate UDP packet. Furthermore, I have cron job set up on the Synology so that the feeding starts automatically according to schedule at certain times. In the event that I want to feed once directly at the machine, there was a button added that must be pressed at least 3 seconds until the feeding starts - our cats have not figured out how to activate it by now and I hope they do not read here ;)
Our cats accepted the feeder very quickly and if the melody sounds now, you see them running to the machine like lightning through the house. If we should get home later in the evening, I can feed the cats remotely over the Internet and on the weekend we can finally sleep again ;)
Here you can download the Arduino and PHP script: source code at github
Many thanks to Matt Hand for translating my project page into the English language!
Have a look at the feeder (and the cats) in action: