Training Fish To Feed Themselves

We’ve featured quite a few aquarium and fish feeder hacks on our blog. [RoboPandaPDX] thought of taking it up a notch and make an interactive fish feeder. He built a Fish feeder that train’s them to feed themselves.

A copper bar hangs from the middle of a metal cylinder – much like a bell. The end of the bar has a fish lure. When a fish pushes the lure, the copper bar touches the metal cylinder and  closes the circuit. This signal goes to an Arduino. To catch the attention of the fishes and to “teach” them, an RGB LED is used. The fish need to figure out that the feeder will dispense food only when the LED is ON and the Lure is pushed. If the fish figure that out, and push the lure when the LED is on, a servo is activated which pushes the feeder to deliver 1 unit of fish food. While at it, he added a couple of bells and whistles. A buzzer to indicate when the Lure switch is closed and a 2 line LCD shows how many times the switch has been activated and how long the program has been running.

A Sparkfun  open logger stores the hit count and the minutes and seconds of the hit for data analysis later on. The good news is that it seems to be working. The current code activates the feeder for 30 to 60 minutes every day, which is indicated by the LED. At the end of 9 days,  [RoboPandaPDX] found that the goldfish would hit the Lure when the LED turned on, and then turn around to face where the feeder would dispense food in to the tank. His next plan is to put up some obstacles along the path to see if the fish learn some new tricks. His schematic looks a little iffy (the Lure switch is connected to the RST pin of the Arduino), and it seems he cannot remember why he ever did that. He’s happy that it works though, but we’re sure that’s not the right way to wire it up.

[RoboPandaPDX] is looking for suggestions on improving his interactive feeder, so if you have any, do add them in the comments below.

If you need some more fish feeder ideas, check out this and this that we blogged about earlier.

41 thoughts on “Training Fish To Feed Themselves

  1. Goldfish are easy to train, even Adam Savage can do it.
    Training the fish to feed themselves is great, and I will definitely take a longer look at this project tomorrow when my brain is back in service.
    My only concern would be having the fish overfeed, which results in obesity (fat and happy), and fouled water chemistry (sick and unhappy).

    1. Pretty sure Adam Savage actually failed to train his fish, or at least didn’t do it very well. Jamie Hyneman managed it, but he’d done it before

      Also he mentioned that the feeder only activates at set time intervals, indicated by an LED which the fish can see, so overfeeding shouldn’t be an issue

    1. That. As a (former) fishkeeper the word “copper” immediately rings an alarm bell. And fish aren’t even the most sensitive, but even trace amounts of copper will kill off your crustacean inhabitants. Bottom line is you don’t want anything copper anywhere near your fish tank.

          1. Yup. I know that’s meant in jest, but in fact there is a product called Algaefix, which few folks realize is just detergent. Does a good job as an algaecide. And despite the tiny dose, sometimes a good job of killing fish, if they’re not fortunate enough to survive the shock due to instantaneous reduction of gill gas exchange when it’s dosed. (Splitting the dose into fractions added over many hours, contrary to the directions on the label, is somewhat safer. And gives you a chance to spot signs of excessive respiratory distress before it results in fatalities, in which case you stop the treatment and add oxygen to reverse the problem.)

    2. Thinking about it a bit more, I also don’t entirely trust having a direct conductive path straight from the water to an MCU pin. An aquarium is very nearly a Leyden jar, which may give the MCU a jolt when initially connected. Aquarium heaters and other submersible electrical devices can develop insulation faults (rare but not unheard of). Fluorescent lights with electronic ballasts can impart charge to the tank capacitively (especially if metal reflectors/cases aren’t properly grounded). All another reason to replace the submersed part of the sensor with something non-conductive and non-toxic, which should be easy since the majority of the existing wire is only required to transmit motion, not electricity.

      1. You should always have a protection circuit at the signal entry point. e.g. a high value series resistance (to limit current) with *switching* diodes or *low capacitance* TVS diodes to VCC/Gnd (to clip the signal) at the uP side of the resistor. (Don’t use ordinary rectifier or zener diodes as their capacitance are very high and are really slow to turn on.)

      1. Yes, it is. It has an implied subject and verb of “there is” preceding the written words. English language makes use of implied subjects and verbs, though rarely would you use both together. Learn it. Or not.

  2. [RoboPandaPDX] needs to source his parts more wisely: Arduino Uno for 25$? An LCD for 30$? Then again a 9V2A Wallwart for 3$? I would suggest paying more for the Wallwart and get one that does not cost 3$ and will probably burn down your house (boil the fish) and not pay 50$ for a uC and a 2 line Display. I could guess that those are Sparkfun prices right?

  3. If my cichlids could feed themselves, I’d go through a lot of fishfood.

    They’re definitely trainable, though. I have the filter configured to turn off 1 minute before feeding time (so the food doesn’t get sucked down the skimmer), and after a couple of days of that, they go into a frenzy up near the water’s surface every time the filter stops.

  4. This reminds me of [BullwinkleII]’s on demand fish feeder from the backyardaquaponics forums. He used a PICAXE to control it.

    If I remember correctly, he designed his to bolus (my term) so there was a daily hard limit that the feeder would stop at to prevent greedy fish from killing themselves with food.
    Forum project thread:

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.