Sensor Pet Feeder

The problem that we will be trying to solve is how an individual can feed their pet using technology. The goal is that the motion of the pet will activate it. We will be using the Express playground to achieve our teams goal of a creating an easy-to-use pet feeder. “Because you can program the same board in 4 different ways the Express has great value and re-usability. From beginners to experts, Circuit Playground Express has something for everyone.” (Adafruit 2025)
Supplies
All necessary supplies and equipment are provided with links.
- Base
- Portion Control
- Holder
Example
Download and Print These 3 Parts of the Pet Feeder

- Download and print the following STL files using a 3D printer. Use a raft and supports.
thingiverse:
https://www.thingiverse.com/thing:4878578
Assembly

Assemble 3 parts that have been printed. Insert the portioner into base (it will just sit on top, you can see the indent where the motor will go so don’t screw anything on yet. The holder will then go on top of these 2 pieces
Wiring

Insert the motor into the small slot in the base of the feeder and make sure wires that lead to cpx are connected. The wires will feed through the bottom of the base and will connect to cpx that will stay on the side of the feeder.
- Screw the portioner to the motor using a small screwdriver
This is what it should look like:
Code


"""CircuitPython Essentials Servo standard servo example"""
import time
import board
import pwmio
from adafruit_motor import servo
from adafruit_circuitplayground import cp
# create a PWMOut object on Pin A2.
pwm = pwmio.PWMOut(board.A1, duty_cycle=2 ** 15, frequency=50)
# Create a servo object, my_servo.
my_servo = servo.Servo(pwm)
while True:
if cp.button_a:
print("Button A pressed!")
cp.red_led = True
for angle in range(0, 180, 5): # 0 - 180 degrees, 5 degrees at a time.
my_servo.angle = angle
time.sleep(0.05)
for angle in range(180, 0, -5): # 180 - 0 degrees, 5 degrees at a time.
my_servo.angle = angle
time.sleep(0.05)
if cp.button_b:
cp.pixels[5:10] = [(0, 255, 0)] * 5
else:
cp.pixels[5:10] = [(0, 0, 0)] * 5
Test
Once the steps above are finished test out the pet feeder by shaking the Cpx or touching the green alligator clip that activates the inner portioner to move. You may want to add an object into the holder so you can see it fall out.