Updated November 2026

An automatic pet feeder Arduino build lets you dispense meals on a set schedule using a small microcontroller, a servo or stepper motor, and a real-time clock. In this guide you will learn which parts you need, how to wire them, how to write the timing logic, and how to measure portions accurately. The project is practical for a single cat or dog at home, but it also teaches basic electronics you can reuse elsewhere.

Before you start, be clear about what a homemade feeder can and cannot do. It is a timed dispenser, not a food safety device, and it needs regular checks. If your pet has a medical condition, is on a prescribed diet, or eats very little, talk with your veterinarian before automating any feeding schedule.

Shopping for one? See our guide: 4 Best Automatic Pet Feeder PetSafe Models Compared (2026).

What You Need Before Building an Arduino Pet Feeder

Most builds use the same core components. Gather these first so you are not stopping halfway through the wiring.

  • Microcontroller: an Arduino Uno or Nano works well for a simple timed feeder.
  • Real-time clock (RTC) module: a DS3231 keeps accurate time even when the board is unplugged.
  • Motor: a continuous rotation servo or a small stepper motor (28BYJ-48 with a ULN2003 driver is common) to turn an auger or rotating disc.
  • Power supply: a 5V supply for the Arduino and a separate 5–6V source for the motor. Sharing one underpowered supply causes resets.
  • Food hopper and dispensing mechanism: a plastic container with a rotating auger or a disc with a single cutout.
  • Jumper wires, breadboard, and an enclosure that keeps dry food away from electronics.
  • Optional: a push button for manual feeds and a small LCD or LEDs for status.

Step-by-Step: Building the Core Circuit

Step 1: Wire the Real-Time Clock

Connect the DS3231 to the Arduino over I2C. On an Uno, SDA goes to pin A4 and SCL goes to pin A5. Power the module from 5V and ground it to GND. Set the clock once using a time-setting sketch, then leave it running.

Step 2: Connect the Motor Driver

If you use a servo, connect its signal wire to a PWM-capable pin such as D9, and power it from the external supply with a shared ground. If you use a 28BYJ-48 stepper, connect the four driver inputs to pins D8 through D11 and power the driver from the external 5V rail.

Step 3: Add an Optional Manual Button

Wire a momentary push button between a digital pin (for example D2) and GND, and enable the internal pull-up resistor in code. This lets you trigger a test portion without changing the schedule.

Step 4: Mount and Enclose Everything

Keep the electronics above or beside the hopper, never directly under the food outlet. Use a sealed box with a cable gland for the power cord. Dust and kibble fines are the most common cause of jammed augers.

Writing the Feeding Logic

The control logic is simple: read the current time from the RTC, compare it to a list of feeding times, and run the motor for a fixed duration when a match occurs. The key detail is preventing repeat triggers within the same minute.

Use a Feeding Schedule Array

Store feeding times as hours and minutes in arrays. For two meals at 7:00 and 18:00, that is two entries. Check the seconds field too, and only fire once per matching minute by saving the last triggered time.

Control Portions by Motor Run Time

Portion size depends on how long the auger turns and how much food falls per rotation. Weigh your kibble and measure the output of a 2-second test run into a bowl. Calculate grams per second, then set the run time for each meal. For example, if a 2-second run dispenses 10 grams, a 30-gram meal needs about 6 seconds. Re-measure every time you change food, because bulk density differs between brands.

Sample Logic Outline

  1. Read the current hour, minute and second from the RTC.
  2. Check whether the time matches an entry in the feeding schedule.
  3. Confirm the same minute has not already triggered a feed.
  4. Start the motor, run for the calibrated duration, then stop.
  5. Record the trigger time and print a status line to the serial monitor for debugging.

Calibration and Testing

Test the feeder before connecting it to your pet’s real meals. Run it manually at least ten times and compare the weights.

Test Step What to Check Target Result
Manual test runs (10x) Grams dispensed per run Variation within about 10%
Clock accuracy RTC time vs. a phone or watch Within 1 minute per week
Power loss test Schedule after unplugging Schedule holds; clock time preserved
Jam test with kibble Motor stalls or stops cleanly No overheating; motor stops on stall
Pet bowl check Food landing area Food lands in bowl, not on floor

Common Mistakes to Avoid

  • Powering the motor from the Arduino 5V pin. Motors draw current spikes that reset the board. Use a separate supply with a common ground.
  • Not moving the clock battery. A dead CR2032 means the RTC loses time after power loss.
  • Letting moisture in. Humid air clumps kibble and can corrode contacts. Store desiccant packs in the enclosure.
  • Skipping recalibration. A change from a dense kibble to a lighter one shifts every portion.
  • Trusting the feeder blindly. Check the bowl daily to confirm food is actually being dispensed.
  • Overfilling the hopper. Large loads strain the auger and make portions inconsistent.

Tips for a Reliable Build

  • Log every feeding in the serial output for the first two weeks.
  • Use a food-grade container for the hopper, and clean it weekly.
  • Add a bowl sensor if you want alerts for an empty dish, though a simple weight check works too.
  • Keep a backup manual scoop nearby so your pet is never left without food during a failure.
  • Label your wiring with tape. Future troubleshooting is much faster.

If you would rather skip the wiring and compare finished products, reading a feature breakdown first can help. For example, Wopet Automatic Pet Feeder: 4 Best Picks Compared in 2026 shows what commercial units handle that a DIY build may not, such as door sealing and app scheduling. Once you have a feeder running, the setup logic in Wopet Automatic Pet Feeder Setup: 7 Best Picks Compared (2026) is useful for comparing how commercial timers organize schedules. Anyone troubleshooting a timing problem may also find Wopet Automatic Pet Feeder Troubleshooting: Fix 6 Common Problems helpful, since many issues overlap with DIY builds, including power resets and jams.

These items match the parts list above and are easy to find for a home build.

  • Arduino Uno R3: a well-documented board with plenty of tutorials, which helps when debugging the timing code. View on Amazon
  • DS3231 real-time clock module: keeps accurate time through power loss, which keeps your schedule intact. View on Amazon
  • 28BYJ-48 stepper motor with ULN2003 driver: a low-cost, geared motor well suited to turning a dispensing auger slowly. View on Amazon
  • Sealed ABS project enclosure: protects the electronics from kibble dust and humidity. View on Amazon

FAQ

Do I need programming experience to build an automatic pet feeder with Arduino?

Basic experience helps, but you can follow example sketches for the RTC and motor and adjust the feeding times. Most of the work is wiring and calibration rather than complex code.

Which motor works best for dispensing kibble?

A geared stepper motor like the 28BYJ-48 gives steady, slow rotation that suits an auger. Continuous rotation servos also work for simple disc dispensers. Avoid high-speed motors, which throw food and cause uneven portions.

How do I keep portion sizes consistent?

Calibrate by weighing the output of a timed test run, then set the run time based on grams per second. Recalibrate whenever you change food brand or kibble size.

What happens if the power goes out?

A DS3231 with a backup battery keeps time, so the schedule resumes correctly. However, the feeder itself will not dispense without power, so keep a manual backup supply available.

Is a homemade feeder safe for my pet?

It can be, if the enclosure keeps electronics away from food, the motor cannot pinch paws or tails, and you check the bowl daily. Because food safety depends on hygiene and accurate portions, consult your veterinarian about feeding amounts and any health concerns.

Can I control the feeder from my phone?

A basic Arduino build does not include wireless control. You can add a Bluetooth or Wi-Fi module such as an ESP8266 for remote scheduling, though this adds complexity and needs careful security setup.

How often should I clean the feeder?

Empty and wipe the hopper and auger at least once a week, and more often in humid conditions. Old kibble dust attracts pests and causes jams.

Why does my feeder sometimes dispense nothing?

The most common causes are a stalled auger, a clogged outlet, or a motor driver that is underpowered. Check the wiring, confirm the motor supply voltage, and clear any blockage before retesting.

Conclusion

A well-built automatic pet feeder Arduino project gives you a dependable timed schedule with simple, repairable parts. Success depends on stable power, careful calibration by weight, and a sealed, clean hopper. Test thoroughly, check the bowl daily, and talk with your veterinarian about the right portions for your pet.

Ethan Brooks

About Ethan Brooks

Ethan Brooks is part of our editorial team and reviews and edits our everyday pet gear guides, checking product details against manufacturer specifications and owner feedback.