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.
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:
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
Top Comments