Arduino Fish Feeder

by Constructed in Circuits > Arduino

94962 Views, 104 Favorites, 0 Comments

Arduino Fish Feeder

541905f4f92ea10aef00003f.jpeg
P1140310.JPG

Do you have a fish at home? Are you like me, and you occasionally forget to feed your water loving pet? If so, this project is perfect for you. Its Simple, Cheap, and fun to make!

This project is great for students who leave ealy and may not have time to feed fish in the morning

Please vote for this project in the DIY University contest and the Age of aquariums contest

This is an really cool arduino project, that uses just two electronic parts. The arduino sketch is set up to feed the fish every 12 hours, but you can change it to whatever number you like. After building, all you need to do, is to clip your device onto your aquarium and forget about it! Thats all you do!

Lets start building!

Note: I started a YouTube channel to document my projects better, subscribe for more projects!

Difficulty: e a s y ..

Cost (Not counting Arduino): e a s y ..

You Will Need...

P1140286.JPG

For this project you will need

SUPPLIES

  1. Arduino
  2. Servo (any kind)
  3. Binder Clips
  4. An empty shampoo bottle
  5. Fish Food
  6. Jumper Wires
  7. Empty food takeout container (Clean or unused)

TOOLS

  1. Drill
  2. Hot Glue Gun
  3. Computer (to code)

Shampoo Bottle

P1140290.JPG

Using a empty shampoo bottle and your drill, drill a small hole on both sides of the shampoo bottle.

This is where the food will fall out, so you should test if food falls out by filling it up, and rotating it while holding it horizontally

DONT DRILL TOO BIG OF A HOLE!

Your fish will end up fat!

Drill a hole small enough so only 1-5 pellets fall out, depending on the size or number of fish you have

Wiring and Programing!

sweep_bb.png
P1140300.JPG
P1140302.JPG
P1140301.JPG

Wire the ardunio according to the above picture.

Using jumper wires, follow this pattern

Connect Yellow or data to PIN 9

Connect Black to GND
Connect Red to +5V


Next use the code I have provided to upload to your arduino

Note: I'm not the best Programmer........ I'm still learning, If you see anything I can improve Please Tell Me!

// CONSTRUCTED'S Fish Feeder
// https://www.instructables.com/member/Constructed/
// Donate for more projects! 


#include  
 
Servo myservo;  // create servo object to control a servo 
                // a maximum of eight servo objects can be created 
 
int pos = 0;    // variable to store the servo position 

long FISHFEEDER = 43200000; // 12 hours between feeding
long endtime; 
long now;

void setup() 
{ 
 
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object 
  
  myservo.write(0);
  delay(15);
  
}
 
void loop() 
{ 
  now = millis();
  endtime = now + FISHFEEDER;
  
  while(now < endtime) {
   myservo.write(0);
   delay(20000);
   now = millis();   
  }
  

  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees 
  {                                
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);                       // waits 15ms for the servo to reach the position 
  } 
}

Prepare Case

P1140304.JPG
P1140305.JPG

First Cut a square just big enough to squish your servo through, It should be very tight!

next get your hot glue gun and glue both the binder clips to the back of your case.

Try to line them up as best as you can, They will clip to the back of your aquarium

Next take some hot glue and glue a servo horn to the bottom of your shampoo bottle. Put the servo horn back onto the servo and go to the next step

Your Done!

P1140306.JPG
P1140311.JPG
P1140309.JPG

Simply fit all the electronics into the case, and wedge the servo in last. Now clip your automatic fish feeder to any aquarium and your done!.

Have fun and now you don't need to worry about feeding your fish!

Please vote and favorite this intructable, I really appreciate it.

Thank you