System for hydroponics, can I do it?

I'm setting up a small hydroponic indoor garden for herbs/veg (eaten, not smoked) and so far my research keeps pointing me to you aquarium gurus which led me here. I want to be able to accurately monitor, automate (control), and log different parts of the system to my Mac. This includes:

  1. temp/rh
  2. water temp
  3. water ppm
  4. water ph
  5. lighting
  6. fans
  7. top-off
  8. gyro-driven USB video monitoring (def for the future)

It might be good to add some kind of filter as well since I'm doing this all organic, but it can work without it at first. the actual structure is fairly cheap and made out of PVC and plastic totes with some garden variety black tubing for the air pump/stones, so if it gets gross even with frequent water/nutrient changes, I can build another reservoir.

Now to start with I don't want to go nuts. I'm not a programmer although as a pro digital artist I have done my share of HTML/CSS, some javascript, actionscript a while back, and I write expressions and simple MEL scripts in Maya. I really need some advice because the hydro community doesn't have many answers for me. Most things I find they say it's not worth doing the PH and setting up peristaltic pumps because probes are unreliable and you can kill the plants if the system screws up the PH. Some say instead of messing with the PH you just check the EC (what is that, carbon, excited carbon?) and adjust it with nutrients instead of PH down/up, or water. I have no idea what to do, but I do know I want to do a DIY and not expensive store bought stuff.

I happen to think there is a way to do everything and not spend thousands of bucks. I only need to monitor a small setup (deep water culture with 6-8 pots, a few gallons, and a 1-2 gallon cloner which I'm not hell bent on monitoring on auto right away unless extra probes are all that is needed). Expanding the system over time is fine. PH seems to be the most bothersome so I'd like to start with monitoring and (if possible) auto-dosing for it. Monitoring temp/rh of air and temp of water should also be feasible I would assume without much fuss, and controlling small oscillating fans to help balance temp and keep good air circulation. I may not add a humidifier yet but want to add one eventually.

Getting this to work on my Mac and programming it, whole other story. Not sure how hard it is to program these things cuz I'm used to web sites and 3D stuff but I have used plenty of if/else statements if the syntax isn't too complex.

So anyway, please let me know if you guys (and girls) can help me out with this. I'm hoping that eventually I can create an aquaponics system but until then at least I can get some year-round veg, and maybe finally(!) have an aquarium where I don't kill the fish, although that's an entirely other story :slight_smile:

thanks and look forward to diving in head first!

The Arduino is great for automating and regulating tasks. It can, for instance, turn on and off heaters to maintain constant water temperature, as long as it has a way of measuring water temperature.

It can turn on and off valves to maintain water level, as long as it has a way of knowing what the water level is, and there is a source of water.

It can't however help with this:

I have no idea what to do, but I do know I want to do

well, maybe that was a bad way to phrase it. Shows what happens with sleep deprivation XD

What I mean is, I have never bought boards and sensors and had to program them so I need some advice/guidance.

the numbered list shows what I want to be able to monitor and control. You mentioned water level which I've seen people use, looks like a cylinder that floats.

I guess the questions are:

Where to begin, and how complex is the programming? How long does it take to program and troubleshoot?

What size board would I need to monitor the things I listed and eventually to control them? i.e. I need something with enough ports/connections or whatever they are called so I can start with monitoring and then add the controllers and necessary equipment to do so.

Where is a good place to buy sensors, especially for PH. Cheap PH sensors (from what I've read) need to be calibrated constantly, and some claim even expensive ones do as frequently as every day.

What are reliable PH dosers? Is it practical to build them from surplus items to save money?

How much will this cost to set up (approximately of course)?

Can it be scaled up if I have multiple systems or would I need to do everything over again from scratch?

Thanks

Well, listing a large "dream sheet" will probably generate little response from the forum. You need to do your homework on your project and then post up specific questions on issues you need help with. I suggest you read the info previously posted in this and the old forum to get yourself up to speed on what you are wanting to do. Below are links to google searches of this forum and the old forum for "hydroponics" and "aquarium". Reading the previous discussions will help you develop a technical understanding of the project you are going to do. Lots of info in these!

http://www.google.com/search?q=aquarium+site%3Ahttp%3A%2F%2Farduino.cc%2Fforum%2Findex.php&hl=en&num=100&lr=&ft=i&cr=&safe=images

http://www.google.com/search?q=hydroponics+site%3Ahttp%3A%2F%2Farduino.cc%2Fforum%2Findex.php&hl=en&num=100&lr=&ft=i&cr=&safe=images

http://www.google.com/search?q=aquarium+site%3Ahttp%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl&hl=en&num=100&lr=&ft=i&cr=&safe=images

http://www.google.com/search?q=hydroponics+site%3Ahttp%3A%2F%2Fwww.arduino.cc%2Fcgi-bin%2Fyabb2%2FYaBB.pl&hl=en&num=100&lr=&ft=i&cr=&safe=images

Your project is probably doable.

But it is certainly not a simple project.

I would suggest that you buy an arduino board and a few extras like a temp sensor and a humidity sensor(maybee one of the many available "starter packs/kits").

Then start working with it, learn how to hook up the sensors, how to program Arduino to read them. There are lot of info on almost everything you can imagine available here and other places on the net.

When you have the basic skills, make a plan, exactly what do you want to monitor and what do you want to control. Divide everything up in small "sub projects" that can be programmed and tested seperatly.

If you go for the big chromed project from the start without the basic skills and knowledge you will end up in the dark land of frustrations.

Where to begin, and how complex is the programming? How long does it take to program and troubleshoot?

Where to begin? Pick some piece of the whole project to start with. Want to measure water temperature? Great. Get an thermometer appropriate for the range of temperatures you want to measure.

How complex is the programming? That depends on what the program is supposed to do, and what experience you have programming. For me, it's a days worth of work, but I've made a living writing computer programs for 32 years. Your experience might be different.

How long does it take? As long as you keep coming up with bugs or changes.

Troubleshooting? Shoot, you'll have trouble. That's a given.

What size board would I need to monitor the things I listed

About 2" by 3", give or take...

I need something with enough ports/connections or whatever they are called so I can start with monitoring and then add the controllers and necessary equipment to do so.

I'd start with the Arduino. If you need to expand, to a Mega, for instance, you'll know. By then, you'll have thought of other uses for the UNO, so it won't go to waste.

Cheap PH sensors (from what I've read) need to be calibrated constantly, and some claim even expensive ones do as frequently as every day.

I can't answer this. pH is a difficult quantity to measure. Perhaps the advice that PH is not something to be controlled, but just monitored, is not bad. If you control the things that affect pH instead, that's likely the best you can do.

Is pH all that important? I don't know. Ask a plant.

Is it practical to build them from surplus items to save money?

Depends on your skill set, understanding of pH dosers, and inventory of surplus items.

I don't think I've ever seen pH for sale anywhere, so how you would dose it out, I don't know.

Can it be scaled up if I have multiple systems or would I need to do everything over again from scratch?

Scaled from one to two tanks? Yes. Scaled from 1 to 1000? No.

As I mentioned earlier, the Arduino is great at automating manual tasks. You need to define how you would manually perform all the operations that you would like the Arduino to do for you.

gotcha. So basically work out the logic like I would if I was if/else code. i/e if the ambient temp is 78º+ turn on the fan, if it drops to 72º shut the fan off, etc.

So let's say I want to start with ambient temp and relative humidity (in 2 places) plus water temperature. those seem to be the most basic of everything. I would need:

Arduino uno board
LCD display
case (unless I make one)
2 temp/rh combo sensors
1 RTD probe (and does the probe need something to plug into or is it part of the board? I saw bnc probes)

from there, what would the steps be as far as setup? Do I have to code it all from scratch or is there an OS or pre-built code to build upon? If it's hundreds or thousands of lines of code for doing this I think it will be too much :wink:

thanks!

MikMo:
Your project is probably doable.

But it is certainly not a simple project.

I would suggest that you buy an arduino board and a few extras like a temp sensor and a humidity sensor(maybee one of the many available "starter packs/kits").

Then start working with it, learn how to hook up the sensors, how to program Arduino to read them. There are lot of info on almost everything you can imagine available here and other places on the net.

When you have the basic skills, make a plan, exactly what do you want to monitor and what do you want to control. Divide everything up in small "sub projects" that can be programmed and tested seperatly.

If you go for the big chromed project from the start without the basic skills and knowledge you will end up in the dark land of frustrations.

thanks for the info. I agree with both of you. Too much too soon and I might just take an axe to it.

Just from your experience though, can you give an example, maybe show some code for monitoring something? Even if I put all the control parts on the back burner, if the monitoring is relatively basic that would still be great. Grab one piece at a time and test them out until the unit works, then bring it into the system for monitoring. After that point I could experiment with controls, which I assume would be wise to do also in some test environment to begin with.

PaulS:
I don't think I've ever seen pH for sale anywhere, so how you would dose it out, I don't know.

pH is basically a ratio of acidity to baseness (not sure if that's the right word, but there it is); for instance, if you wanted to change the pH of water, you might add different amounts of vinegar (more acidity) or baking soda (less acidity).

I would imagine that monitoring it would be something like monitoring a battery; a few electrodes of similar and differing metals to measure voltage and resistance, and how it changes with changes in the pH level. Probably the calibration on commercial sensors (of whatever quality) that has to be done is due to corrosion issues of the probe(s) involved. Perhaps if you used probes with gold and/or silver coatings (or similar fairly impervious metals?) there would be less of an issue (of course the price would go up).

That's all just a guess, though.

pH can be pretty important to plants, though; I know in regular gardening, you use quicklime to lower pH (I think - I'm not a gardener, just something I remember reading); I'm not sure what you use to raise pH. In the case of hydroponics, though, since it is water-based with no soil, you would probably use some kind of baking powder or soda (or likely something else) to lower the acidity, along with perhaps ascobic acid (vitamin C) to raise the acidity (?) - hmm, according to one hydroponics site, you use diluted phosphoric acid (to lower pH) and potassium hydroxide (to raise pH). I'm sure other nutrients and such raise and lower pH as well, so the system seems like it would be quite busy monitoring and adjusting things over time.

Anyhow - these would be liquids, so you would simply need some way to deliver measured amounts; ideally, a calibrated peristaltic pump would be used, but they aren't cheap - although I think you could easily make something workable if you tried. This would meter in the necessary amounts of pH adjusting chemicals to the nutrient bath as needed, and there would have to be some sort of "stirring" mechanism to ensure even distribution in the bath - I'd use an "open running" small fountain pump immersed in the bath, and inject the nutrients and pH adjusters (and anything else) near the intake vent of this small pump. I'd have a separate pump system away from this pump to supply the nutrient spray or circulation, but maybe I am overcomplicating things (I'd probably have dead hydroponic plants).

:slight_smile:

Two demanding difficulties when using/controlling Ph.

First the Ph scale is a logarithmic scale, so even a tiny measurement error is significant in control applications as base or acid material is added to control the 'loop', it's real easy for a Ph control loop to go bonkers, it was among the most difficult control loops to deal with at our oil refinery.

Second a Ph probe is just a very very high impedance resistance sensor that takes very low noise high accuracy input circuitry to correctly measure, any drift is a killer for accuracy. Also Ph probes have to be cleaned regularly and do have a finite life.

Lefty

To look at code examples for monitoring, search the forum for DS18B20 - it's a popular digital thermometer, which has a library to make it easy for you. Look on the main site to see the lcd library. Finally, google garduino - there are a number of garden monitoring/management projects documented on the web.

thanks for the replies

Yeah, in hydroponics they actual sell "PH UP" and PH DOWN". General Hydroponics (manufacturer) uses Potassium Hydroxide and Potassium Carbonate for the UP and Phosphoric acid for the down. Some people say that you can avoid the base and simply add more water or certain nutrients that are more basic. As the plants use up the nutrient solution the PH will shift depending on what they are using more of.

peristaltic pumps indeed. :slight_smile: That's exactly what I was finding. Something that can slowly dose the system and not have back siphoning. There is a lot of surplus pumps to buy but I don't know what manufacturers are reputable, nor am I skilled with electronics. I've been trying to ask on other forums but people are quite rude and keep asking me why I want to do it rather than helping with suggestions.

Truthfully, it seems to be the biggest pain with hydroponics, which is why I wanted to automate it, however it is also complicated as you both mentioned as you need to do it precisely, slowly, and you are using caustic materials.

If I had the money I would just buy a pre-built system, but those start around $700 and go up from there. Not cost effective unless you have a large operation or money to spare. It does seem okay to let it fluctuate bit as this is normal in nature, but from all my research they suggest to adjust the PH At least every 2 days or the plants can get damaged roots and other problems.

Given my limited knowledge maybe it's best to leave the ph for last and start with the basic stuff. It's times like this I wish I had a mentor, a pile of cash, and tons of free time to experiment.

Anyway, thanks for the info. I think I'm going to give it a go but will see if I can find programming examples on here to see what I'm getting into. It's nice to finally find a place where I'm not put down for asking questions.

retrolefty:
Two demanding difficulties when using/controlling Ph.

First the Ph scale is a logarithmic scale, so even a tiny measurement error is significant in control applications as base or acid material is added to control the 'loop', it's real easy for a Ph control loop to go bonkers, it was among the most difficult control loops to deal with at our oil refinery.

Second a Ph probe is just a very very high impedance resistance sensor that takes very low noise high accuracy input circuitry to correctly measure, any drift is a killer for accuracy. Also Ph probes have to be cleaned regularly and do have a finite life.

Lefty

So what is the price range of a reliable probe given your experience? I don't mind doing maintenance and cleaning the probe frequently. I'm going to rig the container so the probes can easily be put in or taken out.

wildbill:
To look at code examples for monitoring, search the forum for DS18B20 - it's a popular digital thermometer, which has a library to make it easy for you. Look on the main site to see the lcd library. Finally, google garduino - there are a number of garden monitoring/management projects documented on the web.

thanks alot. I'll check it out now.

I checked out some of the garduino kits and setup and they don't seem too bad. I've had CSS files that were longer than that :slight_smile: Might have to learn a little syntax but seems very straight forward. thanks for the advice.

I also forgot to ask:

Is it possible to do WiFi and/or remote sensors/probes? I may have to put this in a room without a computer and would prefer not to run 30 or 40 feet of cable. Only other option would be to get a cheap computer and use the wifi from that, but I'd like to know if it's possible without.

So what is the price range of a reliable probe given your experience? I don't mind doing maintenance and cleaning the probe frequently. I'm going to rig the container so the probes can easily be put in or taken out.

These guys seem to offer inexpensive Ph measurement stuff suitable for Arduino projects:

http://atlas-scientific.com/Arduino-ph.html?gclid=CPOi0byg3KoCFQwaQgodNEHi5w

http://www.ebay.com/itm/pH-Stamp-AVR-PIC-Arduino-Parallax-NEW-V2-0-/190507808055?pt=LH_DefaultDomain_0&hash=item2c5b267537

http://www.ebay.com/itm/Arduino-pH-Development-Kit-Probe-Solution-Board-/190542589314?pt=LH_DefaultDomain_0&hash=item2c5d392d82

retrolefty this is great! Besides PH they even have TDS/ppm, ORP, Dissolved Oxygen

very cool stuff and not crazy expensive if I buy things as I go.

thanks

eyedrinkvenom:
retrolefty this is great! Besides PH they even have TDS/ppm, ORP, Dissolved Oxygen

very cool stuff and not crazy expensive if I buy things as I go.

thanks

re: Peristaltic pumps

Google "homemade peristaltic pump" - you'll find a few videos and such about other's solutions, which you might be able to adapt. I don't think the solutions you would be using will be as caustic as you think unless I am misunderstanding the level of dilution of the solutions sold (I mean, you wouldn't want to wash your hands with it, but it probably won't harm the tubing used - especially if you source silicone tubing for the pump).

Once you have the pump built and attached to a gearmotor or such, at that point it is fairly simple to control from the Arduino using a simple transistor or relay-based circuit (or with a motor controller shield if necessary).

very cool stuff and not crazy expensive if I buy things as I go.

And I think that is the 'one true path' to successful Arduino projects. Get a sensor, learn how to wire, power and interface it to a arduino, learn how to write a useful support function(s) to make it easy to use in a larger sketch in the future. Only when you have gained a complete understanding of the sensor, it's limitations, basic variations, special requirements, any other idiosyncrasies, is it time to move on. Then on to the next sensor type, or learning to control a output device. Before you know it you will have gained all the knowlege nessessary to intergrate it all into a competent and useful application. It's a classic bottom up design track that works well with the Arduino method.

So often we get ambitious newcomers here wanting to use their first new obtained arduino board to make a mega-project with so many bells and whistles that it pains one to even read their wish list. Telling them to learn and build, step by step, with small little standalone sketches, while they slowly gain the hardware and software skills needed to take on the monster project much later is not often what they want to hear or accept. Many seem to think that way will waste money and time, when in the long run it will do the exact opposite.

Enjoy your Arduino journey, one step after the next. :wink:

eyedrinkvenom:
Is it possible to do WiFi and/or remote sensors/probes?

Yes - a number of vendors carry wifi shields - sparkfun, cutedigi. I have one on an Uno sending temp & humidity data right now to the web server I'm typing this from. You can use services like Pachube instead of a home server. Wifi shields are quite expensive though - $55 or more.