Aquarium Fish Feeder

2,221

33

2

Introduction: Aquarium Fish Feeder

Hi there!

Although feeding your fish is one of the fun things of having an aquarium, you also leave for vacation. Unfortunately you can't always trust your family with feeding your fishes in time;) As I recently got my own 3D printer, I decided to make my own. Except for the time designing it (which you won't need :) ) it is also much cheaper (<€10) than buying an off the shelf aquarium feeder of €20-30 (Sorry for the euro's, I'm Dutch).

The basic concept is a sliding mechanism which collects food under the food container and slides to the position above the aquarium. I those this type of feeder above a wormwheel design as it ensures the food container is separated from the moist conditions of the aquarium. The feeder is designed for the SuperFish Wave 15 aquarium. There is will be a perfect fit between the glass and the LED light lid. It will however work with any 3mm aquarium glass. Do you wish to use this project with another glass thickness? Contact me and I can adjust the hanger.

A small con about the used components is that it does not contain a clock module. This means it will not remember the time after a shut-down. It also requires a hard coded time in code. I did found this very easy to use and thus never required a clock module, but I will explain this in a minute.

So let's take a look at what you need!

Supplies

  • Arduino Nano [<€5 for a clone]
  • Micro Servo 9G [<€2]
  • USB cable + power supply [<€5 or probably just laying around somewhere]
  • 3D printer (or acces to it)
    • PLA or PETG [<€5 worth of material needed]
  • Fish food (Granules no flakes!)

Step 1: 3D Printing

The parts all need to be 3D printed. I used my own Creality Ender 3 pro for printing the parts using the following settings as a guideline:

Material

I used PLA myself as I did not have PETG in house. PETG will be more durable as it is more resistant to water than PLA. However while using the feeder I did not yet run into any issues with PLA. Temperature is quite low and only a small part is exposed to moisture.

Layer height

Feel free to select any desired layer height, but a smaller layer height of <=0.2 mm is recommended for printing the food container. It contains a steep decline to guide the food down into the slider. Large layer height will result in larger steps at which the food can stick.

Support

I used supports for the electronic base as it has the part hanging in the air at which the feeder hangs on the aquarium glass. Also the foodcontainer was printed with support as it has a small edge which falls into the slider base.

Step 2: Assembly

  1. Start by connecting the servo to the correct arduino pins. This will not be possible to do when placed inside the enclosure. Make sure to test them as it saves some time de-assembling the whole thing if it does not work:)
  2. Insert the arduino into the electronic base and make sure the mini usb connection is inside the hole. Now the arduino can be fixated by using the small fix arduino part which locks it into place.
  3. Now place the servo between the two bars on the bottom and push it all the way to the front of the electronic base. (Note: I snapped off the connection part of the servo which is useless anyway in this case to make the fit. It might need a little sanding to make it smooth again.)
  4. Now the electronics are in place so we can start on the slider base. Start by inserting the screw a little bit into the slider base holes. This helps with feeling where the holes in the electronics base are. Now line them up and insert the screws all the way. This should result in picture 3.
  5. Next step is to add the slider itself and the servo extension. The white servo extension will fit nice and tight. The recommended servo is a 9g micro servo which has a reach of 180 degrees. This means you have to attach the white part in a way the servo can reach both holes. Do this by Turning the servo all the way to one side and than attach the slider at the point such that it can turn all the way to both holes.
  6. This results in picture 5, which means we can add the food container. You can follow the same procedure as in step 4. It should fit nice and tight.
  7. Congrats! The assembly is done. Easy wasn't it?

Now lets check out the code!

Step 3: Code

The board is arduino based, which I do assume you have some basic knowledge on of how to edit, compile and upload a sketch. If you don't: first of all don't worry! It is very easy to learn and you only need basic skills to edit this code for your needs.

The code is heavily commented to make using it as easy as possible. I will highlight some thing to make sure there is no doubt.

Servo position

Three lines define three servo positions. The dropOff angle should be the position above the aquarium hole. The foodcontainer position is below the foodcontainer and the idle position is between them. Start by testing some drop off positions and tune this to match the hole above the aquarium. The easiest way is just to make all three the same position for testing, this make sure it always goes to this position. You can use the difference between the drop off position and the other positions as indicated below for reference.

int servoAngle_dropOff = 87;

int servoAngle_FoodContainer = 141;

int servoAngle_idle = 115;

(Note: To quickly test the servo positions, first read the complete step and increase the number of portions and feeding times to see if the correct positions are chose.)

Food portions

The hole in the slider is quite small, which is perfectly fine for small aquariums but it might need more portions per feeding time for larger aquariums. Therefore the number of portions per feeding time can be changed. This means it will get n-number of food portions when a certain time is reached.

int nrFoodPortions = 2

Initial time

As mentioned before, the project does NOT contain a clock module. This means we are estimating the current time based on the internal clock of the board. This is not as accurate as a clock module, but more than accurate enough to feed your fish. This is safe for up to 55 days according to the overflow value of the millis() function. Note that it can probably run longer, as i read up that the subtraction of millis() is safe when the overflow happens. However, I have not tested this and thus can not guarantee this. On the other side, are you going on a 60 day trip? You probably want to have someone checking on your fish anyway.

Back on topic. The only thing you have to do is set the current initial time inside this line:

int initialTime[3] = {15, 00, 00};

This should be the time at which you plug in your arduino to the power. So everytime you plug it in should be around this time. Otherwise the arduino will just start counting from this time and it will result in incorrect feeding times. For example: plugging the board in at 12.00 instead of 15.00 will result in a feeding time of 13.00 instead of the possibly intended 16.00.

Feeding times

Next up are the feeding times. You can add as much feeding times as you want. They are structured inside an easy to change array of hours, minutes and even seconds. The following code can serve as an example of how to insert feeding times. Note that for initial testing this is nice to use as the initial time is 15.00 and it will feed every five minutes.

//                     h   m    s<br>int feeding_times[] = {15, 00, 00,
                       15, 05, 00,
                       15, 10, 00,
                       15, 15, 00,
                       15, 20, 00,
                       15, 25, 00,
                       15, 30, 00,
                       15, 35, 00,
                       15, 40, 00,
                       15, 45, 00,
                       15, 50, 00,
                       15, 55, 00,
                       16, 00, 00};

For every line, one should just place in the hours, minutes and seconds at which the feeder should feed your fish. It will provide the previously specified number of portions per time. Do not place the feeding times too close to each other as, while still busy with the current feeding time, it might skip the next one. Therefore I advice to increase the number of portions instead of having close feeding times. With too close I mean less than 20 seconds apart, but this is easily checked when playing with times and the number of portions.

The feeding times will be every day, as the feeder will reset the clock after 24 hours. Also note the use of a 24 clock format.

Done!

That's all you need to program! Easy wasn't it? Now upload your arduino code onto the board and test it out by playing with the values.

Step 4: Result

The video shows how the food slides into the aquarium. One portion is dropped into the aquarium. The second video shows a test of two portions being pushed out of the feeder. You can nicely see the slider move above the hole and dropping out food. If you liked this instructable please press like and also vote for it in the contests. If there is anything left unclear or want some help, don't hesitate to comment and I will try to answer it as soon as possible.

Future steps

I wish to improve this project with two parts:

  1. IoT: I ordered some small arduino IoT boards which could be perfect to experiment with on this project. One could than monitor the number of feedings already given or even remotely press a feed button to provide food. It would also make it easier to adjust the initial time and feeding times. I have not yet have any experience with IoT boards so this might take a while.
  2. Aquarium compatibility: I plan to make a version which does not hang on the aquarium but is possible to mount on top of a aquarium for those aquaria out there which support this kind of feeders. For one one can easily print out a small surface with a hole in it on which the current version can be placed. If a version is required with a different glass thickness on which the feeder can hang, feel free to ask! It is a simple adjustment which I can provide quickly.
Arduino Contest 2020

Participated in the
Arduino Contest 2020

Be the First to Share

    Recommendations

    • DIY Summer Camp Contest

      DIY Summer Camp Contest
    • Make it Fly Challenge

      Make it Fly Challenge
    • Summer Fun: Student Design Challenge

      Summer Fun: Student Design Challenge

    2 Comments

    0
    jessyratfink
    jessyratfink

    1 year ago

    Nicely designed :)

    0
    Rubanoz
    Rubanoz

    Reply 1 year ago

    Thanks!:)