Cat feeder

Tanner Paulson

Overview

This project is a timer based cat feeder. The feeder has a hopper that feeds into a PVC 2" tube that contains an auger. This auger is connected to a step motor that will turn the auger pushing food out of an opening on the bottom of the PVC pipe. A user is able to set the current time, feed time 1 and feed time 2 with the three buttons located on the board. The clock is in AM/PM time. Once the current time reaches a feed time the auger will turn feeding the cat.

Side view Front view Video_1 Video_2

Hardware

I used the MKL05Z32VFK4-ND microcontroller for this project. I used the DS3231MZ, a highly accurate real-time clock (RTC) that uses the I2C protocol, to keep time. The LCD display is a 16x2 character display to the current time and to allow the user to set the feed times. The auger is made from a ¾" steel pipe with large washers wrapped around the pipe and welded in place. The hopper is single piece of stainless steel sheet metal cut and bent to form the shape of the hopper. The piece of metal the then welded together at a single seam. The legs of the feeder is aluminum angled pieces about 15" long. The entire unit is powered by a 6v wall jack to get enough power for the stepper motor to run.

Schematic Assembly

Software

Most of the code is written C but the I2C is written in assembly. On startup the program first has the motor do 10 full rotations. The main code is contained a while loop that loops forever. Within the infinite loop there is a switch statement to handle the 4 modes of the device. The first mode there is a couple of if statements to check the current time against the internally stored feed times. The current time is only retrieved if there is an interrupt that happens every minute. If it is feed time it will turn the motor 10 times to push the food out. The other three cases are for setting up the current time and the two feed times.

Displaying time Time setup
Feed time 1 Feed time 2

Final Thoughts

Downloads


Last modified:Mon, Jan 23, 2023.

00163