Cat Feeder

by winrtop255 in Circuits > Arduino

1136 Views, 20 Favorites, 0 Comments

Cat Feeder

cat feeder.gif
F1V93XXLWW4IAW2.jpg
FRLYBJALWW4IAVR.jpg
IMG_1577.jpg

Welcome to the Arduino Cat Feeder project!

In this guide, I'll walk you through creating an automated cat feeder using an Arduino UNO, a servo motor, and some basic components. The feeder works by controlling a servo motor to open a door, allowing food to fall into a bowl at scheduled times.

I'll also show you how AI tools, such as ChatGPT and Adobe Illustrator, played a role in the design process.

Supplies

IMG_1550.jpeg
Servo-Motor.jpg

You will need a few things:

  1. Arduino UNO
  2. Servo Motor
  3. Jumper wires
  4. A container for the food
  5. Two M3*7 screws
  6. Four M4*12 screws
  7. 3D printer
  8. 9V Battery + Connector

Planning for the Feeder

Picture1.png
Picture4.png
Picture2.png
Picture3.png

I started by using ChatGPT to brainstorm and refine the concept of the cat feeder. ChatGPT helped generate ideas on how to control the servo motor, the structure of the feeder, and even the programming required to ensure timely food dispensing.


Then, using Adobe Illustrator's AI generative tools, I designed a cute cat icon to personalize our feeder. This icon was saved so I could place it on the lid of the Pet Feeder later on!

3D Printing

Picture5.png
Picture6.png
IMG_1543.jpeg
IMG_1545.jpeg
IMG_1549.jpeg
IMG_1556.jpeg
IMG_1554.jpeg
IMG_1555.jpeg
IMG_1553.jpeg
IMG_1548.jpeg
IMG_1547.jpeg

I then used TinkerCAD to design the Pet Feeder and also placed the cat icon on the lid!


Afterwards, I printed the parts out. It's important to note that I split the base in half and printed them separately since it required a lot less supports! I then used some glue to stick the parts together and ensure they won't come apart.

I printed at around 20% infil which worked out perfect!


Installation

IMG_1546.jpeg
IMG_1552.jpeg
IMG_1559.jpeg
IMG_1562.jpeg
IMG_1557.jpeg
IMG_1560.jpeg
IMG_1563.jpeg
IMG_1558.jpeg

To begin, insert the "Axle" into the "Pet Door". You may need to use some force to properly secure it.

Then, carefully thread the Servo cable through the hole at the top and slowly pass it through the cable hole until it reaches the bottom and comes out.


Afterwards, use some hot glue to attach the "Pet Door" onto the Servo arm and secure it in place, making sure it can still open and close the door!


Then, to seal the lid ontop, I used some sticky tack to ensure an airtight seal.

Wiring

Design.png
IMG_1564.jpeg
IMG_1565.jpeg

Now for the wiring!

Connect the servo motor to the Arduino as follows:

  • Servo Red Wire: 5V on Arduino
  • Servo Black Wire: GND on Arduino
  • Servo Signal Wire: Pin 7 on Arduino


Also, connect the 9V Battery to the Arduino as well.

  • 9V Battery Positive: VIN on Arduino
  • 9V Battery Negative: GND on Arduino

Now that you're done, time to program our Arduino!

Programing

Screenshot 2024-06-02 163525.png
Screenshot 2024-06-02 163605.png

Using ChatGPT, I generated and refined the Arduino code. Here’s the final code to control the servo motor!

#include <Servo.h>

Servo myServo;
const int servoPin = 9;  // Pin connected to the servo signal wire
const int openAngle = 90;  // Angle to open the servo
const int closeAngle = 0;  // Angle to close the servo
const unsigned long openDuration = 1500;  // Duration to keep the servo open in milliseconds
const unsigned long sixHours = 21600000;  // 6 hours in milliseconds

void setup() {
  myServo.attach(servoPin);  // Attach the servo to the specified pin
}

void loop() {
  myServo.write(openAngle);  // Open the servo
  delay(openDuration);  // Wait for 1.5 seconds
  myServo.write(closeAngle);  // Close the servo
 
  // Wait for 6 hours
  unsigned long startTime = millis();
  while (millis() - startTime < sixHours) {
    // This loop ensures that we wait for exactly 6 hours
    delay(1000);  // Adding a small delay to prevent watchdog reset
  }
}


Testing and Calibration

IMG_1566.jpeg

Now, upload the code to the Arduino and screw in the base to protect the electronics inside.

Make sure to test the servo to ensure it opens and closes the door correctly.

You may need to calibrate the timings if needed to match your cat's feeding schedule and/or amount!


Conclusion

FQVSZADLWW4IGJ1.gif
IMG_1575.jpeg
IMG_1574.jpeg
FI604U9LWW4IGG0.jpg

Congratulations! You’ve built an automated cat feeder using an Arduino and a 3D printer!

By integrating AI tools like ChatGPT for coding assistance and Adobe Illustrator for design personalization, we’ve created a functional and customizable cat feeder!

Enjoy the convenience and rest assured knowing that your cat will be fed on time every day!