Okay, so I’ve been wanting to keep a better eye on my cat, Mittens, while I’m at work. She’s a bit of a chonk and tends to overeat if I leave too much food out. So, I decided to build a “camera pet feeder” thing. It sounded complicated at first, but it turned out to be pretty fun!
Getting Started
First, I gathered all the stuff I needed. I already had a Raspberry Pi lying around from a previous project. Then I ordered a cheap webcam and an automatic pet feeder – the kind with a timer, you know?

- Raspberry Pi (I used a 3B+, but others should work)
- USB Webcam
- Automatic Pet Feeder (with timer settings)
- Some wires and basic tools
- A bit of patience (this is important!)
Setting up the Hardware
Connecting everything was the first step. I plugged the webcam into the Raspberry Pi – easy peasy. The pet feeder was a bit trickier. I opened it up (carefully!) and found the wires going to the motor that dispenses the food.
I basically wanted the Raspberry Pi to control when the feeder motor turns on. So, I cut those wires (yikes!) and connected them to the Raspberry Pi’s GPIO pins using some jumper wires. I made sure to double-check everything to avoid short circuits – don’t want to fry anything!
The Software Side
This is where things got a little code-y. I’m not a pro programmer, but I can follow instructions. I installed a fresh version of Raspberry Pi OS on an SD card and booted up the Pi.
I wrote a simple Python script. The script does a few things:
- It takes pictures with the webcam at regular intervals.
- It checks if Mittens is near the food bowl (I used some basic image processing – looking for her color).
- If Mittens is there AND it’s feeding time (based on the feeder’s timer), it sends a signal to the GPIO pins to activate the feeder motor for a few seconds.
It took some trial and error to get the timing right. I had to adjust the script a few times to make sure it dispensed the right amount of food and didn’t trigger accidentally.
Putting It All Together
I placed the Raspberry Pi and the webcam near the feeder, making sure the camera had a good view of the bowl. I secured all the wires and made sure nothing was dangling (Mittens loves to play with wires!).

After a few days of testing and tweaking, it was working pretty well! I could check in on Mittens during the day and see if she was eating. The feeder dispensed food only when she was nearby, which helped control her portions. Success!
It’s not perfect, of course. Sometimes the image processing gets confused if the lighting is weird, but overall, it’s a fun project that actually helps me keep my furry friend healthy. And I learned a lot along the way!