Raspberry Pi Pet Feeding Tracker

I’ve been looking for an excuse to make something useful out of my Raspberry Pi. For those unfamiliar, the Raspberry Pi is an inexpensive, small, programmable computer which can interface between just about any “kind” of hardware you can imagine. You can use it to automate your home, create your own robots and much, much more. As a software developer, tinkering with real-world hardware that can be controlled by my own software is a very compelling prospect.

My Raspberry Pi (a computer)

I had high ambitions initially of creating my own robots,  magic mirrors, and smart locks. Reality set in that this tech is new to me and I need a low bar for the first experiment. After weeks of tinkering with the basics of electronics, I opted to focus on building something for our two dogs whom I likely won’t disappoint.

Schenley and Luna’s dog food resides in this dresser in our living room. They are fed 3 meals per day on a schedule. My wife and I sometimes lose track of when the last feeding occurred. This leads to the dogs occasionally skipping a meal or getting fed too often.

I wrote a simple software program for the Raspberry Pi that is aware of their ideal feeding schedule — 6am, 12pm and 6pm. This program will signal a small red LED, mounted just below the cabinet drawer, when a feeding is due. A completed feeding is detected by a magnetic sensor, hidden under the dresser drawer, that tracks when the cabinet drawer is opened then closed.

Magnet attached to bottom of drawer
Hall Effect Sensor mounted to surface under drawer. Magnet on drawer will slide over this sensor.

The basic flow is if the LED is on, we fill the bowls with food. The light will then go out until it is time to feed them again. This removes the guess-work out of when they had their last meal or if it is too early for the next feeding.

Small red light below drawer indicates a feeding is due
Light extinguished when drawer is opened to feed

I have a few ideas for expanding this dog feeding theme. A text messaging service running on the Raspberry Pi could alert us when a feeding is overdue. On the hardware end, I can include a water sensor in their water bowl to monitor when their water is low and send similar alerts.

This Raspberry Pi project was easy enough that I could hack something together using just some basic online tutorials. I recommend exploring this if you are new to hardware or software projects and want to learn more.

Raspberry Pi 3 B+ Kit Purchased

My code on Github (C++)

One thought on “Raspberry Pi Pet Feeding Tracker”

Comments are closed.