Arduino Yun Project – wifi dog feeder & viewer

 

This is a short video I took a few weeks ago prototyping a arduino yun powered wifi dog feeder. The goal is to make a dog feeding device able to communicate over the internet. The Yun has been very helpful for this. I will post a complete post/tutorial on how I made it and how it works.

thanks
enjoy!

 

 

1/7/2015

Okay as said, an update… but a very late one

Last spring (2014) I was in a software engineering class, one that required students to form groups and develop two pieces of software, in an organized fashion.  The first project had to be an address book in whatever style/language you choose.  I was in a good group with good people, but it wasn’t all me.  Anyway we made a sweet address book (or at least two guys did, I was tester hah) and all was good. I think we got an A on that.  Anyway my friend and classmate Jim was in the class and we had explored some projects with microcontollers and were interested in incorporating it with the class.  I felt the need to be vocal, and it turned out a member in Jim’s group wanted to switch. So next thing that happened was we switched groups and I was now in my friend Jim’s group.  We convinced the group to work with microcontrollers and somehow ended on a dog feeder.  I think it stemmed from Jim’s project where he made a laser pointer move randomly to entertain his dog.  But I think I played a key roll in creating the dog feeder idea and seeing the ability to make it.  I was pretty into embedded systems like the Arduino Yun at the time, and some cool ones were coming out then.  There was the Arduino Uno which ruled, and I already owned, but there also was the Rasberry Pi, which was very cool, but I did not own one and had only experience with it one time.  I enjoyed the Arduino because it wasn’t a linux computer and programming it was much different than anything else, and it was able to make some things that were helpful and fun.  That reminds me of a couple key projects I did that helped create the dog feeder idea.  After hearing of Jim’s Arduino laser pointer thing, I was intrigued, and went home for the holidays (2013-2014) with an Arduino uno and some ideas.  I first followed a blog and made a motioned sensor trail cam.  Something I planned to hike far out on Mt. Tam and plant to maybe see a Mt. Lion.  I never did but it ended up working well to catch our new puppy and old puppy doing something bad (jumping out the kitchen when we are gone).  They are really good at jumping and they could jump over this removable dog fence that was pretty tall.  I was impressed.  I setup the trail cam and caught them pretty quickly.  It was funny to see, but then I got creative and added a buzzer and some modifications to the PIR sensor code to scare the dogs based on a few different movements.  It worked pretty good, but they always found new ways to get in trouble and I took it down and left back for school with all my electronic’s stuff.  I guess that project too contributed to the dog feeder.

Anyway enough story, we built a sweet dog feeder.  It works pretty well and can hold a lot of food, it has a controllable camera which is pretty cool and fun, and it has an awesome web interface and server for the user to interact, feed, and schedule feedings with your animal.  Okay maybe the code could be a bit better looking back on it now (mainly Arduino sketch code), but it was really good code, and I couldn’t thank Jim more for putting the time in and making the project with me.  He really did a lot all around, and it wouldn’t be without him.  The dog feeder was made with ply wood, a PVC T, and some 3d printed parts courtesy of this link  here off of instructables.com.  We used a rotational servo to drive a 3d printed auger to feed the dog, the same way they did.  We used an Arduino Yun to control the feeder and communicate with the web server.  We use tomcat server to power our web client and feeder, and we use backbone and bootstrap for our web client.  Thats the broad overview of the project, and I think it was pretty cool.  Now I will get into some detail.

Detail:

The first concept or proof we needed was to prove that we can make a device that can feed a dog without jamming.  I did not think this would be the largest obstacle we would face, but I think I maybe wrong.  When pitching the idea, I had a few ideas of my own that were not like dbc1218’s design’s and I thought we could get one of those designs working.  After plenty of research on feeder projects, even looking into rewiring some cat feeders to use the Yun, we found the cheapest, most effective, and most efficient way for us to be able to spend more of our time on the software engineer (because its the class) aspect, rather than the mechanical engineering needed to build the feeder box, was to use the schools 3d printer to print dbc1218’s design’s for free, and go from there.  The design is pretty good, but I would make some adjustments if I were to go into production with the product.  If you are unfamiliar with the design, it uses an auger to feed portions utilizing a T shaped PVC connector around 4 inch diameter to have gravity push food through top tube and auger sit horizontally and rotate to push the food out one end of the PVC pipe, see the link above if you are confused, maybe the video will help too.  The adjustments I’d make to it is to use a better material to have the auger, and I would make the auger a lot less than 4 inch diameter.  I would also add an electric motor to control the auger and give it more power.  Otherwise I think it works good.  I would also add a flap in front, and a sensor device to sense if a jam occurs, so then the there is some software to move the motor to unjam it, to use more power, making the regular use governed.  There some solution, just gotta walk that road, but I think the idea and design isn’t too bad.  Lots of people trash auger, because it looks easy to jam, but with decent materials, a decent sized jam gap, powerful motor, and good control of the motors, I think augers can be used, especially for dog food.  But theres probably a better solution.

Side note:

Right after we began development on our dog feeder, I stumbled upon a dogfeeder that just launched on kickstarter.  I kinda was bummed, but not surprised, the idea is trivial, and I am surprised a good one doesn’t lead the doggy world today.  Hmmmm. Anyway seeing his design was cool, and was cool to see one working and for sale!  he could see, talk, listen, and feed his pup, that’s what we went for too.  His was a bit pricey (around 400) this kinda thing can’t be more than 150 these day, maybe make it cheaper and add monthly site fees, but I’m not sure whats up with the kickstarter, maybe it’s still in dev idk.

Anyway the next thing to do after it was feeding, was to make a slick box for it, test it with weight, and add camera and talking capabilities.  I thought, nice, now software! not the case.. We ended up with a bunch more jamming cases and learned a lot about experimenting, haha.  Design didn’t change much, just a smaller auger works better.  Walter made the box, and it was great.  You see for this first project it was completely a proof of concept, so design and production weren’t on our minds.  We just wanted the thing to work so we could do some programming and make it looking halfway decent.  So it was somewhat of a team effort to get the thing off the ground and that was sweet.

Our next goal was to get webcam streaming.  We tried somewhat hard to have one our existing supplies, but ended up failing in the end.  I had seen this tutorial adafruit has here and thought it was cool and wanted to try but never had a Yun.  I got one for this project and tried it pretty early, worked well, but later had trouble with the fswebcam library driving a UVC webcam on a different Yun board.  Adafruit is the best, so glad they exist.  We settled for just a soundless live camera feed, that was controllable.  I couldn’t settle without having sound, but I knew making it possible to move the camera around and we had the supplies necessary to do it, so I figured it was just a matter of hard work.  I got to it.  Again, a proof of concept, because it was not pretty, but it worked really well so I didn’t mind.  I pieced together 2 small pieces of wood I had to hold two micro servos I had, each on a different axis, and hold the servo arm.  The last servo held a webcam, giving me x and y angle adjusters.  We created a web control of this camera, it came together within the last day and was pretty cool.  It was a nice fun touch on the project that made it fun to present.

Lastly I want to talk about is our power supply.  Having little experience in building electronics (but big eyes) we did end up with some issues powering the device.  We ended up just using a USB hub, but I still think the voltage was off, we didn’t even test with a multimeter (I was very new).  I am now learning by working at the university of Oregon CAES (computer architecture & embedded systems) lab the importance of proper hardware design and practices.  A very big thanks to Michel & Piotr.  Anyways I think its good to highlight some mistakes I made, they are just key concepts one needs to get used to when working with electronic hardware and development.

Now here are some pics and a link to the project:

GitHub: here

feeder snap hey

feeder web photo

feeder look down at mechanics

feeder profile

yun connected

feeder tank inside

feeder full