AUTOMATIC PET FEEDER WITH SOUND 'The Pawbar'
527 Views, 5 Favorites, 0 Comments
AUTOMATIC PET FEEDER WITH SOUND 'The Pawbar'
The Pawbar: a practical automatic food dispenser for your pets! From now on you can feed your pets with an app on your smartphone. A music sound will play when feeding your pet.
Easy to program to give individual portions at every meal. All you must do is refill the device weekly and power the device!
Pet feeders can be helpful for you and your dog or cat and if you're up for it, you can make one right at home.
We are Floris and Maxime, two students of the O.-L.-V. Pulhof Institute in Antwerp (Belgium), and this is our thesis project.
Click here to see a demo of our Pawbar.
Supplies
What you need to build your pet feeder:
- a wooden (wine) box
- a smaller wooden box
- a small wooden block (2.5cm x 9cm x 2cm)
- a wooden block (4cm x 5.5cm x 3cm)
- a pvc pipe 32mm width
- a pvc corner piece
- a pvc pipe clamp
- a pipe clamp
- an empty plastic (milk) bottle 1L
- tape
- glue
- servo motor Arduino
- 10 jumper Arduino wires
- Arduino uno breadboard
- Arduino Bluetooth module HC-05
- speaker
- metal wire
Choose Your Main Box
Pick a box that is around these dimensions:
Length: 11.5 cm
Width: 10 cm
Height: 36 cm
Preferably a wine box because it has the trapdoor already in place.
Choose Your Smaller Box
Now take a box that is wide enough for it to fit the Arduino, the circuit board and the speaker.
It doesn't have a lot of influence on the project so you can just recycle any (wooden) box.
Tip: we used an old cigar box
Assembling the Milk Bottle
Take an empty 1-liter (milk) bottle. This will work perfectly as a funnel.
Cut off the bottom around 2 cm.
Then cut 3 cm of the left corner (as shown in the photo).
This is where the servo will be mounted.
Prepare the Feeder System
For the feeder system you need the PVC corner piece and the straight PVC tube.
One side of the straight PVC tube (width 32 mm) must be cut in a 45° angle. (See picture).
Make sure the end of this cut PVC pipe is smooth. You can use sandpaper.
Then take the 2 pieces: the PVC tube and the PVC corner. Place the PVC corner on the PVC straight tube (on the non-cut end) and tape them together.
We recommend not to use glue. The use of glue for the feeder can be dangerous for your pets.
Support for the Pvc Feeder System
We will use a small wooden block to fix the PVC feeder in to the wooden (wine) box.
Make a wooden brick:
Lenght: 2.5 cm - width: 9 cm - depth: 2 cm
Drill a 2 cm wide hole in the middle of this brick.
Take the PVC pipe clamp and screw it with the included bold.
Place the Servo Motor in the Main Box
The servo motor will move the hatch up and down and for this it must be inside the main box.
Take the wooden (wine) box and saw a 23 mm by 12 mm square and make sure the servo fits in neatly. (I used a jigsaw)
Place the servo.
The cable needs to be outside the box and make sure that the servo arm is screwed down tightly.
Hatch System
Now take the hatch. (This is the front panel of the wine box).
The front panel needs to be cut in 2 pieces. 1 piece needs to have circular hole. (See first picture)
How to make the circular hole in the front panel: Take the PVC-pipe with the 45degree angle and place it 4 cm above the bottom of the front panel.
Now you can draw around it the PVC tube hole, now you have a perfect model for the circular hole.
Use a saw to cut the front panel and the circular hole.
Now you have two pieces of front panel witch will fit perfectly as hatch.
Take the biggest piece of the front panel (the top panel).
Place a metal rod and attach it 1cm from the side. (picture)
The end of the metal rod has a 90degree turn and connects to the servo.
Extra Wooden Support Block
Saw a wooden block 4cm high 5.5cm wide and 3cm deep.(I used some recycled wood so it can be 1piece)
Total Assembly Pet Feeder
Take the box and add the parts of step 5 (the small wooden block with pvc Clamp) add the block on the back wall of your big wooden (wine) box. Glue it 8 cm above the bottom.
Glue the wooden piece from step 8 (larger wooden block) on the bottom - in the middle - against the hatch. (Make sure it can close!!!)
Add the pvc pipe from part 4 and glue it to the piece of step 5 (the small wooden block with pvc Clamp). It should rest on the lager wooden block of step 8.
Now place the milk bottle from Part 3 on top of the PVC tube. Make sure that the opening in the milk bottle is where the servo is on the wall.
The pet feeder is now built.
Place the hatch in the box by adding the 2 pieces from step 7 (2 parts of the hatch) and connect the metal rod in the hole of the servo arm.
It should look like the pet feeder on the picture
If you used a different sized box, it may look a bit different.
Programming Arduino
Now you will start programming the Pet Feeder.
To design the app, we used MIT App Inventor, a program that is very beginner friendly.
Open the Arduino app on your laptop and copy the Arduino code. (Step 11)
Connect the USB
Arduino Code
#include <SoftwareSerial.h>
int state = 0;
#include<Servo.h>
Servo Myservo;
int pos=0;
#define NOTE_B0 31
#define NOTE_C1 33
#define NOTE_CS1 35
#define NOTE_D1 37
#define NOTE_DS1 39
#define NOTE_E1 41
#define NOTE_F1 44
#define NOTE_FS1 46
#define NOTE_G1 49
#define NOTE_GS1 52
#define NOTE_A1 55
#define NOTE_AS1 58
#define NOTE_B1 62
#define NOTE_C2 65
#define NOTE_CS2 69
#define NOTE_D2 73
#define NOTE_DS2 78
#define NOTE_E2 82
#define NOTE_F2 87
#define NOTE_FS2 93
#define NOTE_G2 98
#define NOTE_GS2 104
#define NOTE_A2 110
#define NOTE_AS2 117
#define NOTE_B2 123
#define NOTE_C3 131
#define NOTE_CS3 139
#define NOTE_D3 147
#define NOTE_DS3 156
#define NOTE_E3 165
#define NOTE_F3 175
#define NOTE_FS3 185
#define NOTE_G3 196
#define NOTE_GS3 208
#define NOTE_A3 220
#define NOTE_AS3 233
#define NOTE_B3 247
#define NOTE_C4 262
#define NOTE_CS4 277
#define NOTE_D4 294
#define NOTE_DS4 311
#define NOTE_E4 330
#define NOTE_F4 349
#define NOTE_FS4 370
#define NOTE_G4 392
#define NOTE_GS4 415
#define NOTE_A4 440
#define NOTE_AS4 466
#define NOTE_B4 494
#define NOTE_C5 523
#define NOTE_CS5 554
#define NOTE_D5 587
#define NOTE_DS5 622
#define NOTE_E5 659
#define NOTE_F5 698
#define NOTE_FS5 740
#define NOTE_G5 784
#define NOTE_GS5 831
#define NOTE_A5 880
#define NOTE_AS5 932
#define NOTE_B5 988
#define NOTE_C6 1047
#define NOTE_CS6 1109
#define NOTE_D6 1175
#define NOTE_DS6 1245
#define NOTE_E6 1319
#define NOTE_F6 1397
#define NOTE_FS6 1480
#define NOTE_G6 1568
#define NOTE_GS6 1661
#define NOTE_A6 1760
#define NOTE_AS6 1865
#define NOTE_B6 1976
#define NOTE_C7 2093
#define NOTE_CS7 2217
#define NOTE_D7 2349
#define NOTE_DS7 2489
#define NOTE_E7 2637
#define NOTE_F7 2794
#define NOTE_FS7 2960
#define NOTE_G7 3136
#define NOTE_GS7 3322
#define NOTE_A7 3520
#define NOTE_AS7 3729
#define NOTE_B7 3951
#define NOTE_C8 4186
#define NOTE_CS8 4435
#define NOTE_D8 4699
#define NOTE_DS8 4978
#define REST 0
int tempo = 140;
int buzzer = 11;
int melody[] = {
NOTE_C4,4, NOTE_C4,8,
NOTE_D4,-4, NOTE_C4,-4, NOTE_F4,-4,
NOTE_E4,-2, NOTE_C4,4, NOTE_C4,8,
NOTE_D4,-4, NOTE_C4,-4, NOTE_G4,-4,
NOTE_F4,-2, NOTE_C4,4, NOTE_C4,8,
NOTE_C5,-4, NOTE_A4,-4, NOTE_F4,-4,
NOTE_E4,-4, NOTE_D4,-4, NOTE_AS4,4, NOTE_AS4,8,
NOTE_A4,-4, NOTE_F4,-4, NOTE_G4,-4,
NOTE_F4,-2,
};
int notes = sizeof(melody) / sizeof(melody[0]) / 2;
int wholenote = (60000 * 4) / tempo;
int divider = 0, noteDuration = 0;
//TX 0, RX 1;
void setup() {
Serial.begin(9600); // Default communication rate of the Bluetooth module
Myservo.attach(5);
}
void loop() {
if(Serial.available() > 0){ // Checks whether data is comming from the serial port
//Serial.println("serial is available");
state = Serial.read(); // Reads the data from the serial port
}
if (state == '0') {
Myservo.write(180);// servo turns 180°
state = 0;
}
else if (state == '1') {
Myservo.write(0);
delay(3500);
Myservo.write(180);// servo turns 180°
for (int thisNote = 0; thisNote < notes * 2; thisNote = thisNote + 2) {
divider = melody[thisNote + 1];
if (divider > 0) {
noteDuration = (wholenote) / divider;
} else if (divider < 0) {
noteDuration = (wholenote) / abs(divider);
noteDuration *= 1.5; // increases the duration in half for dotted notes
}
tone(buzzer, melody[thisNote], noteDuration * 0.9);
delay(noteDuration);
// stop the waveform generation before the next note.
noTone(buzzer);
}
state = 0;
}
}
Built the Arduino Circuit
Take the servo motor Arduino, the 10 jumper Arduino wires, Arduino uno breadboard,
Arduino Bluetooth module HC-05 and speaker
Recreate the Arduino circuit as shown on the picture
Place the Arduino in the small box from step 2 ( cigar box)
Now connect the Arduino to the servo.
Upload the Code to the Arduino
Make sure the Arduino is connected to your laptop (USB connection).
Select the right port!
Upload the code to the Arduino circuit board.
Application on Smartphone
Download the MIT app inventor on your phone.
On your laptop: Go to: https://gallery.appinventor.mit.edu/?galleryid=9a150ba8-22df-41eb-a574-5b1c30ba8c7a
Click on "Load App into MIT App inventor" .
This is the link for the application.
Scan the QR code for it to work.
Start Using the Pawbar
Great job! Your Pawbar is ready to use.
You can use a power bank to suplly the Pawbar with power.
Fill the Pawbar with your pets treats
Open the app on your smarthphone – click bluethooth
And ' HC_05' and press ‘ON’
The Pawbar will open, and the threats start dropping!
We hope you and your pet will enjoy the Pawbar!