Introduction: 3D Printed Automatic Small Fish Feeder (Single Servo and Arduino)

About: The RobotGeek team is a 6-man operation that wants to make it even easier to use Arduino to make electronics and robots. Check out our instructables and robotgeek.com for all of our awesome kits.

This is a Single Servo Rotary Fish Feeder for small fish pellets! Using a single RobotGeek 180 Degree Servo and an Arduino, you can feed your fish for up to 10 days while you're out on vacation. This project is dead simple and works better than quite a lot of the commercial fish feeders, so let's feed that fish!

Step 1: Project Parts List

You will need access to a 3D printer to complete this project. Download the print files HERE, and print them out before we get started.

Electronics and Hardware you will need:

Step 2: Assembly

Center your servo.

Push the Servo through the top of the servo mount. It's a tight fit as is, but you can use 4 x M2 bolts that came with the servo to fasten it to the mount.

Attach the Feeder Wheel to the Servo Horn using 4 x M2 bolts.

Attach the Servo Horn to the Servo Spline using either an M3x6 Bolt, or the bolt that came with the Servo.

Seat the Servo Assembly into the Base, pushing the wheel all the way down so that it sits flush all the way around inside.

The Servo Mount should grab the Base tightly, but just in case, you can use some M3x6 Bolts to hold it in place.

The 6 holes around the outer ring of the feeder can be used to mount it to the workbench using standoffs and bolts.

Step 3: Wiring, Tuning, and Programming

Grab the RobotGeek Libraries and Tools here. Unzip into your Arduino folder.

Hook up your arduino as shown in the first diagram, USB to your computer, Power Supply to the wall, Rotation Knob on Analog 0, Servo on Digital 3, and the jumpers on the sensor shield to VIN.

Load up your Arduino IDE and open the test sketch under Sketches → RobotGeekSketches → RG101 → 05-servo → F-analogInServoOutSerial

Open your serial monitor, and you should start seeing values show up. Turn the rotation knob. The values should change and your servo should move. Move your servo to each of the 10 positions on the wheel and write down the uS (microseconds) value of each position.

Now open the FishFeeder sketch under Sketches → RobotGeekSketches → Demos → FishFeeder and put in the values you wrote down in lines 42-69, replacing the numbers in each parenthesis servo1.writeMicroseconds(your number here); putting each position value in ascending order.

You can load the sketch onto your board, remove the USB and Rotation Knobs, fill the slots with a days worth of fish food each, and set it up at your fish tank! Your fish will eat like a king while you're away!

Step 4: Some Notes

If you lose power to the system while you are away, the servo position will reset, leaving your fish without the amount of days worth of food that the system has already cycled through. You can avoid this problem by putting the system on a battery that can last the number of days you will be gone, or using an RTC instead of the clock crystal. Use at your fish's risk.

The clock crystal on the Arduino is not perfectly accurate, and the system will not release food at exact times. After 9 days, the timing could be off as much as a second or two. If you absolutely feel the need to have feeding times be accurate to the second, use an RTC.

You can do multiple feedings during the day by running math on the delay. Say you wanted 2 feedings per day, you could set the delay for each of the feedings to delay(DAY/2); This obviously will cut the amount of days your fish will be fed in half, use at your own discretion.