Introduction: Automatic Pet Feeder

This design is a Pet Feeder Funnel design.  An Adafruit Circuit Playground Express (CPX) device is utilized to “hold” the code so it can function and be delivered to attached devices.  The CPX is a programmable microcontroller tool that users can work with to explore coding.  Within the device, the pet feeder gains movement through a Micro Servo Motor, a small rotating device that can be coded to rotate from 0º to 180º.  This design works with the programming language, Circuit Python, to code the microcontroller, in order to physically move 3D printed casings and activate light and sound from the CPX.  Wires from the Micro Servo Motor and a battery pack connect to the CPX to create a movable and functional device.



Supplies

All necessary supplies and equipment are provided with links. Photo(s) of the supplies are shown

Ex:

Step 1: Locating Design Parts

First access the Tinkercad file where the design parts were created.  To export the design to print, click the export button in the top right corner of Tinkercad and select .STL when the menu appears.    


Step 2: Importing Files

  1. Next, visit MakerBot CloudPrint and import the .STL file from Tinkercad.  Select the “Scale to Fit” option when the menu appears.


Step 3: Confirming MakerBot Settings

In the bottom right corner of MakerBot titled, “Quick Settings,” “breakaway supports” should be selected as the default.  Also in settings, the “Base Layer” dropdown menu should be selected as “None”


Step 4: Exporting

Select the “Export” button in the top right corner.  A .makerbot file will automatically download onto your computer.  At this point, a flash drive must be connected to the computer and the .makerbot file should be dragged onto the drive.


Step 5: Different Steps of Printing

  1. Once the .makerbot file is on the flash drive, detach it from the computer and plug it into the 3D printer.   When attached, the flash drive will appear on the printer menu.  Select the title of the .makerbot file you downloaded and select print. 
  2. The printer should list the time it will take to print the device.  This device consists of the funnel, the small “door,” and the 2 stands.  It is a good idea to print the components individually as the build plate is a small space.
  3. Once the component are printed assembly can be conducted.  Plug in the hot glue gun.


Step 6: Construction and Proper Set-up

To begin, apply small amounts of hot glue to the tops of the stands and attach the “lips” of the funnel on top of the glue.  Ensure the two stands are glued across from each other enabling the funnel to “stand up.”


Step 7: Wiring CPX and Servo

Next, wire the Micro Servo Motor to the CPX device using the specific wiring system of, the GND CPX port connected to the brown/black Servo wire, the A1 or A2 CPX port connected to the orange/yellow Servo wire, and the Vout CPX port connected to the red Servo wire.

Plug the battery pack into the CPX and place the battery on the shelf that is attached to the printed funnel.  


Step 8: Building Your Model

To attach the Micro Servo Motor first glue 2 full Servo Motor arms and 2 half Servo Arms in a straight line together and attach to the motor.  Glue the square “door” to the end of the line of arms.  

Glue the Micro Servo Motor in between one stand, wrapping the wires around the funnel.  The proper placement of the motor is in between the stand where the door lines up with the bottom of the funnel, enabling the door to swing open and release food before returning back to a starting position covering the funnel opening. 


Step 9: Understanding & Uploading the Code

  1. The code used for this device is Circuit Python. The uploaded code in written form consists of the incorporation of light, sound, buttons or sensors, and movement that assist in the carrying out of the overall goal of feeding a pet.
  2. When button A is pressed, the CPX lights become a pink color and plays a tone while opening 180º for the cleaning of the device. The device opens in 0.05 seconds and then closes in 0.08 seconds. 
  3.  When a flashlight is placed over the CPX, one neon green light will turn on and the device will open 90º, taking 0.05 seconds. Food will be released at this time and will then take 0.08 seconds to close. 
  4. When button B is pressed, all of the lights will turn a reddish color and a tone will play. The device will open 90º in 0.05 seconds and will close in 0.08 seconds.


To upload the code to the CPX, copy the code from these instructions and paste it into Mu Editor. The CPX must have the libraries adafruit_circuitplayground and adafruit_motor. Select “SAVE” to save the code onto the CPX.



Step 10: Learning Code

  • Follow these instructions to install CircuitPython onto your CPX: https://learn.adafruit.com/welcome-to-circuitpython/installing-circuitpython
  • Connect your CPX to your computer and save code.py onto it
  • The provided code will:
  • Cause the motor to open 180º when button A is pressed, light up, and play a sound.
  • Cause the motor to open 90º when a flashlight is directed at the CPX and light up.
  • Cause the motor to open 90º when button B is pressed, light up, and play a tone.


Step 11: Printing Example

  • Download and print the following STL files using a 3D printer. Select no raft and supports. The design can be found in the attachments of this step
  • These files were designed using TinkerCAD
  • Mount remixed from Adafruit’s Snap-fit Mount
  • Remove supports using cuticle cutters (already done for you)

You are now ready to build your model!