An automatic pet feeder includes a food hopper and a feeding tray the hopper has a bottom larger than a top and includes a cylindrical rotating shaft located in the center, and a tapered outer wall. A grid is fixed between an outer side surface of the rotating shaft and the food leaking outer wall, and the grid is radial with the axis of the rotating shaft as the center of a circle, to partition a space between the outer side surface of the rotating shaft and the food leaking outer wall into feeding spaces with the same size.