(1x) Automatic Pet Feeder Amazon
(2x) 10K Ohm 1/4-Watt Carbon Film Resistor (1 package) Radioshack #271-1335
(1x) Arduino Ethernet Shield w/o PoE Module Radioshack #276-130
(4x) CdS Photoresistors 5 pack (1 package) Radioshack #276-1657
(1x) Grid-Style PC Board Radioshack #276-147
(2x) White Super-bright LED Indicator Radioshack #55050633
(1x) Male Header Pins 40 Position Jameco #160882
(4x) "D" Alkaline Batteries (1 package) Radioshack #23-865
(2x) 4.7K Ohm 1/4-Watt Carbon Film Resistor (1 package)
(2x) current limiting resistors, see the sample calculation below
from the specs of the LEDs I used:
"Continuous forward current: 30mA"
"Forward voltage: 3.6V"
using the following relationship:
V(volts) = I(amps) * R(ohms)
R = V / I
we can calculate the resistance as follows:
voltage across resistor = 5V - 3.6V = 14V
1.4V / 0.03A = 47ohms
I used 100 ohm 1/4W 5% Carbon Film Resistors Radioshack #271-1311 so that the LEDs wouldn't be operating at their maximum ratings. Check the datasheet of the LEDs you use to calculate these values.
Solder Radioshack #64-013
22 Gauge Wire Radioshack #278-1224
Step 1: Open pet feeder
Step 2: Unscrew pcb
Step 3: Schematic
When the photoresistors are not exposed to light their resistance will be very high and the processor in the feeder will think that the buttons aren't being pressed. By telling the arduino to light up some LEDs near the photoresistors, the resistance will decrease low enough for the feeder's processor to think that the buttons are being depressed.
I've also attached two pushbuttons in the circuit so that I could manually turn the LEDs on for troubleshooting purposes. These buttons are not essential to the project (but useful).
I also be diverted some power from the feeder's four D batteries to power the arduino.
Step 4: Drill holes in pcb
Step 5: Solder wires to pcb
Step 7: Solder header pins on protoboard
Step 8: Solder white LEDs and current limiting resistors
Step 9: Solder resistors and photoresistors to protoboard
Repeat these steps for the second LED.
Step 10: Attach to feeder PCB
Step 11: Attach control buttons
Step 12: Wire power
Step 13: Attach arduino and arduino ethernet shield
Step 14: Drill holes in enclosure
Step 15: Connect USB and ethernet
Step 16: Reassemble enclosure
Step 17: Batteries
Step 18: Firmware
I am using Arduino 1.0 for this project, I recommend downloading this version (or later) for this project. If you do not want to use the new version, make sure you have the following Arduino libraries (they are bundled with v1.0):
- Ethernet (for the Ethernet Shield)
- EthernetDHCP (for self-configuring the IP address is you use DHCP at home)
Turn on the power switch on the bottom of the feeder, the LCD should flash 12:00 and the motors should run through the food delivery sequence once. Refer to the manual if you would like to set the clock or set additional food timers, this won't be necessary for the project. Press the rec button and record a personalized message for your pet, this will play at the end of each food delivery sequence.
Here is the Firmware:
You will need to make a two edits before this firmware is ready to use.
1. Insert your IP address in the following line at the top of the firmware:
IPAddress ip(190,298,34,132); //<< ENTER YOUR IP ADDRESS HERE!!!
if you don't know your IP address open File>>Examples>>Ethernet>>DhcpAddressPrinter, upload this code to your arduino with the ethernet shield plugged in (and ethernet cable connected), and open the serial monitor Tools>>SerialMonitor
2. Change the username of your twitter account in the following line (from the function connectToServer():
client.println("GET /1/statuses/user_timeline.xml?screen_name=nomnomnomfeeder&count=1 HTTP/1.1");
Upload firmware on your arduino board, plug in the ethernet modem/router. Tweet "feed me!" from your twitter account and you should see your pet feeder dispense food in a minute or less. The feeder will not receive any further tweets for four hours (to prevent over feeding), during this time, tweet another message to replace "feed me!" as your most recent message.
Step 19: Try it out
Set up a Twitter account and tweet the password you set in the firmware. Within a minute you should see the pet feeder dispense food.