Introduction: Automatic Fish Feeder in 20 Minutes

About: Love simple robotics, electronics, sensors, arduino projects and generally building, modifying and opening up stuff
This is an instructable about how to make an automatic fish feeder( my version feeds the fish every six seconds to show its working but you can modify the code to make it feed after a few hours or a day).  Hope you like it!!
links to the videos:


Step 1:

Step 1:
Materials Needed:
1. Fish food case
2. Servo motors (x 2 but you can also use one by eliminating the bottom servo)
3. Strips of tape
4. An old plastic Box
5. Some card shaped like a pan open at one end.
6. An Ardiuno and connection wire
7. Breadboard ( optional but I recommend it)
8. Scissors( or knife to cut plastic box)
9. Wires

Step 2:

Step 2:
i) Tape a servo horn to the food case such that when the box is open the servo horn is quarter of a circle away from it. Attach the servo motor to the horn.
ii) Cut a hole in the box such that the servo motor can fit through it. Fit the motor inside and tape it in place such that the horn is out side the box( see picture ).


Step 3:

Step 3:
i) Stick the card pan to the servo which is in the box. Cut a slit in the box to let the wire come out and close it.
ii) Stick the second Servo( the one attached to the fish food) and stick it on top of the box so that the mouth of the food case is over the start of the closed end of the card pan. I used dough to hold it in place due to the shape of my box.

Step 4:

Step 4:
i) connect both servo cables to the breadboard. Make negative and positive connections (see picture). Now connect these to the Arduino. The Yellow servo wires go to pins 9( for the pan) and 10(for the food case).
ii)Load the following code to your arduino:
/* My fish feeder program
sidgupta instructables.com*/
#include <Servo.h>

Servo arm1; 
Servo bot;
int bott=1;
int posarms = 1; 

void setup()
{ arm1.attach(9);
  bot.attach(10);
bot.write(0);
arm1.write(90);}

void loop()
{
arm1.write(180);
delay(2000);
arm1.write(90);
delay(2000);
bot.write(75);
delay(100);
bot.write(0);
delay(100);
bot.write(50);
delay(100);
bot.write(0);
delay(100);



delay(6000); //can be increased for requirement by user

}

Step 5:

Step 5:
YOU ARE DONE!!
Place the contraption on the edge of your fish bowl and watch as it regularly feeds your fish!
Hope you liked it!
Please comment and make suggestions!
Thanks.

Instructables Design Competition

Participated in the
Instructables Design Competition