Cat Feeder
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
You will need a few things:
- Arduino UNO
- Servo Motor
- Jumper wires
- A container for the food
- Two M3*7 screws
- Four M4*12 screws
- 3D printer
- 9V Battery + Connector
Planning for the Feeder
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
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
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
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
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
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
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!