Arduino-Based Laser Controlled Wireless Automatic Cat Food Dispenser

I have spent the last several weeks building a device to automatically dispense dry food to our two adorable cats. The cats need to be ona diet due to weight issues. So a certain amount of food must be given to them throughout the day.

i learned about the Arduino board soon before starting this project. So this little hobby has given me the perfect opportunity to learn more about this amazing device and its ever-expanding capabilities.

The cat feeder is basically a cylindrical container that has an opening on its side. The cylinder rests on its side and is supported by wooden dowles and rollerblade ballbearings which allow it to rotate with ease.

The rotation is provided by a wheel attached to a small motor. the signal and power is provided by an Arduino Duemilanove.

When the cylinder spins, the opening allows food to fall off when the opening faces down. A funnel system then drives the food to a Y type PVD junction which distributes the food evenly to two bowls. Since the food is dispensed to both bowls at the same time, the cats eat toegether and therefore minimizes the chances that one cat its share and then try to eat from the other's.

When the cylinder needs to be refilled, my wife or I can just pick up the cylinder, open one side, and fill it up. Then we replace the cylinder and make sure the plastic cover is properly set and positioned. This is important because otherwise the food will start falling off.

When the motor runs, it makes the cylinder rotate a certain amount of times. However, since the cylinder may provide varying resistance due to its weight (due to the amount of food in it) then a laser-driven sensor is also put in place to make sure the cylinder is repositioned in the right place to prevent premature spillage.

The plastic cover that closes the lid of the cylinder has a piece of wood that acts as a signal blocker. This piece of wood basically blocks a laser bean from illuminating a light-dependent resistor (LDR). When the piece of wood is positioned correctly, it will block the laser. If the LDR detects the laser, this is a notification to the Arduino controller that it needs to readjust the cylinder. It will continue doing this until the LDR no longer receive light from the laser. I must provide great thanks to the author if this blog for his use of laser and LDRs

Here are some videos detailing the various elements that make up the feeder...

UPDATE: I've added some other videos to show the device details...

Improvements as of 6/22/09

  • Connection between PC and feeder is now wireless using Xbee modules. Now the cat feeder is free to be anywehere around the house. Just needs a power connection.

  • A web interface has been created which allows the control of the device via a web site. A web cam with live video feed has also been setup to monitor the feeder and the cats.


By far, my biggest challenge was something called "de-coupling" The idea that a motor, or any device that generates electromagnetic force, can disrrupt the circuit and cause devices to go nutty. i found this web site , as well as the forums, very useful while trying to figure out how to use capacitors to resolve this issue.

Ongoing Development

  • Improve the way the container rotates. I don't really like the way i have to fill it at this time.

  • Implement a better timer solution in the Arduino. I'm looking at the MSTimer2 libraries, will see if this have better results. While my current solution works fine, i am sure there are better ways to solve this issue.

Constructive and helpful comments and suggestions are always welcomed!


  1. great project! i love the laser sensor

    1. I really loved reading your blog. It was very well authored and easy to undertand. Unlike additional blogs I have read which are really not tht good. I also found your posts very interesting. In fact after reading, I had to go show it to my friend and he ejoyed it as well! automatic dog

  2. Thank you! i've had to redesign a few things, but the overal concept is still the same. I hope to post video of the new driving system soon. Stay tuned!

  3. you should send this over to Mr. Yarnell!!! I'm sure he would love to help or at least give you some ideas! :)

  4. I need some sharks with laserbeams on their heads!
    good job! it looks great

  5. Why not something more like a funnel instead of the rotating cylinder to measure out food portions?

  6. Hi Josiah,
    I tried a few different methods to deliver the food to the bowls. the main problem I found was that when I used some sort of gate or funnel, the food could get stuck, or the gate would not close properly as the pellets would obstruct the way. I went with the revolving container because there is no way the food pellets will get stuck.

    As far as the amount of food being dropped, the amount is not exact, but it does a fairly even distribution each time the container rotates and delivers food. I have not made any exact measurements, but by just eyeballing it the same rations appear to fall each time.

    Another detail that is not evident is that the PVC's Y divider has a cardboard separator which divides the food into the two tubes. This makes the food distribution even between the two bowls.

    Hope this answers your questions. Thanks for your feedback!

  7. More details please. does it stop at the slot for a certian time or are you hoping that the food will rush out the hole during the pass.

    Are you using friction drive or belt drive? can you show photo details of the drive system?

  8. Cool. Great job! What do your cats think? Does the noise scare them or do they come running? :)

  9. The cats were a little apprehensive at first... but once they associated the noise with food... pavlov was right!! :)

  10. Hello Tim:
    To answer your questions: no, the servo does noe rotation, and that is enough to drop the required amount into the containers.

    i am using a chain belt around the container to propel it. the chain and sproket i used were from Vex robotics ( the chain wraps around the container to turn it. the servo and sprocket are immediately below.

    hope this answers your questions. i'll try to post more pics later.

  11. Andres, this is absolutely brilliant! Only last week did I mention (again) to my wife about wanting to make an automatic feeder for our two ravenous felines, and here you've gone and done it.

    Kudos to you, and thank you for giving me some ideas for my own unit. I'd better get cracking on it, as my wife just asked "when are you going to build us one?"

  12. Hi,
    Nice hack. Why not simply use a magnet & reed contact instead of the laser ?

  13. "Why not simply use a magnet & reed contact instead of the laser ?"

    because saying that you have a "laser controlled" anything sounds much cooler! :)

    in truth, i didn't really think of the magnet idea... another fine way to do it. Thanks!

  14. Hi Andres,

    Very cool project, and very well executed. I'm curious how you make ASP talk to the Arduino. Does have access to ports? Or functions for executing commands? I'm a PHP guy myself, and there are a few ways to do it, but sometimes the security is questionable.

  15. Aaron,
    Arduino talks to the PC via serial. All i do is open a connection with the COM port that connects to the Arduino and read the input from its buffer.

    In my case, I am connecting to the Arduino via the Xbee modules. My ASP.NET code opens a connection with the COM port of the Xbee module connected to my PC. This module, in turn, transmits and receives data from the Xbee wired to the Arduino board.

    regarding security, the web site hosting this code is password protected. The biggest issue, to me, is not really secuirty, but the fact that a COM port can only be used by one app at the time. Managing that has proven to be more interesting that i previously thought :)

  16. A great project, well executed. Thanks for taking the time to explain it. I have a couple of questions:

    - What mode are you using the Xbees in? Straight passthrough, or packet mode?

    - If you were to do this project again, what would you do differently?

    - Which laser did you use? (If you can post a bill of materials, with part #'s, that would be greatly appreciated).

  17. What webcam did you use and how did you make it display in your ASP page? Been looking for a way to do that for my site!

  18. Can You please share Arduino and projects with us so we can do something like that for our own purposes. :-)

  19. MagicMike: To answer your questions:
    - The Xbees are in passthrough mode.

    - that's hard to answer because i really didn't have a specific goal in mind when i started. i just sort of started building and added new items as i saw then userful (and possible to make) If i were to build a whole new design, i try to make it a little smaller and more compact.

  20. Sorry... forgot to answer the last question. I used a regular laser pointer. one of those cheap ones you can buy at an office or hardware store. I happened to have a spare laser pointer from a previous project i had.

    as soon as i have some time i'll try to post a list of materials used.

  21. i used a regualr logitech web cam. i think is the communicate stx.

    i used a program called webcamxp. they have a free version for personal use. It's pretty simple to setup and use. it can stream the video to flash or other formats.

  22. Nice results! A week or so ago I started the same project (dry food dispenser) and to get around the blocked-funnel issue came up with the same "drum" solution. I was so proud of the design and now I see you've already done it!!

    I hope my arduino-controlled dry food dispenser works as well as yours does. Thanks for proving the concept. :)

  23. where can i find the code for the xbee and arudino. xbee integration with arduino it's very interesting to me . Thanks again Andres

    James, Author of Woodworking Plans

  24. James D: Here is where you can find the information I used to use the XBees

    Good luck!

  25. What an amazing videos and wonderful machine now people who have cats in their house don't need to worry about going out to throw the cat's poop.

  26. Hello .. firstly I would like to send greetings to all readers. After this, I recognize the content so interesting about this article. For me personally I liked all the information. I would like to know of cases like this more often.

  27. I love this food dispenser, totally fantastic.

  28. Hi Andres,

    I'm into Arduino too and looking for a similar solution to feed YT (whity). The issue in Malaysia is quite humid so I want to limit the dry food to air expose as little as possible.

    I will study your project in detail and share mine later.

  29. interesting! although I have no expert, but I want have to know more and more, on your blog just interesting and useful information. Keep it up!

  30. i used a regualr logitech web cam. i think is the communicate stx.

  31. Wow, this is cool, I'd love my cat to have it.

  32. Nice results! A week or so ago I started the same project (dry food dispenser) and to get around the blocked-funnel issue came up with the same "drum" solution. I was so proud of the design and now I see you've already done it!!

    I hope my arduino-controlled dry food dispenser works as well as yours does. Thanks for proving the concept. :) Aino 7 Paladin
    Ainol Novo 7
    Ainol Novo 7 Elf
    novo 7 elf tablet
    novo 7 elf
    Ainol Novo 7 Aurora

  33. Hi Andres,
    I am trying to implement Energy meter reading project that you developed. I want some help on IR resistor connectivity to Arduino board.
    Any connectivity picture (diagram) will help . Does it require additional resistor to be connected to Arduino to read LED of energy meter ?
    Please reply to my email ( , thanks.


Post a Comment

Popular posts from this blog

Una maquina controlada por Arduino, rayos laser, y es inalámbrica (wireless) que le da comida a mis gatos automáticamente.

Using an Arduino to Track My Electricity Consumption Cost in Real-Time