Thursday, December 25, 2014

3D Printed Auto-Fish Feeder

December 26, 2014 You have one week to find a way to feed your fish before you leave for a few days starting on New Year's. What do you do? 
(A) Find someone to come into your house and do it for you each day while you are gone;
(B) Buy an expensive automatic fish feeder that may or may not meet your needs and may or may not be shipped to you in time. Or;
(C) Make your own.
The entire concept of our aquaponics system is automation so automatically feeding the fish was always part of the overall project. Time, however, required it to be implemented much faster, in fact, within a single week.

There are a variety of ways to automatically feed your fish. We decided to use an auger driven by a servo, set at timed intervals during the day and set to spin for a variable amount of time (which controls the amount of food released).

It is small, at about 140mm tall, but could hold enough food if full to feed the aquaponics system for a month or more. 

It was designed in SketchUp 8, exported to a MakerBot Replicator 2 using an .stl exporter.importer plug-in, then printed out at Bangkok's Fortune IT Mall makerspace, Gravitech's Home of Maker. This is the first non-novelty item we've tried to design and print out in 3D. The electronics consist of an Arduino Uno hooked up to a 9g micro servo modified following the instructions here.

Servos generally only rotate 180 degrees. You must find the tab(s) inside your servo that limit its range of motion and cut them off as well as immobilize the potentiometer at 90 degrees that would generally tell the servo what position it is at. Superglued at 90 and using Arduino code for continuous rotation servos (which are very hard, but not impossible to find) a position of "0" moves the servo counter-clockwise while a position of "180" moves it clock-wise.

The code for the Arduino is as follows:

//Automatic Fish Feeder Arduino Sketch 1pm - 9pm feeding time

#include <Servo.h>

Servo myservo;

void setup() {

void loop() {
myservo.write(180);   //clockwise rotation for 1pm feeding
delay(10000);          //rotation duration in ms
myservo.detach();     //detach servo to prevent "creeping" effect
delay(28800000);      //8 hours pause between 1pm and 9pm
myservo.attach(9);    //reattach servo to pin 9
myservo.write(180);   //clockwise rotation for 9pm feeding
delay(5000);          //rotation duration in ms
myservo.detach();     //detach servo to prevent "creeping" effect
delay(57600000);      //16 hours pause until 1pm next day
myservo.attach(9);    //reattach servo to pin 9 before looping
As you can see, there are two feeding events; one at 1pm, another at 9pm (you must plug it in at 1pm to start the whole process). While the servo is waiting I have it electronically "detached" from pin 9 instead of setting the servo at 90 degrees for zero movement. This is because the servo would remain continuously powered and jittering in between feeding times because even though it is told there is no movement, because it is a modified servo there is an amount of "creep" between totally stopped and slightly moving. With it detached from pin 9, it sits quietly. I am by far no expert in Arduino. This code is simply the quickest and easiest code I could devise to get my fish fed automatically over the next couple of days.

It is a Prototype of a Prototype

This project is a prototype of a prototype! Another, open source design for production, sale, and for others to make themselves is on the horizon. This is the first real functioning project we've used 3D printing for (and Arduino for that matter). Before this we just had a few keychains. It was quite a leap. But the purpose of a prototype is for development and it has taught us a lot in this short time.

First, build dimensions for 3D printing are generally best kept at 2mm or thicker. In some places I was using 1mm or less. This is way too flimsy and your plastic tabs will break off, the walls will be impractically fragile, and overall you will end up using a lot of superglue to keep it held together. We also learned the power of rafts and supports meaning that future designs will probably take advantage of these features and not hold back in fear of MakerBot being unable to cross an overhang in the design.

We also found that the auger is too big in diameter, and the helical screw blade is probably too thick and each twist spaced too closely together. The servo didn't have enough power to turn it because food became easily jammed. By carving the auger down this was fixed. Future versions will probably require a bigger auger with a smaller shaft diameter to blade ratio and a smaller overall diameter in relation to the shaft.

If you really want the files for this project and all the headaches that came with it, contact us and we will send them to you. Or else, wait for our v.2 which will be a little bigger, much stronger, and assembled without using any glue.

  Follow Helios Labs on Twitter @HeliosLabs or find us on Facebook here