element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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 2200 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…
Parents
  • m.ratcliffe
    m.ratcliffe over 10 years ago

    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 the vision-based feedback system? That's just as cool as it gets.

     

    And I was all proud because I got my stepper motor running on the EFM32ZG. lol... "

     

    I have used the temperature compensation unit for 6 months and it seems to work great. The Vision one I built in a rush a few days ago and haven't had time to fine tune/test it to the point im happy to recommend it yet.

     

    The Temperature Compensated one is all my software [I will be releasing it under GNU/similar in a couple of days], I'm working on extending the information it has to work with because right now I have only coded it to look after my Tilapia  Fry set-up and pull some data [time, dusk dawn  etc] from the main controller in the greenhouse. I will include a howto and wiring diagram to pull it from a GPS module so it should work anywhere in the world.

     

    I had three days to learn Python [I'm much happier in C] and how to use a RaspberryPi to make the vision based controller. It is my "code" if we are calling it a code, its ugly no doubt it can be refined once I have a better handle on Python. The second video on this blog will explain a little bit about how it works and the concept code will be going live in the next few days along with a tutorial on building the phisical part of the feeder.

     

    I appreciate the positive feedback Rick, I havent slept much over the past few days making this thing work. [Three products made and shipped to america three days after the parts arrived]. Have you got your geko in the starter kit? I still havent got my kit and no doubt will have some trouble myself being so used to using arduino related comands.

     

    Mike

    • 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
Comment
  • 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
Children
  • 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

    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
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 © 2025 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