element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Vertical Farming
  • Challenges & Projects
  • Design Challenges
  • Vertical Farming
  • More
  • Cancel
Vertical Farming
Blog Automated Green House Blog:3 - Fish Feeding of the Future
  • Blog
  • Forum
  • Documents
  • Polls
  • Files
  • Events
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: m.ratcliffe
  • Date Created: 13 Aug 2015 9:21 PM Date Created
  • Views 2493 views
  • Likes 3 likes
  • Comments 11 comments
  • adapted_greenhouse
  • raspberypi
  • arduino
Related
Recommended

Automated Green House Blog:3 - Fish Feeding of the Future

m.ratcliffe
m.ratcliffe
13 Aug 2015

With not having the Competition Kit arrive yet, this blog will be about some of the other projects I am working on relating to automation.

 

See the main Blog for updates:

 

Automated Green House Blog's Home Page

 

Some Basic Information:

 

>156 Billion KG of fish reared annual [thats more than beef!] [1]

>Optimum feeding regimes can increase productivity by 40%, food efficiency by 20% compared to conventional once per day feeding [2]

>There are many variables to consider when feeding fish [3]

 

Feeding Fish Is a very time consuming task, takes skilled operators to visit sites multiple times a day and is prone to human error. A computer could perform this task day in day out repeatable, efficiently and without human interaction, saving time food and increasing yields from a system drastically.

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

Note: On Video I say FeedForwards, I mean Open-Loop Control [It had been a Long day]

 

I have thought of two solutions to this problem, a open loop controller and a vision based feedback controller.

 

Open Loop:

[Wiring Diagrams and Code to Implement this on a arduino Unu will be included soon]


Human input to the controller

>Fish Breed

>Fish age

>Number of Fish

 

This Controller will then take measurements of the environmental variables [mainly temperature] and adjust:

>Feeding Spacing

>Feed type [what mechanical feeder to feed from]

 

 

Closed Loop

The benefit of implementing a controller this way is we no longer need to define the system in as much detail. it is fully aware of the eating habits of the fish.

[Implemented on RaspberyPI using opencv and usb webcam]

 

The Final unit will be able to:

>Estimate the size of the fish

>Feed the fish at the correct intervals and feed until the food demands of the fish decrease [it means their stomach is almost full]

>Feeding amount per serving

>Alert the farmer to any problems

     -Change in eating habbits

     -Bloated

     -disease

 

 

Work Done So far:

>Built temperature compensated open loop controller

>Built the basic vision part of the camera control [it can detect number of food pellets]

 

Here is a video of the camera gui and explication of how it works:

 

You don't have permission to edit metadata of this video.
Edit media
x
image
Upload Preview
image

 

 

 

 

Work To Do:

>Improve Blob Detection Techniques used

>See if we can get the camera to read the fish size when they come to feed + check for bloating /disease

>Code in the rate of food consumption [Blobs disappearing every seconds lets say]

>Put the control units in a better housing with a GUI

 

 

 

The Systems in the video prove the basic concept will work, they need a lot more work to get them to do the best job they can.

 

What I am Stuck on right now:

 

I have written another basic vision code that I want to implement onto a arduino based MCU. These units cannot do any heavy image processing [blob detection etc] the plan is to combine a camera with a arduino over serial, asses the incoming serial data on a pixel by pixel level. Something like this below:

 

[r=red competent of pixel, g=green component,b=blue component] where r,b,g will be at locations in the data packet I hope.

 

          If (r>2*g && r>2*b) {

               PixelCount = ++;

                                            };

 

What this does is assesses if a pixel is very red [the food pellets are red] and adds the total number of pixels in the picture up. Run the scrip at the beginning of the day to remove any red pixels from random red objects in the camera view that are not food. [lets call this count StaticSystemPixels].

 

        FoodPixels=(PixelCount-StaticSystmPixels)

 

And then add the correct amount of food to keep the FoodPixelCount at a predetermined  value, we can tell by the duty cycle of the mechanical feeder what the demand is and watch out for it decreasing as a sign that the fish have eaten the right amount of food.

 

I have written this sketch in Processing on a linux desktop and the theory works well, but I know nothing about the arduino and camera integration. I want to do this in real time without saving the image. So What I would like to do is asses the incoming serial data as it reaches the arduino

 

Is this possible? Am I right in thinking that the camera will transmit over serial whole pixel data sets , ie packet one contains information for pixel 1,2,3,4 or will it transmit in a way that each pixel will be spread across different packets? and can I do some quick assessment of this packet before the next one comes in?

 

Any help on this would be great!

 

 

 

I will be uploading the codes and tutorials about how to make everything to:

 

www.michaelratcliffe.com/projects    [Give me a few days to comment the codes and upload them]

 

I cant wait to get the competition kit,

Michael

 

References:

[1] FAO Fisheries and Aquaculture Department “THE STATE OF WORLD FISHERIES AND AQUACULTURE” 2012

[2]  Steven Craig “Understanding Fish Nutrition, Feeds, and Feeding”    2002

[3] S. J. Yeoh, F. S. Taip  “Development of Automatic Feeding Machine for Aquaculture Industry” 2010

  • Sign in to reply

Top Comments

  • m.ratcliffe
    m.ratcliffe over 10 years ago +1
    RWReynolds To reply to Rick [I didnt realise the video goes live before I publish the Blog] "Amazing Michael! This is a system you've used in production, correct? Did you build and write the software for…
  • m.ratcliffe
    m.ratcliffe over 10 years ago in reply to RWReynolds +1
    It works ok, but like most things it takes a couple of revisions to perfect it. The Temperature controller is Arduino Uno based because it is easy for anyone to understand and I want to see this information…
  • m.ratcliffe
    m.ratcliffe over 10 years ago in reply to RWReynolds +1
    Doc Brown as in back to the future, ive been called worse lol What is it that made the connection? Ray Mears is my usual nickname. I did a degree in mechanical engineering and then a research one in electronic…
  • m.ratcliffe
    m.ratcliffe over 10 years ago in reply to RWReynolds

    Doc Brown as in back to the future, ive been called worse lol What is it that made the connection?  Ray Mears is my usual nickname. I did a degree in mechanical engineering and then a research one in electronic engineering [mainly simulation of electrical motor drives] but most of the stuff I use day to day for these projects is self taught and based on gut feelings or simple post-it note type calculations.

     

    The "LAB" is a bed I made for the dog next to my desk, with her bedding removed. I'm hoping to set up a full lab in a shipping container on the yard in the near future, but I don't have a lot of equipment to work with electronics wise. I'm hopping element14Dave  considers my application for road testing a DMM and ads an oscilloscope to the road tests, then I will be set to do some more interesting stuff.

     

    As far as help I think I can do most of the stuff, I would appreciate you trying the build tutorials once they are up if you want to use something similar in your aquaponics and giving me feedback on what was easy to follow and what needs more explanation. I'm watching your blog on the rotating system, it looks interesting! Just a bit of advice, put the distribution pump on a relay so you can reduce the duty cycle at night or just turn it off to let the system get air if you ever need to, I cant see if you are relying on a flood and drain set-up of just water running down the system, but if it is a flood and drain it is easier to cut the water flow every so often than fine tune a mechanical siphon to stop siphoning.

     

    The Hackaday competition is great, build something cool and see what people think. I made it in the hope of getting some free parts to make more project happen, I doubt I will make it to winning the competition [Fish is a pretty boring subject for most] but you never know.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • RWReynolds
    RWReynolds over 10 years ago

    OK, just watched the second video. Verry impressive indeed. You've done a lot of really great work Michael.

     

    I've nicknamed you Doc Brown. lol...

     

    You are totally self-taught, correct? Me too. I've been playing with and working on electronics, computers and programming a little over 40 years. It is one of my hobbies and my sole, and soul, career. I got out of the hobby side for some years, life gets in the way, but have recently jumped back in. Mainly because I got a job in electronics R&D and embedded programming. After 30 years, I've come back home. image

     

    The work you've done is amazing. I really like the lab. Currently, I only have a small area to work in but I will remedy that soon.

     

    On your questions concerning USB camera to Arduino interface... It is USB so technically it is a serial interface. Check out the link below. It may make the work a little easier as there is a camera shield available.

    http://www.arducam.com/tutorial/

     

    I think you have most of this under control but if eve need any help with the work I am willing to do what I can. I fully intend to start exoerimenting with aquaponics once I'm on my feet again.

     

    Keep the videos and blogs coming. And I'm following the Hackaday site as well. Thinking about setting one up myself. image

     

    Cheers,

    Rick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • RWReynolds
    RWReynolds over 10 years ago in reply to m.ratcliffe

    Yes IDR = IDE...

     

    And yes, Eclipse works really well with the PI. You can't actually run Eclipse on the Pi, although I haven't tried with the Pi2. Still not too sure there's enough horsepower though. You run eclipse on a PC and cross compile for the Pi. And you can run code on the Pi and do step debugging in Eclipse. Takes a little setup but it's easy to find the info on the Internet. And it's well worth the effort as your code get's more complicated.

     

    Setting up remote debugging.

    https://www.youtube.com/watch?v=Al6OZ2kF_qA

     

    Although... Python is not a bad language to know either.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • m.ratcliffe
    m.ratcliffe over 10 years ago in reply to RWReynolds

    It works ok, but like most things it takes a couple of revisions to perfect it.  The Temperature controller is Arduino Uno based because it is easy for anyone to understand and I want to see this information getting used.

     

    IDR, is that an IDE? I have been writing the scrips in a text editor on the PI and adding comments to print to terminal so on compile time I see where it hangs. Does Eclipse work well on the PI? 

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • RWReynolds
    RWReynolds over 10 years ago in reply to m.ratcliffe

    Well it looks like it's working pretty well so far. Can't wait to see further progress on this.

     

    What did you use as the controller on the temp feedback system? Is that some flavor of Arduino?

     

    On the Pi... You can definitely use C there. If you use Eclipse as your IDR you can do cross platform development on a PC of laptop and live debug as well.

     

    Several of us have received the kits. The EZR32WG's are not included. But that was expected as they are region specific. So they should be along in a few days I suppose. We did get the EFM32ZG. It's pretty similar... No radio, less memory and a different ARM core. ARM Cotrex-M0+ I think. I do have my stepper running on it. You'll be happy to know that SimplicityStudio is C/C++ based. It's really a pretty nice dev environment. Very complete and Eclipse based.

     

    Cheers,

    Rick

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
<>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube