Introduction: Automatic Dog Feeder

This is a step by step tutorial on how to make an automatic dog feeder using Arduino.
This is perfect if you are out of the house for much of the day. Rather than your dog having to wait all day for food, or have you duck home to feed it, this device will allow your dog to feed itself for you when it is time to be fed, giving you more time, and peace of mind. This project also works with cats, or even as a lolly dispenser! You can use it for many different purposes, use your imagination!

Step 1: Gather Materials

You will need:
A servo
An LCD screen 2x16
An ultrasonic sensor
5 male to male wires
15 male to female wires
Bread board
Arduino uno
Computer with Arduino software and 3-D printing software
Access to a working 3D printer

Step 2: The Code

Copy the code below into Arduino, and upload it to your Arduino Uno, using the provided cable which should connect your Arduino to a USB port in your computer. You may get an upload error. If that occurs, ensure that your computer knows which port it is uploading to (you can change it by going to ‘Tools’ and then clicking on ‘Port’ and selecting your Arduino), and make sure that your computer has all the necessary files downloaded for the code to run. If not, these can be found online and are free to download.

Step 3: Assembly

Print off all the attached .stl files separately.

Once they have finished printing, take all the 3-D components and lay them on a table. Remove all excess printer material.
Place the feeder component (the curved rectangle with a square hole in the middle) inside the main body such that the overhang part of it (see attached image) lies on the side with the hole for dispensing food, and the completely flat bit is facing upwards. Slot the corresponding square rod (servo rod) through the square hole.
Place the Arduino inside the lower compartment of the main body.
Put the servo in the small square component so that the wires sit in the cut out part in the wall (see photo).
Attach the potentiometer to the small rectangle sticking out of the main body so that the three prongs face towards the main body.
Place the ultrasonic sensor in the holder just above where the food will come out, such that the two circle parts are facing away from the main body.
Place the LCD screen inside the larger rectangle raised from the main body, with the screen facing outward.
You can close the top compartment of the feeder with the lid if you like.

Step 4: Wiring It Up

The wires will need to be attached in accordance with the circuit diagram attached, and each component has a specific hole through which its wires can attach to the Arduino.

The LCD screen however, was not available for the circuit software, but can be attached to the Arduino by attaching the following wires to the following pins on the Arduino, as per the colours in the image above:

Green - pin 4

Yellow - pin 5

Orange - pin 6

Red (upper) - pin 7

Brown (upper) - pin 8

Black - pin 9

Brown (lower) - positive (5V)

Red (lower) - negative (ground/GND)

The servo wires can go through the hole in the side of the tube next to it, exiting through the bottom of it and going into the Arduino through the hole in the side of the main body.
The ultrasonic sensor wires will also go down this tube, entering instead from the hole in the top of the tube, but exiting in the same place.
The LCD screens wires can be attached through the hole behind where the LCD goes.
There is also a hole in the wall of the main body where the potentiometer sits.
Once you have attached all the wires connecting the various components to the Arduino, you can put in the side lid (shaped like an L) in the big hole in the side of the main body, so that the L shape would look like an L if viewed from the Back of the feeder (opposite side of where the food comes out).
You can also attach the LCD cover (a rectangular shape with a smaller rectangular hole in it) onto the LCD cover, with the face with the slightly raised outside edge facing the LCD screen.

Step 5: Dinner Is Served!

Place the dog bowl underneath where the food will come out.
Then, simply set in how long until you want your dog to be fed, fill the top compartment with any assortment of small dry dog food, and pop the lid on.
You are good to go, and so is your dog!