Raspberry Pi powered Cat Feeder by henryloc5 3d model
3dmdb logo
Thingiverse
Raspberry Pi powered Cat Feeder by henryloc5

Raspberry Pi powered Cat Feeder by henryloc5

by Thingiverse
Last crawled date: 5 years, 8 months ago
Original Dispenser: https://www.amazon.com/Petmate-Replendish-Microban-Automatic-Available/dp/B0057LAICC/ref=sr_1_10?dchild=1&keywords=pet+food+dispenser&qid=1585784987&sr=8-10
Servo motor used: https://www.amazon.com/gp/product/B019TOJPO4/ref=ppx_yo_dt_b_search_asin_title?ie=UTF8&th=1
I used the circular attachment from the servo motor kit and hot glued it on to the Auger screw.
The python script is simple. The way I wrote it is just to have to motor seek its minimum point, but there isn't one because the servo is 360 continuous rotation, it will just keep spinning counter clockwise till the script ends.
power the servo with the pi's 5V. I have my servo signal connected to GPIO 17.
The script:
Servo.py
from gpiozero import Servo
import time
from time import sleep

myGPIO=17

start = time.time()

Duration = 3

myServo = Servo(myGPIO)

while True:
myServo.min()
sleep(1)
if time.time() > start + Duration:
break
exit()

saved Servo.py to my desktop
I used cron as my scheduler, to start open up terminal and input:
crontab -e
inserted these lines at the very bottom
0 6 * * * python /home/pi/Desktop/Servo.py
0 12 * * * python /home/pi/Desktop/Servo.py
0 18 * * * python /home/pi/Desktop/Servo.py
what this does is run Servo.py at 6am, 12pm, and 6pm
ctrl X, press y, and enter to save
I like to restart cron after I make any changes
In terminal input
sudo service cron stop
sudo service cron start
and you should be good to go.

Tags