How My Automatic Pet Feeder Works
April 9th 2025

Basic Concept

The feeder is a essentially a large funnel that directs food into an Arduino controlled auger. Once a day the Arduino drives the auger via a stepper motor, which dispenses food out of the front of the feeder. I built the box out of medium density fiberboard (MDF), which was cut into panels according to a 3D model I created in SketchUp.

Assembly

To affix the panels together I used copious amounts of hot glue instead of screws, as it was easier to work with in tight corners and gave a cleaner external appearance. All of the electronics are hidden on the underside of the feeder, affixed using Velcro tape for easy removal when making changes to the system. When finishing the MDF I used a shellac based sealant for two reasons. First, MDF is very porous, so sealing it before painting the outside led to a much smoother finish. Second, and much more important, it is food safe! This ensures no toxins will be absorbed into the pets food. And to top it all off, literally, I used a plexiglass panel. This gave the feeder a really cool look and allows me to see at a glance when it's time for a refill.

Electronics

The electronics consist of an Arduino Uno, a Nema 17 stepper motor, an A4988 stepper motor driver. All of which were sourced from an Arduino CNC kit I purchased on Amazon. To power the feeder I needed two power supplies, a 9V 1A supply for the Arduino, and a 12V 2A supply for the stepper motor. They both plug into a standard 120V power strip, which exits through the back of the feeder.

Jam Prevention

During initial testing of the feeder, I ran into issues with the auger jamming. To alleviate this I did three things. First, I coded the stepper motor to rotate backwards slightly after each full rotation. The backwards rotation loosens the food directly on top of the auger, preventing it from becoming too tightly packed. Second, I found it was critical that the diameter of the auger was less than the diameter of the pipe it sits in. If the diameters are too close, it creates an opportunity for the food to become pinched between the auger and the wall. Finally, I did not permanently attach the downward spout to the pipe, it is only held on using friction. This allows for easy removal and access to the auger in the event of a jam.

Arduino Code

At a high level, the code does the following. The Arduino turns the stepper motor on, and instructs it to turn a number of rotations to dispense food. In my testing I found that three full rotations of the stepper motor is roughly equivalent to one cup of food dispensed. My dog eats 2 cups of food per day, so the Arduino rotates the stepper 6 times per feeding. Afterwards the Arduino turns off the stepper motor, and "goes to sleep" until the next feeding. This process is what I call the feeding cycle.

Upon powering on, the feeding cycle starts immediately. In it's current state, the Arduino has no concept of the time of day, it only knows relative time. This means that if I want it to feed every day at 7am, I need to initially plug in the feeder at 7am. From there it will delay 24 hours between every feeding. One downside of this is that if power is lost, and then restored at say 12:23pm, the feeder will feed at 12:23pm every day from then on. If I wanted it to feed every day at 7am regardless of when the feeder is first powered on, I would need to add a real time clock (RTC) module. I may add one in the future, but for now I'm ok with operating on relative time.

Check out the full code on github.

See it in action.

Parts List

Tools Used

  • Hot glue gun
  • Jigsaw
  • Drill
  • Hole saw drill bit
  • Clamps
Arduino