Automatic Pet Feeder

by trourke1 in Circuits > Gadgets

200 Views, 0 Favorites, 0 Comments

Automatic Pet Feeder

IMG_0015.jpg

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

IMG_0040.PNG
IMG_0044.PNG
IMG_0047.PNG
IMG_0049.PNG
IMG_0042.PNG
IMG_0051.PNG

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

Ex:

Locating Design Parts

Screenshot 2023-11-15 150231.png

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.    


Importing Files

Screenshot 2023-11-15 150734.png
  1. Next, visit MakerBot CloudPrint and import the .STL file from Tinkercad.  Select the “Scale to Fit” option when the menu appears.


Confirming MakerBot Settings

Screenshot 2023-11-15 151237.png

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”


Exporting

Screenshot 2023-11-25 132619.png

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.


Different Steps of Printing

Screenshot 2023-11-25 132804.png
  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.


Construction and Proper Set-up

IMG_0077.PNG

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.”


Wiring CPX and Servo

IMG_0079.PNG

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.  


Building Your Model

Screenshot 2023-11-25 134940.png
Screenshot 2023-11-25 135003.png

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. 


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.



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.


  

Downloads

Printing Example

IMG_0102.PNG
IMG_0100.PNG
Screenshot 2023-12-02 141830.png
  • 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!