Automating Lights/Feeder/Pump for Aquaponics using Arduino

EDIT TO OP:
I have to thank everyone who has contributed information, and have now refined what is needed to be automated in the system.

Automation of the feeder: An Archimedes-Screw on a servo motor set to spin for 1 second and then shut off for 4 hours. (Thank you Chagrin)

Automation of PH testing: Using an electronic PH tester to check for PH drift and changes once per hour and report to a Linux PC. (Once again, thank you Chagrin and Focalist)

Automation of Lighting: Upon entrance to the greenhouse, the room lights to allow for the grower to see should be activated, simple t5 tubes (aprox. amount of tubes: 2-4) The system will use red and blue spectrum LEDs as a constant light source to grow the plants and will not need automation (Thank you Focalist, I've decided the inbound usage of new LEDs outweighs the cost of HID) Finally, the fish tanks will be lit by T5 lights as well, and will not be automated.

Automation of Overflow: Using either a moisture content sensor (Chagrin thank you) or a microswitch sensor (you guys are really good you know that?) to detect water overflow and make a warning in the report file on the PC.

LIGHTS:

ATTENTION: I'm looking for ORANGE spectrum LED lights as well. And would like to have all three spectrums in high wattage capacity.

ORIGINAL POST:
I've been suddenly dropped with the challenge of automating an aquaponics system to do the following:

Activate 2-6 standard grow lights via system clock time control from 4am-11pm (On at 4 off at 11)

Activate an Archimedes-Screw every 4 hours (Basically just need to make a servo turn 30* every 4 hours.)

Monitor and report PH levels (Water acidity, usually done by electronic PH monitors, but requires the person to be there, this needs to be able to report to a computer)

Monitor and report for overflow (I'm thinking a distance sensor inside an overflow pipe, to monitor for passing water or debris, if you can think of a simpler solution, feel free to pass it on.)

Monitor and report pump activity to ensure it's on and functioning. (not necessary, but would be nice for the associate)

As of now this is a PROOF OF CONCEPT, and I simply need to understand the process, parts used, and coding behind it.
If anyone is so kind as to help, I will be very grateful.
The current machine I am going to be doing the programming, monitoring, and controlling from will be a simple standalone PC running Ubuntu 11.04 with the Arduino IDE program installed.

Thank you for your time, and please, if you have any other questions on this that need answering to help, feel free to message me or leave a comment below.

Do a google search of this forum and the old forum for "aquarium" to see similar projects from the past.

I understand, and thank you, I've been doing so, but wanted to ensure that active communications could be held with people whom have experience on the subject.
Currently I have zero experience in the world of Arduino controlled devices, and this is a very sudden job that is on deadline. Thank you once again.

If anyone is so kind as to help, I will be very grateful.

Perhaps you could be a little more specific on what help you require. Software? Electronics ? Do you have any C/C++ programming experence? So where are you starting from?

Lefty

To be honest, I have no experience in the electronics aspect of it. I have little experience in C# with none in the other iterations of C. I currently am working on understanding the hardware aspects of Arduino, but again, this is very sudden, as in today, and so I'm attempting to scrabble with little to no experience in any category.
I'm supposed to simply be there to set up a Linux machine and an aquaponics garden nearby and suddenly got saddled with automating it too.

EDIT: Again I am sorry to be so very green on the subject, and I do wish I could cause a few less facepalms than I believe I am right now. But this is new ground for me.

TheNewGuy:
Activate an Archimedes-Screw every 4 hours (Basically just need to make a servo turn 30* every 4 hours.)

A continuous rotation servo isn't capable of precise rotation. You'll need either a stepper motor or a DC motor with an encoder (pololu.com sells inexpensive ones).

Most of your "turn on lights/pump/etc." problems are solved with a relay board. Just stay within the current ratings.

If you have any talent in scripting languages you can interface with the Arduino via the serial port and handle most of your logic from your scripts. This of course leads to handy web-based interfaces and such.

Thank you VERY much for that information, that thins down my search perimeters and tells me where I need to aim my sights at.

So a stepper motor, and relay board? Are there any other hardware requirements?
Remember I need this to also be able to report if the pump is inactive, or if there is overflow, all to a PC which will be connected to the system; any suggestions will be very much appreciated.

EDIT: In all reality, I don't need precision turning, just need it to spin the Archimedes screw for a second or so slowly.
EDIT 2: Once more, thank all of you for the help. Any information is better than none, and with this deadline I am happy to have people who know more than I on this subject.

active communications could be held with people whom have experience on the subject

On what? Growing pot? Do a search for hyponics.

zoomkat:

active communications could be held with people whom have experience on the subject

On what? Growing pot? Do a search for hyponics.

Though I do support the marijuana legalization effort, I am not attempting to grow it, this is actually for a self sustaining home setup, which will be using a 500gal. tank to hold edible fish, and 2 300gal. growbeds located nearby a vertical growing system.
This system is also using aquaponics, not hydroponics. I am experienced in the field of garden growth and self maintaining systems, but I am not experienced in technical automation.
Thank you for your time.

ON a side note:

If anyone happens to have any more information or interest in helping to automatize the system, please feel free to message me or leave a comment.

If anyone happens to have any more information or interest in helping to automatize the system

Be nice to know what part of the solar system your in...

TheNewGuy:
Remember I need this to also be able to report if the pump is inactive, or if there is overflow, all to a PC which will be connected to the system; any suggestions will be very much appreciated.

A moisture sensor is little more than a couple of parallel wires; when wet they will conduct electricity between them. You just need to add a resistor to tone down the current that's constantly running through the wire.

If you want to check if the water level is at a certain point you can add a float to a "lever microswitch" so that when the float lifts up the switch closes. If you want control over multiple points of whatever level (i.e. too low and too high) you just need multiple switches, or you can get the level over a range by using an IR distance sensor and a float to bounce the IR light off of. The switches would be the most reliable method.

If you want to know if the pump is active you can check for current in its power line or check its temperature with something like a DS18B20 (hot = running). If you want to verify that it's actually pumping water you can use a flow sensor or again implement a microswitch with a paddle that the water would push against when pumping.

TheNewGuy:
EDIT: In all reality, I don't need precision turning, just need it to spin the Archimedes screw for a second or so slowly.

In that case a continuous rotation servo would be OK. You would just command the servo to turn and set a timer to turn it off again within a short period of time. If you must ensure that the servo is actually turning (need to be notified if it's jammed) then you have to use something with an encoder wheel so you can verify the movement.

Stepper motors are kinda low torque, more expensive to implement, and provide no feedback mechanism so you can ensure it's turning so be aware of what you're getting into.

When you say "automation", just how long are attempting to leave this unattended? It will make a difference if someone is going to stop by the thing every day or so and glance at it, that will allow the design to skip sensing SOME items, which will simplify things. Also, as it is aquaculture, it's going to be important to know what TYPE, is this individual "planters" with drip lines like a greenhouse, one big flood and drain system, or what have you.. knowing the physical design dictates the solution.

Assuming you are using HID lighting, I might consider using a Water Heater timer or the like, as the kind of currents you are talking about require LARGE switching ratings. When you say "standard grow lights", I am going to assume you mean something like a 400watt lowbay Metal Halide "industrial" fixtures, a nearby greenhouse uses those. I looked into it, as keeping plants during long New England winters helps fight off the crazies. I ended up just using a couple of standard fluorescent shop lights, I'm not growing produce (or weed for that matter), just some houseplants, so I don't need that kind of power.

So, you are looking at switching a couple of kilowatts. You'll need a pretty big relay for that, solid state (SSR) is going to be the way to go. Since you are also doing pumps which are also very high draw, you might as well just get a handful of them and use the same device across the board to simplify things. A "too big" relay is never a problem.

I think you need to consider the chemistry of aquaculture a bit more.. it sounds like you want a "lights out" system, which if you are working with that many variables (like fish and plant metabolism) and recirculating the water, is going to be a LOT bigger issue than any potential system leak.

Ammonia toxicity, pH drift and Nutrient Lockout are going to kill both the fish and plants long before you need to worry about detecting a pump failure.. Unless you are planning to include realtime TDS/EC/pH monitoring (and adjustment), a closed system like that simply cannot work longer than a day or so... if it could, NASA and the ISS crew want to talk to you. A lot. For several decades that idea has existed, and the realities of metabolism make it impossible. If you want lights out, you need to decide whether you are raising fish or plants... or you'll need to use a system which does NOT recirculate the water... kind of undoing the whole idea in the first place.

Even though you are not growing Pot, your requirements are the same.. and there are commercial greenhouse controllers that are built for the job.. they are just a lot more expensive than trying to get someone to build a $5k "intelligent" greenhouse controller for $50... and I assure you, if they are doing aquaculture, they are more than aware that the devices exist and how much they cost... I'm a little concerned that you might be getting set up to fail. Maybe I'm just being paranoid, but when someone is trying to get you build a multithousand dollar device that already exists, but wants you to do it for $50... be concerned. Experience talking here.

Be careful, you are being saddled with a task which has eluded the best engineers in the world for fifty years... good luck...

When you say "automation", just how long are attempting to leave this unattended?

The intention {From what I've been given on information} is that this system will not be {unattended} for long periods of time, but he simply wants ease of use.

It will make a difference if someone is going to stop by the thing every day or so and glance at it

Pretty much exactly what the associate wants.

one big flood and drain system

We call it Ebb and Flow here, but yes, this with a constant pump active using a bell siphon to drop the flow when it hits the mark.

Assuming you are using HID lighting, I might consider using a Water Heater timer or the like, as the kind of currents you are talking about require LARGE switching ratings.  When you say "standard grow lights", I am going to assume you mean something like a 400watt lowbay Metal Halide "industrial" fixtures, a nearby greenhouse uses those.  I looked into it, as keeping plants during long New England winters helps fight off the crazies.  I ended up just using a couple of standard fluorescent shop lights, I'm not growing produce (or weed for that matter), just some houseplants, so I don't need that kind of power.

Yes, I'm using basically what amounts to shop bench lighting, but I must warn you, using el-cheapo fluorescent tubes will cost you hundreds in the annual time spans, getting higher ended grow lights, or better yet LEDs that give of mostly just LIGHT, is the best idea. Sadly for the system I'm going to be building he doesnt want the expense of LED arrays

So, you are looking at switching a couple of kilowatts. You'll need a pretty big relay for that, solid state (SSR) is going to be the way to go. Since you are also doing pumps which are also very high draw, you might as well just get a handful of them and use the same device across the board to simplify things. A "too big" relay is never a problem.

Please expand upon this if you would be so kind.

I think you need to consider the chemistry of aquaculture a bit more.. it sounds like you want a "lights out" system, which if you are working with that many variables (like fish and plant metabolism) and recirculating the water, is going to be a LOT bigger issue than any potential system leak.

The "lights out" system will be supplemented by standard water heaters to ensure water is warmed, I'm going to have to consider pump controls during lights off time, due to the metabolism issues you're speaking of. I have considered simply keeping the system lights on all the time, to mitigate this issue.

Ammonia toxicity, pH drift and Nutrient Lockout are going to kill both the fish and plants long before you need to worry about detecting a pump failure.. Unless you are planning to include realtime TDS/EC/pH monitoring (and adjustment), a closed system like that simply cannot work longer than a day or so... if it could, NASA and the ISS crew want to talk to you. A lot. For several decades that idea has existed, and the realities of metabolism make it impossible. If you want lights out, you need to decide whether you are raising fish or plants... or you'll need to use a system which does NOT recirculate the water... kind of undoing the whole idea in the first place.

On that note it'll be a lights on system through and through, thanks.

Even though you are not growing Pot, your requirements are the same.. and there are commercial greenhouse controllers that are built for the job.. they are just a lot more expensive than trying to get someone to build a $5k "intelligent" greenhouse controller for $50... and I assure you, if they are doing aquaculture, they are more than aware that the devices exist and how much they cost... I'm a little concerned that you might be getting set up to fail. Maybe I'm just being paranoid, but when someone is trying to get you build a multithousand dollar device that already exists, but wants you to do it for $50... be concerned. Experience talking here.

I can understand, I've been saddled with nigh impossible hardware jobs before, just not on this type of scale using parts I have never understood and a language I barely comprehend. If you can suggest what CAN be automated, this may mean I can go back to my associate and speak to them on it. I'm considering a PH monitor that checks once every hour, an Archimedes Screw to press food into the system, Overflow detection using the "switch" method Chagrin was so kind to post, and have it all report to a dump file on the linux machine.

Be careful, you are being saddled with a task which has eluded the best engineers in the world for fifty years... good luck...

Rome was not built in a day, but hell I'm not engineer so I think I'll step back and let those guys do it, if it's impossible under the circumstances right now, I'll simply tell the associate that and work my way past it.

Thank you for all your information and time, I have to say it's very nice to see such helpful people here.

PaulS:

If anyone happens to have any more information or interest in helping to automatize the system

Be nice to know what part of the solar system your in...

Oh I'm quite sorry:
Earth

[laughs]
No in all reality I'm from the U.S.A, Kentucky.

ONE LAST QUOTE AND I'LL STOP I SWEAR.
EDIT: Edited the OP, to refine the results needed

Chagrin:
A moisture sensor is little more than a couple of parallel wires; when wet they will conduct electricity between them. You just need to add a resistor to tone down the current that's constantly running through the wire.

This sensor can work in a direct water environment? Because the overflow holes are basically just punctures in the grow-beds, with PVC pipe leading back into the tank system. If it can, then I'll run wire through the PVC using two holes and do as you say, I could then just make the tolerances for the moisture content be "Damn wet"/"Water is all over the place"/etc (I'm only joking, if only code worked like this)

I hate to keep bringing this back up to be read, but one final question.
After reading the OP, and seeing what needs automation, what would be a good Arduino board to use? Or should I use multiple boards?

Using the moisture sensor in a way that would allow it to get repeatedly wet would (assumedly) result in it getting scummy and failing to read correctly. I don't think it's a good long-term solution.

With respect to what Arduino you need your primary requirement is that you have enough IO pins for your project as it certainly isn't a processor-intensive task. There's 14 digital and 8 analog on a typical board. A Mega will give you more of both or you can add on an IO board like the Mux Shield. Whether or not you use multiple boards really depends on whatever you think is practical -- taking into account that you might need to create communication between them which could create headaches in itself depending on the distance you need to cover.

Chagrin:
Using the moisture sensor in a way that would allow it to get repeatedly wet would (assumedly) result in it getting scummy and failing to read correctly. I don't think it's a good long-term solution.

With respect to what Arduino you need your primary requirement is that you have enough IO pins for your project as it certainly isn't a processor-intensive task. There's 14 digital and 8 analog on a typical board. A Mega will give you more of both or you can add on an IO board like the Mux Shield. Whether or not you use multiple boards really depends on whatever you think is practical -- taking into account that you might need to create communication between them which could create headaches in itself depending on the distance you need to cover.

If I'm simply setting:

An Archimedes-Screw on a servo motor set to spin for 1 second and then shut off for 4 hours.

Thats what? a servo attached to maybe 2 pins? If that?

electronic PH tester to check for PH drift and changes once per hour and report to a Linux PC.

I have no idea how I'll wire an electronic PH tester to an arduino....Still, probably not the best idea to keep this around. I may have to just drop features until I get better equipment.

the room lights to allow for the grower to see should be activated, simple t5 tubes (aprox. amount of tubes: 2-4)

I'm thinking I'm going to drop this, as if this guy is too lasy to hit a light switch I just dont know anymore...

a moisture content sensor to detect overflow would not be getting wet often, if it did then my system would be an utter failure, as a matter of fact, they should remain dry unless a freak incident occurs and the main draining area get clogged.

I'm thinking one board will do, with control over a servo, and moisture sensing. I may very well pair off the T5 tubes to a simple light switch, I mean really I dont think it's needed.

This automation is getting less and less automated by the minute.
Oh well, honestly I doubt it'll be much of a hassle.