I am making a greenhouse and chicken coop monitor/controller. I will be monitoring water temp, water levels, PH, and other miscellaneous things. But on the chicken coop side of the equation I am having a hard time deciding what to get to monitor the level of chicken feed in the feeder. At first I thought I would use a load cell and just keep a monitor of the weight of the container. But after thinking about it I am wondering if one of those ultrasonic range sensors would be better (more versatile) to use. What are your thoughts?
Edit:
Also there will be 7 temp sensors, 4 flow rate sensors, 3 liquid level tape sensors, a PH meter, 2 light sensors, a couple of solenoid valves, and some servos. There is going to be a relay board and a servo controller to and a power supply to apply all needed voltages. Will all of the sensors listed (there may be more added that I missed here) would it be a good idea to go ahead and get a multiplexing shield like the MUXii?
Edit 2:
OK, this is for an aquaponic greenhouse and a chicken coop
Here is what everything needs to do.
- I want to know the temperature inside and outside the greenhouse.
- I want to know the temperature of the water in 3 grow beds, a sump tank, and a fish tank.
- I want to know the water level in the sump tank, fish tank, and chicken drinking water barrel.
- I want to know if the chickens need food in the feeder (exact level not important, more of an "is it empty?" type of thing.)
- I want to know what the PH of the water is in the fish tank (I would like to know to values of other things in the water also like dissolved oxygen, nitrates, nitrites, and ammonia but I have not been able to find affordable sensors for that)
- I want to have steppers on the roof vents to open automatically if the temp in the greenhouse is too high.
- I need control of some circulating fans (just on or off, would use a relay for that)
- I want to know how much light is in the green house versus outside the greenhouse (how much light is making it in)
- I want to know the flow rate of the water in three different water pipes (I found some 1/2 inch flow rate sensors that I think will work nicely for this)
- I want all the information displayed on the cover of the enclosure of the boards (either with LCDs or 7 segment LEDs) the information could be displayed all at once with many displays or there could be a button to push and it would let you cycle through all the information with one display. (I like the many 7 segments idea myself just because I think it would look better)
I feel like there is a lot I need to do but not so much that the arduino cannot handle it. I have been playing around with I2C communication on a LCD and can make it display information so if i understand that right then I could hook up many I2C 7 segments to the same pins and just have different addresses for each unit.
My main question in this post is to find out the best way to tell if the chicken feed is empty or not but please feel free to shout out any advice you have.
An arduino mega should have enough pins for your project. Please consider buying it directly from arduino's official store. It's pretty good quality compared with other places.
Regarding chicken feed, can you tell me how much height varies between a full and an empty feeder? Sonic rangers can do accurately about 1 cm or around 1/4 inch. If you could provide a couple of pictures, one for a full feeder and one for an empty one needing refill, that would be great. What I am thinking about is more static. Have a few light sensors sticking up the bottom of the feeder. If enough of them show enough light received, then the entire feeder is pretty much empty.
For each sensor, please provide link to the sensor. I am most concerned with the PH sensor. If it is a bare electrode (probe), you need additional circuitry to amplify the signal.
Sorry I should have been more specific. I already have an arduino uno rev3 purchased from adafruit. Other than the temp sensors none of the sensors have been purchased. I can tell you that the tube with chicken feed will be a +- 3 feet tall piece of 4 inch PVC with full being 3 feet of feed and "refill needed" indicator being at around 6 inches or less. I worry about using lights in the bottom of the feeder due to the possibility of dust from the feed blocking them, having said that I am open to all suggestions. The temp sensors I purchased are the DS18b20 water proof sensors. I am actually trying to come up with my shopping list so I don't buy a bunch of stuff I don't need. I was able to get an i2c lcd to work and display analog input data on it. So if there are i2c sensors I can use to help with the number of available I/O that would be ok.
distance is the key. if you look at a car backup sensor, it is waterproof and industructable.
there are old versions that require a lot of work on your part, and newer versions that are more plug and play.
dust on your sensor could be a maintenance issue.
Dust on a sensor mounted at the top wouldn't be bad to clean up. But dust on something mounted in the bottom would be a nightmare to clean. When I get back to a computer I'll type up exactly what I need everything to do
Main post edited to show everything I can think of
xXHillbillyXx:
Dust on a sensor mounted at the top wouldn't be bad to clean up. But dust on something mounted in the bottom would be a nightmare to clean. When I get back to a computer I'll type up exactly what I need everything to do
exactly. and if you do a simple wipe when you add feed, there will be no problems.
xXHillbillyXx:
Edit:
4 flow rate sensors,
Edit 2:
- I want to know the flow rate of the water in three different water pipes (I found some 1/2 inch flow rate sensors that I think will work nicely for this)
xXHillbillyXx:
Sorry I should have been more specific. I already have an arduino uno rev3 purchased from adafruit.
I am actually trying to come up with my shopping list so I don't buy a bunch of stuff I don't need.
I suspect you already have - the Uno.
Most of these monitoring systems are pretty much the same. Yours might be a bit bigger than most but that is not obviously a problem - except for the flow monitoring. The flow sensors you allude to are probably hall-effect devices, and the typical usage for these is by using the interrupt facility. In short, I believe a Uno is only good for two flow sensors, while you appear to need more and you should do some research on how you intend to go about that - and the cost. Or you can simply ditch the Uno and get a Mega, which is probably what you should have bought in the first place. Not only does it have sufficient pins, it also has sufficient memory and, in this arena, you are likely to run out of the latter before you run out of the former.
You have itemised all the many things you want to monitor and move, which is e good start, but you have given no thought at all to recording and communication. You probably will in a few weeks' time, and that is when your memory problems start. The pin problem may become manifest about this time next year, when you change your mind about the display.
Sonic ranger doesnt work well against soft target so you need to do some tests to confirm its effectness.
Nick_Pyner:
I suspect you already have - the Uno.
Or you can simply ditch the Uno and get a Mega, which is probably what you should have bought in the first place. Not only does it have sufficient pins, it also has sufficient memory and, in this arena, you are likely to run out of the latter before you run out of the former.
You have itemised all the many things you want to monitor and move, which is e good start, but you have given no thought at all to recording and communication. You probably will in a few weeks' time, and that is when your memory problems start. The pin problem may become manifest about this time next year, when you change your mind about the display.
So, from this I will probably go ahead and order a Mega. As far as the flow meters go I really only NEED one. I would also really like to have a 4 character 7 segment LED for each sensor would this be an issue for the mega? if so I will just use a scrolling LCD or something. thanks for the awesome advice so far by the way!!! 
liudr:
Sonic ranger doesnt work well against soft target so you need to do some tests to confirm its effectness.
I was afraid of that I saw the LV and HRLV range sensors on adafruit.com, think those would work?
I'm not going to speculate on how many displays you need, but 4x7s can be used pretty efficiently and I'm sure a Mega could handle a swag of them.
http://playground.arduino.cc/Main/MAX72XXHardware
The trouble is that 4x7s are so terribly 1980s and the amount of relevant traffic on this forum rather reflects that. The Mega can drive some pretty smart LCD displays that are far more versatile and can show a wealth of information in a pretty sophisticated manner. The pictures show my humble effort, note the pseudo 4x7 in bottom left corner!

Hmmm, I guess I'll order a mega. I'll figure out the displays after I get everything else working lol. The mega rev 3 will program and function like he uno rev 3 though right? Just more memory more pins and faster?
Delta_G:
@xXHillbillyXx
I recognize the band in your avatar. Cool guys. I know it's totally off topic, but it caught me when I saw it.
You from AR? What part?
Lol I'm going to level with you, I chose that picture from google images because I thought it looked awesome. I'm from Alabama. I had no idea it was a band, I WILL be checking them out.
xXHillbillyXx:
The mega rev 3 will program and function like he uno rev 3 though right? Just more memory more pins and faster?
There are differences in the pins for I2C and SPI buses, also SD card - no problems. I think the speed is the same, and that should not be a problem either.
I don't know what you use to feed. When I had chickens, I used a PVC pipe that could be filled from the outside. There were two 45deg bends to take the pipe inside that then was cut in half for a feeding trough. The whole thing worked by gravity. If you did it that way and wanted to monitor the amount of feed(when to add more), I suspect you might be able to put an IR emitter diode one one side of the pipe and a detector on the other. When the pipe is full the IR signal should not make it through. When it get below the level of the sensors, the signal will get through. If there is a signal, then you do your indicator of needing food.
rutledgek:
I don't know what you use to feed. When I had chickens, I used a PVC pipe that could be filled from the outside. There were two 45deg bends to take the pipe inside that then was cut in half for a feeding trough. The whole thing worked by gravity. If you did it that way and wanted to monitor the amount of feed(when to add more), I suspect you might be able to put an IR emitter diode one one side of the pipe and a detector on the other. When the pipe is full the IR signal should not make it through. When it get below the level of the sensors, the signal will get through. If there is a signal, then you do your indicator of needing food.
So you mean using it like a through beam sensor? That might work. I could make it removable so I could clean it if needed.
With the opening specification you listed, cannot imagine how complex a program you are looking at.
To have your whole system rely on just one micro is asking for trouble.
Would suggest you use one Arduino for each of the main tasks , Aqua, Greenhouse and Chickens, each with its own relay and power supply system.
That will allow you time to look more thoroughly at the hardware and software for each system.
eg the DS18B20 stainless (?) steel encased sensors , in practice are not waterproof long term or in water containing lost of Salts/minerals they will rust.
You need to place them in a folded length of heat shrink tubing with the ends tightly sealed and kept above the water line.
ricky101:
With the opening specification you listed, cannot imagine how complex a program you are looking at.
To have your whole system rely on just one micro is asking for trouble.
Would suggest you use one Arduino for each of the main tasks , Aqua, Greenhouse and Chickens, each with its own relay and power supply system.
That will allow you time to look more thoroughly at the hardware and software for each system.
eg the DS18B20 stainless (?) steel encased sensors , in practice are not waterproof long term or in water containing lost of Salts/minerals they will rust.
You need to place them in a folded length of heat shrink tubing with the ends tightly sealed and kept above the water line.
Thanks, I assumed they were water proof I'll wrap them or epoxy coat them. I am going to order a mega so I may use the mega and the uno.
xXHillbillyXx:
. I am going to order a mega so I may use the mega and the uno.
If you have the Uno, then I would hold back on ordering extra hardware for the moment.
You want to create your code in small modules that you finally bring together for a large system, until then you can easily do masses of developmet work on the Uno.
eg, do a DS18B20 routine with a x16 averging so you eliminate any power spikes etc.
Do similar for all the other I/O devices you have and test the code and actual device to ensure they perform as intended.
Much better if you start off and convert your opening Edit and Edit2 "needs" into a basic flow chart, so you can construct 3 viable systems you can work on.
As you are looking at using many different types of I/O devices that need various voltages and currents, if you stick to the Uno, then when you blow something ( as we all do on occassion ) then you only blow the cheaper Uno.
Have fun 
xXHillbillyXx:
Thanks, I assumed they were water proof I'll wrap them or epoxy coat them.
Sticking them on the outside of the pipe or tank should suffice. I have made thermowells for DS18B20 but they seem to work just as well held against a pipe under some insulation. Using thermal paste is probably a good idea.
I am going to order a mega so I may use the mega and the uno.
Use the Uno you have to prove up the various aspects of your programme for the Mega by all means, but I don't think using one micro is necessarily "asking for trouble", and may simply increase the costs and complexity unnecessarily. Having said that, a decision on this may simply depend on the geography, of which you make no mention. If the chookshed, the greenhouse, and the hydro are spread far apart, it may indeed be better to use a micro for each - not because you are otherwise asking for trouble, but because of the hassle and cost of the cabling. These micros can still report back to a central point - wirelessly - where the display, recording, and any external communication is done.