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 Servoimport timefrom time import sleepmyGPIO=17start = time.time()Duration = 3myServo = 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.py0 12 * * * python /home/pi/Desktop/Servo.py0 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.
Adapter.STL | 71.5KB | |
ExitElbow.stl | 1.1MB | |
LeadScrew_bottom.stl | 3.5MB | |
LeadScrew_top.stl | 4.2MB | |
MainBody.stl | 1.2MB | |
servo_mountr.STL | 98.1KB |