Dog Treat Dispenser


8 posts
by waltermixxx » Sun Apr 02, 2017 1:46 am
Hi all, my dog treat dispenser is based on this dog treat dispenser posted over here at http://www.nyccnc.com/judd-treat-machine.html.
There are three video's on his site with great detail into the pythong script, the mechanics and creation of his dog treat dispenser, along with basic operation.

There are quite a few differences in our projects, but they do behave pretty much the same way. My code is based on his code, I removed what I did not want, and added things I needed for my version. This is pretty much how it operates:

A user sends an email to a gmail account you setup for your dog so your dog can get a treat.
The raspberry pi checks for emails every 10 minutes or so, and if it finds any new unread emails, it dispenses a treat, waits a few seconds, then it snaps a picture of your dog having a treat.

Then the raspberry pi replies to those new unread emails and attaches the picture it just took of your dog enjoying the treat. Upon replying, the email(s) in the inbox are marked as read, preventing them from generating another cycle.

NYC CNC based dog treat dispenser users a raspberry pi, a servo, a gear Motor, and an LCD screen, I chose to go a simpler route. My dog treat dispenser uses:

a raspberry pi,
An Arduino Pro Mini to control the L.E.D.S. and the servo motor,
1 servo motor to drive the auger to dispense the treat(s),
3 L.E.D.s to indicate status,
and 3D printed parts.

Here is a link to all the parts on Thingiverse: http://www.thingiverse.com/thing:2187877

Image


Here are a bunch of pictures of the device: https://www.flickr.com/photos/66577016@N00/albums/72157679653879371
Not shown in the pictures is the Battery pack I added last minute to power the servo separately to preven the raspberry pi from crashing.

Image

Image

Attached is the Python Script for my version of the dog treat dispenser and the Arduino .ino file for the pro mini. :)

Enjoy :)
Attachments
Treat-Dispenser.zip
Enjoy
(3.13 KiB) Downloaded 14 times
Electronics for fun...
Raspberry Pi-1 Occidentalist, Tenda 311m x 2
Raspberry Pi-2 Raspbian Wheezy 07-15-12, Netgear N150 x1
Genius 8000 slimline wireless keyboard and mouse both work great with the usb wifi dongle right in the raspberry pi.
Posts: 34
Joined: Wed May 09, 2012 7:21 pm
Location: Woodbridge, Ontario
by waltermixxx » Tue Apr 18, 2017 6:57 pm
where are the dog lovers?

(bump) :)

i hope I'm not breaking too many rules by bumping this, but it is a very easy to setup dog treat dispenser. :)

(Ok I'm very proud of it...) :)

Cheers. :)
Electronics for fun...
Raspberry Pi-1 Occidentalist, Tenda 311m x 2
Raspberry Pi-2 Raspbian Wheezy 07-15-12, Netgear N150 x1
Genius 8000 slimline wireless keyboard and mouse both work great with the usb wifi dongle right in the raspberry pi.
Posts: 34
Joined: Wed May 09, 2012 7:21 pm
Location: Woodbridge, Ontario
by YCN- » Thu Apr 20, 2017 3:11 pm
Hi,

Very nice one ! But isn't this system weak aggainst spam mail ? Your dog will get fat ! If I were you I would host a tiny webserver on the pi, so that you'll receive a request from a webpage, where you'll be able to press a button and feed the dog.
I love the 3D print, how much does it cost to print the dispencer? If it's cheap I may do it for my cat because she's so annoying on the morning when she wants food ahah, I would be there sitted on my bed and pressing a button to feed her haha

YCN-
Posts: 175
Joined: Fri Jun 10, 2016 3:18 pm
by waltermixxx » Sat Apr 22, 2017 10:32 pm
Printing all the parts is less than 1 kg so if a roll of filament is say, 29.00 Canadian, that's pretty inexpensive.

Your right. I could setup an alternative email address that goes to me, then I enable the dispenser,
Or simply put a daily limit in the python script, so she does not get more than three treats per day.
The reply could be, thanks for the treat, but I'm full, here's a picture of me from earlier.

Or something along those lines.

Cheers and thanks for your comments.

Cheers.
Electronics for fun...
Raspberry Pi-1 Occidentalist, Tenda 311m x 2
Raspberry Pi-2 Raspbian Wheezy 07-15-12, Netgear N150 x1
Genius 8000 slimline wireless keyboard and mouse both work great with the usb wifi dongle right in the raspberry pi.
Posts: 34
Joined: Wed May 09, 2012 7:21 pm
Location: Woodbridge, Ontario
by maidbloke » Fri Apr 28, 2017 11:29 pm
Neat project, the 3D printing looks very smart. Reminds me of the "Feed Toby" project - this time a dog is fed each time someone tweets him! Details: https://nat.ms/
Posts: 2
Joined: Sat Aug 30, 2014 11:37 pm
by flatirons303 » Mon May 01, 2017 6:32 pm
Walter - First off, this is super cool, and I really appreciate you sharing it. I'm going to try and recreate your project as a present for my girlfriend's new puppy, but I have little to no background in electronics.

So, given the low bar, could you specify the hardware you used for this project? I realize it's about as close to hand-holding as possible, but a list I can pull off from Amazon would be ideal - I'm not quite sure of the wiring, arduino pro voltage model, ect, so it's somewhat daunting. Thanks for the consideration and potentially contributing to some major brownie points for me
Posts: 1
Joined: Mon May 01, 2017 6:20 pm
by waltermixxx » Mon May 15, 2017 4:18 pm
1 Raspberry Pi 1B. it's an older one but it will work fine with this project. :)
1 Rapsberry Pi prototyping board from adafruit, but any Raspberry Pi prototyping board will do.
1 Arduion Nano ( to be honest, I used the nana because my Python skills are limited... I knew a bit more Arduino than Python, so it unloaded things that could have been done with just a raspberry pi and a better understanding of Python. I too am a nube,). :)
1 continuous rotation servo motor. :)
1 wifi dongle
1 raspberry pi cam. ( A webcam could be used but the python script would need to be changed...).
3 LED's and 330 Ohm current limiting resisters for status indicators

Hope this helps. :)

I can provide a wiring diagram from the Arduino and the raspberry pi give me a couple of days...
also sorry for the delay in the reply... :)

the Arduino code does describe which bins go where, but I can draw it out as well :)

this is the connection diagram for the Arduino Pro Mini and other compontents. Included are the digital i/o pin numbers on the arduino and GPIO numbers on the raspberry pi. :)

Image



Cheers. :)
Electronics for fun...
Raspberry Pi-1 Occidentalist, Tenda 311m x 2
Raspberry Pi-2 Raspbian Wheezy 07-15-12, Netgear N150 x1
Genius 8000 slimline wireless keyboard and mouse both work great with the usb wifi dongle right in the raspberry pi.
Posts: 34
Joined: Wed May 09, 2012 7:21 pm
Location: Woodbridge, Ontario
by waltermixxx » Fri May 19, 2017 7:00 pm
See added wiring diagram above.
Electronics for fun...
Raspberry Pi-1 Occidentalist, Tenda 311m x 2
Raspberry Pi-2 Raspbian Wheezy 07-15-12, Netgear N150 x1
Genius 8000 slimline wireless keyboard and mouse both work great with the usb wifi dongle right in the raspberry pi.
Posts: 34
Joined: Wed May 09, 2012 7:21 pm
Location: Woodbridge, Ontario