A Better Fish Feeder

A Better Fish Feeder

I was unhappy with the automatic fish feeders that I found on the market. They are all examples of bad automation.  They work just well enough to instill a false sense of security, and they they break in often catastrophic ways.  At best, they just stop working and the fish get hungry. At worst they dump a full hopper of food into the fish tank and the fish may die.  In addition, they do not adapt to conditions so they may either continuously over or under feed the fish.

So I built a better one.  It is a smart fish feeder.  The feeder does not dispense a fixed amount of food on a given interval.  Instead it observes the feeding. Using a camera and vision processing algorithms, it watches for signs that the fish are satiated.  Those signs can be decreased feeding activity, uneaten pellets, or the fish simply not showing up to eat.  The feeder stops feeding when it detects these situations (or after a preset maximum amount of food has been dispensed).

Additional sensors are also used to monitor the environment.  A temperature sensor monitors the temperature of the water.  Feeding can be adjusted based on water temperature and may be cutoff beyond certain limits.  The water level is also monitored.  This is used in determining the size of the camera field of view, but can also be used to alert the user if the water level in the tank is either too high or too low.  Lighting is also built in that can be used to illuminate the feeding area at night or in dark tanks.

The feeder can also alert the user of situations like out of food or a feeder jam.

Plus, you can watch and feed your fish from the comfort of your house or when travelling  :).  One nice feature I have found is that you can feed the fish manually whenever you like without having to worry about the automatic fish feeder dumping more food into the tank later.  The feeder observes that the fish aren’t hungry (or even that there is food already in the water) and aborts or shortens the feeding cycle.

As you can see from the attached feeding log, the system will often stop feeding because either the fish are not active enough or there are pellets left in the water.

2017-07-21 13:00:12,444 – Feeding Started: Type is AUTOMATIC
2017-07-21 13:00:12,448 – Dispensing – Release#: 1, Auger revolutions: 0.25
2017-07-21 13:03:01,447 – End of observation pellet count: 2
2017-07-21 13:03:01,460 – End of observation max fish activity: 122.610276094
2017-07-21 13:03:01,463 – Dispensing – Release#: 2, Auger revolutions: 0.25
2017-07-21 13:05:50,022 – Dispensing Terminated due to uneaten pellets – Pellets found: 9
2017-07-21 13:05:50,025 – Max fish activity: 92.6485367965
2017-07-21 13:05:50,027 – Feeding Terminated
2017-07-21 13:05:50,031 – Dispensing Ended 
2017-07-21 18:00:11,794 – Feeding Started: Type is AUTOMATIC
2017-07-21 18:00:11,807 – Dispensing – Release#: 1, Auger revolutions: 0.25
2017-07-21 18:03:00,467 – Dispensing Terminated due to uneaten pellets – Pellets found: 5
2017-07-21 18:03:00,470 – Max fish activity: 45.2194574315
2017-07-21 18:03:00,474 – Feeding Terminated
2017-07-21 18:03:00,477 – Dispensing Ended
2017-07-21 20:10:33,092 – Feeding Started: Type is MANUAL
2017-07-21 20:10:33,105 – Dispensing – Release#: 1, Auger revolutions: 0.25
2017-07-21 20:13:22,181 – Dispensing Terminated due to uneaten pellets – Pellets found: 8
2017-07-21 20:13:22,185 – Max fish activity: 69.4196517557
2017-07-21 20:13:22,206 – Feeding Terminated
2017-07-21 20:13:22,209 – Dispensing Ended

Status of the Project

I have been using the prototype systems to feed my fish for about a month now.  I am impressed by how well it works.  Although I have applied for a patent, my intention is to make it available for personal, DIY, non profit, and educational use.  The plastic parts are 3D printed and the electronics are all readily available. The processor is a raspberry Pi Zero W which costs about $10.  The most expensive part is the camera which costs about $30 due to the need for a fisheye lens (so you can observe a larger area).  My intention is to release the 3D models, the code, and the PCB (Printed Circuit Board) design as open source. The 3D printed parts require a large format printer and probably close to 2 days printing time.  Installing the software is also challenging as it requires many heavy duty vision processing and machine learning libraries such as opencv and dlib.   I suspect it is a more challenging build than most people will want to undertake.  So if anybody has an interest in turning this into a product, please contact me.  With a little bit of design work, the system could be miniaturized to work for home aquariums.

Here is a list of things that are working and not yet working:

  • Feeding based on fish activity or uneaten food  – Done
  • Video streaming of the camera output – Done
  • Distinguish between fish food and stuff that looks like food on the bottom of the tank – Done
  • Maintain statistics on fish behavior and food consumption – Done
  • Maintain statistics on water temperatures and water levels – Done
  • Alerts if the fish are unexpectedly not eating – Done
  • Alerts for conditions like water temp out of range, water level too high/low, feeder empty – Done
  • Expand the training to cover more types of food – In progress
  • Test the system with different types of tanks and different lighting conditions – To be done
  • Slick web interface – To be done
  • Automatically learn the food pellet shapes (works with round pellets currently) – To be done
  • Improve speed of image processing – To be done eventually, there is only so much you can eek out of a raspberry pi zero.
  • Capture portal for configuring the WiF network – To be done
  • Watch for anomalous conditions like dead fish – To be done
  • Supervisory heartbeat so you will be alerted if the feeder stops working – To be done

The feeder communicates using WiF.  If you have a WiF network in place, it can connect to that.  If not, it can act as the WiFi host.  Without internet access, the system will work fine, but of course you will not be able to access it remotely to control it or view fish activity.

7 Replies to “A Better Fish Feeder”

  1. Hi. I have just been tasked with setting up community gardens in the Western Cape of South Africa, using aquaponics for food security, skills development and community development and I think this tech will work well in our projects. Feel free to contact me.

    1. Thanks,

      I’ve decided to change the PCB a bit to make the unit easier to assemble, so the work is paused a bit while I wait for the new PCBs to come back. Where are you located?

      Regards, Stephen

  2. I have been exploring this area for almost 2 weeks at this point and this is the first write-up that absolutely is practical. Why is it really hard to find reasonable data regarding security and safety these days? Absolutely appreciate the energy you spent getting your concepts in to words so rookies such as me can certainly take action. Could there be a part two to your article? Thank you again!

  3. I would like to thnkx for the efforts you have put in writing this website. I’m hoping the same high-grade blog post from you in the upcoming also. In fact your creative writing abilities has encouraged me to get my own web site now. Actually the blogging is spreading its wings rapidly. Your write up is a great example of it.

Leave a Reply

Your email address will not be published. Required fields are marked *