Introduction: Feed Mi - Arduino Dog Food Dispenser

Picture of Feed Mi - Arduino Dog Food Dispenser

For a recent University project we were given the challenge to make a fully functioning automatic dog food dispenser using an Arduino. Here's the finished piece and all the appropriate files and instructions so you can make our own!

The Feeder had to:

- Hold 3kg of Iams mini chunks

- Dispense food from a table into a bowl on the floor.

- Be adaptable to dispense different quantities of food at different times of the day.

Step 1: You Will Need:

Materials:

3x 400x600 sheets of 5mm Clear/transparent Acrylic

2 x 400x600 sheets of 6mm MDF

1x 400x600 sheet of 3mm Acrylic

30cm 0f 6mm acrylic rod

700mm Acrylic Tube

4x M5x8 Nuts and bolts

3x M3x8 Nuts and Bolts

1 small hinge and appropriate fixings.

Wood glue

Acrylic glue

1 bag Iams mini chunks

1 x dog bowl

1x dog


For the circuit you will need:

1x Potentiometer

1x Servo Motor

1x Bread Board

1x Arduino Uno

1x USB to Arduino Cable

1x 9v Battery

8x Wires

Machinery:
A laser cutter

Pillar drill

Adjustable belt sander

Software

Arduino
Corel Draw

Step 2: Make the Mechanism

Picture of Make the Mechanism

1) Using the Files named 'Mechanism 3mm and Mechanism 5mm' ' Use the laser cutter to cut the profiles.

2) Once the pieces are Cut layer them using the Numbers engraved in the top left hand corners of each piece. Start with number 1 at the bottom. There should be a Total of 9 layers, (the Slider counts as 1 layer, 3 pieces glued together) you can work out their correct rotation as all the drill holes should align.

3) Once layered in the correct order use the appropriate bolts and nuts to fasten them together, the central slider should now be held in place.

4) Glue / bolt the arm extension on top of the existing Servo arm like seen in the photos.

Tip - You may need to shorten some of the bolts, best way to do this is to saw off the excess then file the top flat and file half a thread down, this way the bolt should still go on without trouble.

Step 3: Making the Storage Box

Picture of Making the Storage Box

1) To make the storage box that attaches on top of the mechanism Use the File names 'Box 6mm MDF' and 'Box front 5mm Acrylic'

2) Make Sure you select the Combined setting on the laser cutter so that the logo can be engraved onto the cut pieces.

3) Once all the pieces are cut you will need create a 45 degree chamfer on both sides of the pieces labelled H. These pieces will act as the hopper inside the Storage box, funnelling the food into the mechanism. Ensure you Chamfer both ends of each piece on the SAME SIDE. Please refer to the finished pictures for help.

4) Hinge the 2 lid halves using the hinge and appropriate bolts.

5) You can either draw on the S M L like we have or if you want a neater finish you could get them engraved.

5) Glue the Box together using Wood glue and acrylic glue, clamp and leave overnight to dry!

.

Step 4: Making the Chute

Picture of Making the Chute

1) Measure the distance from the floor to the bottom of your mechanism, minus about 150mm for the dog bowl and then cut your acrylic tube to this length.

2) Drill a 6mm hole in the side of the mechanism in line with the hole where the food dispenses.

3)Stick a piece of 6mm acrylic dowel into the hole you jst drilled, ensuring it sticks out the side by 5mm.

4) On the protruding 5mm stick the small bracket pieces with 2 6mm holes in them (shown in the pictures above)

5) Once dried you'll be able to slot a longer piece of dowel through the tube and brackets that you've just stuck, this should secure the chute.

Step 5: Wire Her Up!

Picture of Wire Her Up!

Once you have assembled the mechanism it's time to start the electronics.

I have included a diagram of the circuit.

To connect the circuit, start by connecting one of the outer pins of the Potentiometer to one of the ground ports of the Arduino.
Next wire the middle pin of the Potentiometer to the A0 port of the Arduino. Then connect the final pin to a row on the bread board. Next connect the middle port of the Servo motor with the same row on the bread board, on that same row wire a port with the 5v port on the Arduino to give the Servo and Potentiometer power. Connect the yellow port of the Servo with the digital 9 port of the Arduino and connect the black port with the remaining ground slot. To complete the circuit, connect the Arduino via a USB cable and upload the code to the arduino programme. (the code can be found on the next step)

Tip: Get the circuit working with the mechanism before glueing everything together. You'll probably have to disconnect the wiring for assembly then reconnect.

Step 6: Intergrate the Electronics.

Picture of Intergrate the Electronics.

So now you have a box, a mechanism and a load of wires, here's how to combine them into one!

Use double sided tape to stick the Arduino inside of the box, it fits well underneath the larger hopper. Likewise stick the bread board behind the slot where the servo motor goes.

Assemble the servo motor on top of the mechanism ( ensuring the arm is sat neatly inside the slot of the slider) It is also important you Zero the servo before attaching the arm so that it rotates in the correct orientation.

Once the servo, Arduino, bread board and battery packs are In place, re-wire them up.

Tip: If wires are too long or in the way use a bit of tape to stick them neatly out the way.

Step 7: The Code

#include

Include the Time Library #include Include the Time Alarms Library #include Include the Variable Speed Servo Libary

VarSpeedServo myservo; Create and name the servo const int servoPin = 9; The digital pin used for the servo int potpin = 0; Analog pin used to connect the potentiometer int val; Variable to read the value from the analog pin

void setup() {Serial.begin(9600); Sets the data rate setTime(8,29,50,1,1,11); Manually set the time Alarm.alarmRepeat(8,30,0, MorningAlarm); Set alarm for everyday at 8:30 called Morning Alarm

myservo.attach(servoPin); Attaches the servo on pin 9 to the servo object myservo.write(0,255,true); } Set the initial position of the servo, as fast as possible, wait until done

void loop() { int sensorValue = analogRead(A0); Read the value from analog pin 0 Serial.println(sensorValue); Print value on serial monitor void MorningAlarm(){ When “morningAlarm” time reached do this… if (sensorValue < 341){ If potentiometer value is less than 341 do this… for (int i=1; i<=100; i=i+1 ) Repeat the following code 100 times. Serial.println(“Activate Servo”); Print “Activate Servo” on serial monitor. myservo.write(110,240,true); Move servo arm to 110degrees, with a speed of 240 and wait until complete delay(500); myservo.write(0,240,true); Move servo arm back to 0degrees, with a speed of 240 and wait until complete delay(500);}}

{ if (sensorValue > 341 && sensorValue < 682) If potentiometer value is between 341 and 682 do this… { for (int i=1; i<=80; i=i+1 ) Repeat the following code 80 times. Serial.println(“Activate Servo”); Print “Activate Servo” on serial monitor. myservo.write(110,240,true); Move servo arm to 110degrees, with a speed of 240 and wait until complete delay(500); myservo.write(0,240,true); Move servo arm back to 0degrees, with a speed of 240 and wait until complete delay(500);}}

{ if (sensorValue > 682 && sensorValue < 1200) If potentiometer value is between 682 and 1200 do this… { for (int i=1; i<=60; i=i+1 ) Repeat the following code 60 times. Serial.println(“Activate Servo”); Print “Activate Servo” on serial monitor. myservo.write(110,240,true); Move servo arm to 110degrees, with a speed of 240 and wait until complete delay(500); myservo.write(0,240,true); Move servo arm back to 0degrees, with a speed of 240 and wait until complete delay(500);}}

Comments

Zilvermeeuw (author)2017-03-04

Hi! This design looks nice! I am planning to make this one. I have a concern about the mechanism. Is the food never stuck in the mechanism? Or is the motor strong enough to crush the food? What type of motor did you use?

ken00 (author)2016-04-16

Hello, I am new here and i would like to build one for my pet, i would like to know how many times a day it feeds the dog, and if i use your code and i am on the other part of the world and there is time difference would that be problem?

wold630 (author)2016-04-15

Very cool! I need to figure out a mini one for my fish!

About This Instructable

4,558views

68favorites

License:

More by VerityM1:Feed Mi - Arduino Dog food dispenser
Add instructable to: