Automatic Pet Feeder With Simple Encoder by krizzli 3d model
3dmdb logo
Thingiverse
Automatic Pet Feeder With Simple Encoder by krizzli

Automatic Pet Feeder With Simple Encoder by krizzli

by Thingiverse
Last crawled date: 3 years ago
Check out this remix by Juggalooo https://www.thingiverse.com/thing:4627735
Download version 1.5.4 or 1.5.6 of the RTCLib library on github (link in the Arduino code) since there is a bug in 1.5.5 for the time being.
It all started with the simple conclusion that I was really annoyed by my cat Mia walking on my face at 6am every day to get her morning food allowance. My girlfriend and I rescued her from a shelter and the poor thing can't self-manage the amount of food she eats, leading to a slight overweight that we are controlling with a strict diet. Since the total amount of food per day is quite low (45 to 50 grams), the vet suggested we feed her multiple times a day. We settled on 3 times a day which meant we needed to bring out the scales and dose the dry food way too often for my taste. This also meant kitty was hungry very early in the mornings and didn't hesitate to let us know in her own way.
There comes my addiction for Arduino-based devices and 3D printing (y'all know how it goes). The list of parts you will need is as follows:
An Arduino-based microcontroller (Arduino Pro Micro in my case)
A real-time clock module (DS3231 or similar)
A TowerPro MG995 continuous rotation servo motor
A standard LED
A standard light-dependent resistor (LDR)
A couple of resistors (around 10k ohms for the LDR, and around 220 ohms for the LED)
Wires
Optional: push button
Refer to the images for the wiring. I put the LDR and LED on the same circuit to be able to turn them both on with the same pin. I used some digital pins for power since the Pro Micro doesn't have a lot of 5V power outputs. I added a button for manual activation but that was mainly used during the testing phase and I would maybe keep it for the occasional bug where the device doesn't perform exactly as expected.
One important thing to note is that the servo will draw quite a lot of current and the regulated 5V outputs from the Arduino won't be able to make it turn, it will reset the board. You should really wire the servo Vin input to Vbat or Vraw output on the Arduino (unregulated), and make sure you power your Arduino using 5V (with USB for example).
You then need to glue the "Coupler" printed part with the little adapter that comes with the servo (to put on the servo gear). I used the circular one and glued them with CA glue as seen in the pictures. I originally intended to use the coupler directly on the servo but I didn't quite work, it's much better to use the provided adapter which has teeth to match the servo's gear teeth.
I taped the LED and LDR to the lid with duct tape and did the wiring by soldering the various wires and resistors together like in the schematics, without using a breadboard obviously. Heat shrink or electrical tape around every solder point made sure that no short circuit could happen.
Note that all the parts as available here have been optimized for 0.48mm extrusion width and 0.3mm layer height. Should you wish to print with different settings, I encourage you to create a free account on OnShape and edit the variables at the top of the public document for this project.
To refill the device, no need to unplug anything. Simply lift the lid and put it on the side, taking care not to pull on the wires too much. Take the main body with the "blades" part out of the support, turn the blades so that the slot in the middle is vertical (north-south if you prefer). This should align one of the compartments with the opening on the right (or left depending on how you see it). You then proceed to fill the compartments with the right amount of food (I usually put the device on scales to weigh the precise amount). One compartment on the right stays empty. Then, remove the adapter from the servo, turn it with the orientation matching the slot in the rotating "blades" part (so north-south again) and insert it back. Finally, put the body back on the support, and the lid back on the body.
The device has now been working flawlessly for over a month, although it could probably be improved upon. One thing to note is that my cat is pretty chill with machines, she never tried attacking the thing (yet) but some cats are friggin crazy and this design won't stand a lot of abuse.
EDIT 2017-08-25: updated the microcontroller software with the following changes
"Detaching" the servo pin when not in use. If permanently attached, the pin would send electronic noise to the servo and cause audible noise (clicks). This is now fixed.
Slightly increased motor rotation speed
Tuned LED "on" delay and removed rotation stop delay according to new speed
Added failsafe in case of LED failure, to not rotate infinitely
EDIT 2017-09-26: slight speed and LED delay tuning. Note that your servo might perform differently, requiring adapting of these parameters, like explained in the code comments.
EDIT 2018-08-03: tuned the servo and LED parameters again, those are very robust for me, not a single failed rotation in 2 months!

Tags