Close

Project Planning

A project log for Urban-scale distributed hydroponics

A small-footprint hydroponics system for single-family homes and apartments with brown-thumb-friendly automated plant care.

kevin-weeklyKevin Weekly 03/19/2016 at 16:430 Comments

This is my first foray into hydroponics, so there will be a lot of learning opportunity for myself, and I will try to log as much of my learnings as possible to make this a richer project log.

My general strategy to get this project done is to first identify the major components or design decisions that need to be made and address them separately, before lastly tying them all together. I imagine a project like this is at risk of feature-creep so I want to stay focused on the subtasks at hand.

Below are the major components I’ve identified and a short description of the work that will need to be done for each:

** Grow bed design **

At the very least, a hydroponics system needs a container + medium to hold plants, a container to hold water, and a method of getting the water/nutrients to the plants.

For plant containers, there are a lot of ideas out there from a very simple tray, to PVC pipes with holes in the top, even to vertical towers (e.g. the “Tower Garden”) which are more space-efficient. My consideration for this part of the design is to choose something fairly inexpensive but also somewhat aesthetically pleasing. I suspect I will be able to find a fairly attractive solution using food or storage containers, or simple planters from the home store. I will need to be sure the materials are food safe though.

For the water container, I also would like to choose something more attractive than the popular big blue 55-gallon drum. I would draw inspiration from rain-water barrel design since that is becoming more popular these days and sellers are wise to the fact that homeowners don’t want an ugly barrel in their yard. Partially my set of choices would be dictated by the size of the container needed. A large container is good because you’d have to refill it less and it has a greater dilution factor for balancing chemicals. A smaller container is more aesthetic and also would have more fresh water turnover to avoid it getting scummy inside.

For getting water to the plants, there are several strategies- I will use one of the most popular which is an ebb and flood system. Essentially, the system works by flooding the roots of the plants with water for ~15 minutes, a few times a day, during the other times, the water is allowed to drain out back into the reservoir. An electric fountain pump provides the motive force needed to move water from the reservoir to the plants. By placing the reservoir under the plant bed, we let gravity drain water out when it comes time. There are two openings into the grow bed- one is for the pump to push water in, and for water to drain out when the pump is turned off, and the other is an overflow pipe (e.g. similar to what bathtubs and sinks have). Both will need to have some sort of filter mechanism to keep solids from entering the water reservoir.

** pH Sensor Design **

Apparently plants thrive best when they are grown in a certain range of pH which is conventionally provided by soil. In general, a slightly acidic environment of around pH 6.0 is preferred. Outside of a certain range, nutrients will begin to precipitate out of solution or otherwise become unavailable for the plants to take in. Therefore, it is important to monitor the pH of the solution continually and make adjustments as necessary.

The least expensive method for pH measurement is to use test strips, like the ones in high-school chemistry. However, these are not adequate for our purposes since we would like to monitor and adjust pH automatically, so something with an electrical interface is needed.

Traditional pH meters rely on a glass pH probe where the probe consists of a treated-glass electrode and a reference electrode and measures the difference of electrical potential between the two. In addition to being fragile and expensive, they also require constant calibration to maintain accuracy.

A more recent invention has been the ion-sensitive field-effect transistor (ISFET) which has found use as a semiconductor device that can sense pH. In this case the free hydrogen ions in solution react with the gate of a transistor to let more or less current through. Because this is a solid-state semiconductor device, ISFET probes can be much more robust and also fairly inexpensive. The still require periodic calibration though. May of these devices which I assume uses ISFET technology can be found on Amazon:
http://www.amazon.com/s/ref=nb_sb_noss_2?url=search-alias%3Daps&field-keywords=ph+meter

Thus, the main work will be figuring out how to interface with one of these to programmatically read the results.

** Nutrient sensor design **

The “food” for plants in a hydroponic system refers to the amount of Nitrogen, Phosphorus, and Potassium, i.e. the NPK system. These should ideally be kept in a certain range to feed the plants without “burning” the roots with too much fertilizer (it can draw the moisture out of plants). Thus, like pH, it is important to monitor the amount of fertilizer currently in the solution.

Unfortunately, it would be very difficult to measure the particular type of ions in the solution directly. However, a popular method is to measure the conductance of the water, since this varies with the amount of ions present. From the internet sources, I have read that a good target conductance is 2.0mS/cm. Conductivity can essentially be measured by two electrodes in water and measure the resistance between them. This is a device that I could easily build.

Of course, it wouldn’t be quite that easy as it sounds – some challenges I will face are probably corrosion, deposits of gunk on the electrodes, galvanic effects, and temperature variance. I will need to balance dealing with these problems myself, or interfacing with a COTS sensor, like the pH sensor.

** Water level sensor **

There are a myriad of ways that water level could be sensed. Some methods rely on measuring the distance of the water from the top of the container using and ultrasound, light, or capacitive distance sensor. Another method is to use a strip of resistive or capacitive sensors placed down the side of the container and measuring which sensors are tripped as the water level rises.

For my purposes, I think I will try to use a top-down light-based sensor since I think it would be cheap and reliable. I might need to have a float in the container to provide a consistent amount of reflectance to the sensor.

** Chemical dispensing **

Most hobby hydroponic systems I imagine put the human in the loop at this stage, where it is the owner’s responsibility to dose out the proper amount of pH, nutrient, and dilution corrections to keep the plants healthy. At a minimum, my system will provide some kind of alarm or recommendations to notify myself that I need to apply a certain correction.

However, I would really like to design some means of automatic adjustment by allowing the system to dispense things automatically. I believe this could allow a lot finer grained control (because it would be active 24/7) and also allow me to go on vacation without worrying about the balance. Also it would just be fun to make.

Another possible advantage is that nutrients often come less expensive in dry form, vs. premixed solutions that you would buy at the hydroponics shop. The liquid solutions are just easier to measure correctly and require less mixing. If my system had a method for using dry form nutrients, then perhaps the system would be overall less expensive to operate.

** Camera / Light level sensor **

A light level sensor would be cool to track how much sun the plants are getting to enrich post-analysis and also to help find the sunniest spot in our yard to put the system.

A camera would be fun in order to time-lapse the growing plants in addition to be able to check up on the system remotely to see if there are any problems.

I imagine either of these would be fairly easy to hook up to a raspberry-PI and there are many examples out there of people doing this.

** PCB Schematic / Layout **

Once the above questions are answered, I will need to integrate whatever circuits needed onto a daughterboard that can plug into the raspberry PI.

Eventually, if this project makes it far enough to consider what a productized version would look like, I would optimize things down, ditch the raspberry Pi in favor of a microcontroller and design a cheap and compact board that provides all the necessary functionality.

** Enclosure Design **

All the electronics must be neatly housed in a weatherproof enclosure with access ports to the various sensors and controls. I will need to think about what cables and connectors I should use and also safety for the dog and children who may be curious about it.

** Web interface and control software **

I want to design a web interface to monitor and control everything in the system. It will probably be written in Python/Flask and run on the raspberry Pi. The web interface will show current and historical measurement levels, and the state of the control algorithm. The user can change the control parameters from the web interface or inform the algorithm about certain events (such as “I just put more water in the tank”, or “I need you to calibrate xyz sensor”)

References:

http://www.fullbloomhydroponics.net/hydroponic-systems-101/
http://www.simplyhydro.com/ph.htm
https://en.wikipedia.org/wiki/PH_meter
https://en.wikipedia.org/wiki/ISFET
https://en.wikipedia.org/wiki/Labeling_of_fertilizer
http://www.gardeningknowhow.com/garden-how-to/soil-fertilizers/what-is-fertilizer-burn.htm
http://www.hydroponics.com.au/how-do-i-manage-ec-electrical-conductivity/

Discussions