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.
Challenges
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 Arduino.cc 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!
great project! i love the laser sensor
ReplyDeleteI 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
DeleteThank 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!
ReplyDeleteyou should send this over to Mr. Yarnell!!! I'm sure he would love to help or at least give you some ideas! :)
ReplyDeleteI need some sharks with laserbeams on their heads!
ReplyDeletegood job! it looks great
Why not something more like a funnel instead of the rotating cylinder to measure out food portions?
ReplyDeleteHi Josiah,
ReplyDeleteI 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!
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.
ReplyDeleteAre you using friction drive or belt drive? can you show photo details of the drive system?
Cool. Great job! What do your cats think? Does the noise scare them or do they come running? :)
ReplyDeleteThe cats were a little apprehensive at first... but once they associated the noise with food... pavlov was right!! http://en.wikipedia.org/wiki/Classical_conditioning#Pavlov.27s_experiment :)
ReplyDeleteHello Tim:
ReplyDeleteTo 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 (http://vex.innovationfirst.com/vex-robotics-sprocket-and-chain-kit.shtml) 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.
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.
ReplyDeleteKudos 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?"
Hi,
ReplyDeleteNice hack. Why not simply use a magnet & reed contact instead of the laser ?
"Why not simply use a magnet & reed contact instead of the laser ?"
ReplyDeletebecause 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!
Hi Andres,
ReplyDeleteVery cool project, and very well executed. I'm curious how you make ASP talk to the Arduino. Does ASP.net 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.
Aaron,
ReplyDeleteArduino 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 :)
A great project, well executed. Thanks for taking the time to explain it. I have a couple of questions:
ReplyDelete- 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).
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!
ReplyDeleteCan You please share Arduino and Asp.net projects with us so we can do something like that for our own purposes. :-)
ReplyDeleteMagicMike: To answer your questions:
ReplyDelete- 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.
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.
ReplyDeleteas soon as i have some time i'll try to post a list of materials used.
i used a regualr logitech web cam. i think is the communicate stx.
ReplyDeletei 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.
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!!
ReplyDeleteI hope my arduino-controlled dry food dispenser works as well as yours does. Thanks for proving the concept. :)
where can i find the code for the xbee and arudino. xbee integration with arduino it's very interesting to me . Thanks again Andres
ReplyDeleteJames, Author of Woodworking Plans
James D: Here is where you can find the information I used to use the XBees
ReplyDeletehttp://www.ladyada.net/make/xbee/index.html
Good luck!
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.
ReplyDeleteHello .. 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.
ReplyDeletegood article
ReplyDeleteI love this food dispenser, totally fantastic.
ReplyDeletecool post
ReplyDeleteHi Andres,
ReplyDeleteI'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.
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!
ReplyDeletei used a regualr logitech web cam. i think is the communicate stx.
ReplyDeleteWow, this is cool, I'd love my cat to have it.
ReplyDeleteHi Andres,
ReplyDeleteI 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 (sandeep.nag@gmail.com) , thanks.
I've been considering a dog feeder for my busy schedule. This post is super helpful! I'm particularly interested in models with portion control and customizable feeding times. Does anyone have experience with feeders that cater to picky eaters?
ReplyDeleteThanks and that i have a super offer: How Much House Renovation Cost Philippines complete home renovation
ReplyDelete