UPDATE 7/9/11: The AC power fed relay has been replaced with a DC battery fed relay system as shown in step 10.

UPDATE: We have been selected as finalists in the microcontroller contest! Thank you for voting and rating. Thank you also for all the feedback on the safety of out relay system. We hope the new instructions are clear.We will be continually updating as we make progress on the new design.

Hello Everyone!

My name is Clover and I am in love with vascular plants and robots.

This summer I wanted to combine my two loves of plant science and engineering. Thus I am constructing my very own greenhouse in my backyard. I am an undergrad, and as any former student knows, this means I move around constantly, and I am not always around to take care of my vegetable garden. I love my plants but since I am moving back to school in July, and my family is unreliable, I need a way to make sure that they are taken care of. Enter Arduino!

I have constructed an automated watering and temperature system. This includes sensors that will turn the systems on only when needed. This is essential when the ever-changing New England weather demands some intelligence in watering and heating patterns.

This is my first project using an Arduino so I am using wonderful articles from MAKE and Instructables as very helpful templates. Already the Instructables, MAKE, and Ladyada blogs have been ridiculously helpful so, worry not biology nerds, you too can show the engineers just how awesome we are!

Step 1: Plant Science 101

One facet of this project is to grow my own vegetables and do some scientific experiments.
Warning! Science...
Sources: Much of this information/ images came from Northeastern Univesity Professor Donald Cheney's Plant Science lecture and the textbook Botany which is linked in the more information section.

There are a lot of reasons that I am building a greenhouse. Greenhouses are a really cool way to grow larger and healthier plants faster and artificially extend the growing season. Greenhouses work by using a transparent airtight cover to trap in light and moisture to create a mini- ecosystem that is separate from the environment around the greenhouse. Heat is generated both from the sun’s rays that penetrate the greenhouse but do not escape as well as the trapped heat given off by the plants during their biological processes such as photosynthesis. This results in a very fascinating microclimate. This general idea of a layer of material trapping in heat and increasing the climate below is why sometimes global warming is called “the greenhouse effect” by people who like to oversimplify complicated climate phenomena.

Greenhouses can be made of glass or plastic. They create a controlled microclimate that makes experiments and procedures such as grafting or tissue cultures easier to perform. 

Plant Anatomy and Physiology
Vascular Plants (plants that have stems and roots) develop mostly from seeds (a lot of nonvascular plants like mosses and ferns develop from spores which work a little differently).  A seed consists of three types of tissues. The epidermal tissue is the outer layer for protection against the elements. This is usually embodied in the hard seed coat (Think the hard shell around sunflower seeds). The middle layer is called the ground tissue. The ground tissue is where photosynthesis takes place. The vascular tissue is in the very middle of the plant body and is where nutrients and water are conducted and stored.  The roots are the first thing to grow out of the seed. The roots are made up of the same tissues except on the tips of the root is a number of epidermal cells called the root cap that are made to die and be ripped apart as the root burrows through the ground. The roots provide water and nutrients to the plant. Sometimes nutrients can be stored in the roots such as in the case of root vegetables like carrots or turnips. 

The stem of the plant grows from what is called the coteledon in the seed. Longitudal growth is initiated by the apical meristem which is the primary growth bud. Lateral meristems are responsible for making the plant larger in diameter. There are two structures called the auxillary buds that grow on both sides of the main meristem. In case the axial bud is cut off for some reason the surrounding auxillary buds take over and grow the plant in a new direction. This is how pruners reroute tree growth by cutting off certain branches. 

NOTE ABOUT WEEDING: This anatomical knowledge is very useful when you are weeding- particularly with grass. Grass is a special category of plants called a monocot. With grass the meristem is on the bottom of the grass blade which is why it grows even if it is cut. So do not just rip out the grass blade but make sure you get at the root system too. 

Gardening: Plant Nutrients

Even though most plants grow well with just old fasion dirt and water there are a lot of other things that they need to grow and produce good fruits. These are broken up into two catagories: Macronutrients which take up more then .5% of a plant's dry mass and Micronutrients which are only present in trace amounts. Some macronutrients that are essential for all plants are Nitrogen, Magnesium, and Sulfur . Sulfur is in proteins and vitamins. Magnesium is in the chloraphyll which are involved in photosynthesis.  All of these are found in the soil. Plants are also about 45% Carbon which comes from the CO2 in the air and 45% Oxygen which comes from water and air. Some micronutrients that plants need are Boron, Chlorine, Manganese, Iron, Copper, and Zinc. All of those are naturally occuring in soil but the most important one is Iron. Iron deficiencies lead to a yellowing of the leaves. Fertilizers usually provide all the minerals needed for a plant to survive. The ratio of Nitrogen, Phosphorus, and Potassium are listed in that order on most fertilizer bags in ration form. For example: 10:20:10= ratio of N:P:K. 

Photosynthesis is how plants turn sunlight into sugars. The chemical equation is 6CO2 +6H2O --> sunlight--> C6H12O6 +6O2. Photosynthesis happens in two stages: The dark and the light. First is the light stage where , as the name implies, the sunlight is needed. What happens is electrons are taken from the water molecule and excited in photosystem 2. Then the electrons are transported down what is called the electron transport chain. This chain is nothing more then a series of oxidation and reduction reactions that progressively bring the electrons down into a less excited state. Once the electrons hit photosystem 1 they are excited again and go down another smaller electron transport chain. While the electrons are moving from a more excited state to a less excited state they are also turning a substance called NADP+ (Nicotinamide adenine dinucleotide phosphate) into NADPH. This is used in the dark stage, also known as the calvin cycle. The Calvin Cycle is a series of modifications starting with a reaction with starting material RuBP (Ribulose bisphosphate) and Carbon dioxide using a series of enzymes and redox reactions. It is called a cycle because after the sugar is produced the starting material RuBP is again synthesized. For every round of the carbon cycle there is 1 sugar derivative output and 3ATP (the source of our life's energy). So it takes 6 rounds of the Calvin Cycle to create one glucose molecule. There are a lot of plants that utilize different variations of this cycle.

Part of my experimentation is to come up with a low tec pH monitor for the soil. pH measures relative acidity by taking the log of the concentration of hydrogen molecules present. pH is measured on a 14 point scale with 1 being very acidic and 14 being very basic. Water is neutral or 7. I measured the acidity of my soil with an at home pH kit that I bough on amazon for $5. The acidity of my soil was about 6.5 which is perfect for the types of plants I am growing (strawberries, peas, basil, broccoli). If there is a problem with your plants and the fertilizer is fine I would suggest checking the pH. 

<p>Hi Clover!</p><p>I found your project a great one!, thank you for sharing it with many others. Look I want to use your project, or part of it in Chile, for many people who has their own personal Greenhouses or gardens to help them to keep their greenhouses and gardens automatically. I pretend to sale it to them at a reasonable price. How you made all this already and designed this project, which I would adapt for them, I wanted to know what you think, so please tell me.</p><p>Congratulations for your project!</p>
<p>great idea, i think it could do with a bit of colour, but other than it it's a great design.</p>
OMG. I love this so much. I aim to do similar things with an enclosed &quot;sun room&quot; area off our house. Just getting started with Arduino though, so having resources like this Instructible are fantastic. :-) Thank you for sharing!
Would you be able to make a schematic using a store bought arduino? I love this instructable. It's brilliant! I already have a arduino, I just need to translate from yours to mine and I'm having difficulty in doing so. Take care and thank you for this awesome Instructable :)
Very resourceful, good job!
Hi, I love your project so much i decided to make a variation on my own. <br> <br>in making your plantdruino i noticed that in your code you use pin 13 to turn on and off your relay outlet, but with your wiring you never mentioned connecting pin 13 with the relay terminals. Im guessing you added extra terminals in so you had the option to control other things like temperature and light, but i noticed that in your project you are exclusively dealing with moisture. <br> <br>could you clarify how you connect your relay with the arduino. <br>thanks!
Great project! <br><br>Question for you about the moisture sensors. One nail was connected directly to +5V. And the other nail was connected to the Arduino analog pin (zero in your case) correct? In your video you can see how one nail has a red wire connected to it (I assume this goes to the Arduino). The second nail looks like it may have a black wire connected to it but it's not exactly clear. And you don't mention that it is getting power. You don't mention it in the video or describe it above, so I just wanted to make sure I understood how to do it correctly. Your diagram seems to show it is connected directly to power. Please confirm.<br><br>I love it. Can't wait to build my own. Great job!<br>
Red usually goes to the +5v, I think.
Thanks man works really well! best ive found on the net
http://organic.yukonfood.com/bubblehouse.htm A Report on Soap Bubble- Insulated Greenhouses I hope you find it useful. <br> <br>http://geodesic-greenhouse-kits.com/greenhouse_designNEW.php 4. Water Tank <br> <br>This unusual greenhouse design feature, a large water tank acts as the &quot;Power Pack&quot; of the Dome. The water mass keeps the Dome warm in the winter and cool in the summer creating optimum environment for year 'round growth. Can be used as a beautiful space for aquatic plants and for growing fish. <br> <br>5. Undersoil Heating System <br> <br>A solar panel produces electricity to power a fan which blows hot air through pipes buried in the raised soil beds. Every day when the sun shines, your soil is being heated. It also helps cool the greenhouse in the summer. This is a unique greenhouse design feature that makes year 'round growing a reality. Raised bed gardening is simple and easy on the back! <br>
hi! I think i might also do this for my plants. But Im curious with the lcd? what does it display?
Interesting, but it would be nice to see your full code. You emphasize using a Crystal 'for accurate time keeping', yet it doenot really become clear what you are doing with that time. <br> <br>Not criticising, just always curious how others do stuff in order to learn
Now all we need to do is make an automatic weed and aphids/spider mites killer! :D<br>
Nice job.<br><br>I just noticed the swimming pool at the end of the video. You could put a fan/radiator in the Greenhouse and pump water from the pool to circulate between the radiator and pool.... heating the pool and cooling the greenhouse.<br><br>Oh, and -- got Aquaponics? ;-)
I have some questions about the relays. They are 120v AC, right? What kind/size of relay did you use? Where did you get them?<br><br>Thanks. :)
I'm using these:<br><br>http://www.amazon.com/SainSmart-8-Channel-Relay-Module-Arduino/dp/B0057OC5WK
Hey Arnold!<br><br>We used this relay from sparkfun:<br><br>http://www.sparkfun.com/products/100<br><br>It is activated by 5 volts and can handle 250 volts AC<br><br>Helga out<br><br>Hope that was the right reference.
I don't know why you called me Arnold, but I thank you for the link! :)
sorry i thought your username was a 'hey arnold' reference, but i guess you actually went to ps118 =P You are most welcome for the link!
The smaller the greenhouse, the harder it is to regulate temperature.<br><br>Water is actually far less significant. I'm afraid this setup would cook the plants on the first sunny day.<br><br>I would like to see this controller applied to a 12'x 16' greenhouse with some AC fans to blow the heat down into undersoil Perforated Drainage Pipe. <br><br>That stores the heat in the ground and pulls in clean outside air the plants will suffocate without.<br><br>In thermal extremes, a misting system can be employed via a solenoid. <br><br>Just a minute of water pressure will give you four minutes of mist.<br><br><br>
Good idea using the undersoil as a heat sink. Alternatively, instead of AC you could use 12/24v DC fans powered via solar panels/battery.<br><br><br>Water can be used for thermal mass as well. Combine the fan with a heat exchanger such as an automotive radiator. Pump the water from a reservoir (I'm using two 35 gallon rubbermaid trash cans) through the radiator using a 12/24v pump.<br><br><br>The water in my system typically fluctuates between 40 and 65 degrees F. Which translates into roughly 14500 Btu's of heat storage. Presently in the process of implementing a larger heat exchanger to get more BTUs... to keep the greenhouse above freezing at 7000 feet in January.<br><br><br>Meanwhile ambient air temps are managed at under 90 deg F in my 14x8 greenhouse - whereas without the heat exhanger, temps were well over 110 :-)
Hello Jkirk! Thank you for the comment! In practice the greenhouse created an ideal tropical environment that helped our plants thrive. I understand your question but in reality it works quite well. I urge you to try it. Peace, Clover
You take the little garduino terrarium I made and put it on steroids. I just can't win! Lol this is cool
This is a great project and nice to see you combine your passion with electronics in such a usefull way...thanks for the read! <br>Build_it_Bob
this is a really usefull instructable, i've been waitin for this for years (almost a couple)....must be renamed as &quot;greenhouse 2.0&quot;, and be capable of support supervision in the internet (ideal for office boys growing his own food)...
Haha nice! I like your style. Thanks for the comment!<br>Peace,<br>Clovercreature
this looks really lovely - thx for sharing
This is an amazing project! I love how you worked so hard on it! <br>I love how you came up w/ a green house and your love for plants! <br>I love your creativity and style for the birdhouse! (even tho it's not for birds) <br>You're awesome &quot;Clover&quot;! <br>
This is really a nice project and presentation.<br><br>I was going to save the pdf for future reading and maybe doing the relay thing next year but I noticed the wiring hazards. I didn't want to save the pdf and have anyone I know find it later and think the wiring was safe. Please, for your own safety, install, or have an electrician install a gfi at your power source. Your 110 wiring entering and exiting your outlet box should be protected from abrasion and tension as well as all the other forms of wiring abuse that come with a movable circuit. Inside the box, and what caught my eye, you're using stranded wiring on your outlet. Stranded is good in many cases and can be the safer bet where flexing is present in a wiring project but special connectors should be used on the ends to prevent things like....FROG HAIRS....<br><br>'But frogs don't have hairs!' you say?' You're right! Frogs don't have hairs and neither should your outlet wiring. All those loose strands of wire might appear innocent and safe but, with a little flexing, they can go in lots of directions and should a hot hair touch a neutral or ground hair, your focus will turn from plant science to plasma research in less than a second. Even with a gfi, you can generate an arc and plasma hot enough to turn clothes...and things like skin or fingers to charcoal in a fraction of a second. Plasma is a different state of matter that is fine on the sun or in a lab but not close to nice but unprotected living things such as your plants or yourselves. <br><br>You might ask an electrician about helping with the 110vac portion of your project. The rules and regulations those folks work with come from painful and deadly experience of earlier people and are the attempts of the industry to prevent or minimize the hazards of electrical power. Stranded wire, by the way, might not meet residential building code in many cities and towns.<br><br>Please protect yourself and those you care for, hopefully that includes everyone, and find an electrician friend to help with the power planning and wiring. <br><br>I do like the rest of the project, however. Thank you.
Wire in conduit is almost always stranded. If i had to fish soled wire in conduit, It would be a bear. Ii is allowed in any city where proper protection is used (look at a NEC book). You do not have to have connectors ether. I use 20 Amp outlets that let you wire from the back (works great) or tint the breaded wire before installing it on the 15 amp outlet. I would recommend using a relay with a relay socket. It is more robust and does very well with A/C applications. I would use a GFCI on the house.
&quot;Wire in conduit is almost always stranded&quot; - Wire in conduit is whatever you pull into it. As a licensed electrician I can say wire of this size is actually easier to play with when solid. Fishing 14AWG Solid is not a bear unless you are too small in the conduit (usually meaning you are pulling too many conductors in one conduit) or too long (watch your voltage drop &ndash; 14AWG drops fast at 120V when a load is applied). <br> <br>I am not sure why you would darken your wire (&quot;tint&quot;) or deep fry it (&quot;breaded&quot;)? You probably mean &quot;tin&quot; it as in cover with solder, and it is &quot;stranded&quot; not &quot;braided&quot;. <br> <br>Either way, if you do not have proper training, PLEASE call your local electrician to help you. it could save your family a trip to the morgue. Electricity is not to be played with. Even with a GFCI protecting you it can get hairy (especially if you went cheap on the GFCI and it is one of the bad non-protecting Chinese versions that get into residential construction sometimes). <br> <br> <br>
Stranded in conduit doesn't meet code within our city limits for residential. We use it for US government installations and industry, however, but always use terminators. We use it in flex or flex liquid tight applications. <br> <br>Using the push in connectors on a switch or outlet will contain the stranded wires like a crimp terminator. That, however, isn't what we are talking about because it isn't what happened in this case. <br> <br>A GFCI will not protect you from arc flash and won't trip on all power faults. It trips on hot neutral imbalance only. All other faults would fall back to the circuit breaker which is much slower than the GFCI. (Do you do your pm work on your circuit breakers?) <br> <br>GFCI and circuit breakers will fail and are not a substitute for a the safest wiring job you can provide. <br> <br>I particulary like the comments looking for low voltage solutions to this situation. <br> <br>That's very good thinking and I think I'm going to look into that and try this. <br> <br>Thanks, again, and good luck!
+inf. on low voltage as much as you can
Me gustan las plantas y tambi&eacute;n la electr&oacute;nica, as&iacute; que para mi este instructable fue fant&aacute;stico y adem&aacute;s muy completo (sobre todo la lecci&oacute;n de qu&iacute;mica del primer paso) Hace tiempo ten&iacute;a intenciones de automatizar mi invernadero pero en realidad no encontraba la forma de comenzar a hacerlo. Aqu&iacute; en la patagonia el clima es muy riguroso ( hoy en la ma&ntilde;ana -8&ordm; C y en la tarde no subi&oacute; a m&aacute;s de +3&ordm;C) y es necesario poder controlar todos los par&aacute;metros en forma autom&aacute;tica ya que no se puede estar presente a toda hora en el invernadero. Muchas y muy &uacute;tiles tus ideas y datos. De verdad muchas gracias!!<br>(estoy pensando en modificar los sensores de humedad por dos terminales de cobre ya que el salitre acabar&iacute;a muy r&aacute;pido con el galvanizado de los clavos) Gracias otra vez!
What a great effort, and it shows. The time that you put into this instructable is admirable and apparent. <br><br>I think the point's been made adequately about the dangers of unruly electrons, but I'll reiterate all the same...please fix that.<br>There's a lot to be said for low voltage D.C. systems in this type of application as well. Easily adapted to solar. Less dangerous. Simpler to back-up for power outs. Not detracting, just throwin' it out there for further consideration. <br><br>Also thermal mass helps to buffer extreme temperature swings. Water vessels, piles or layers of rock, concrete - all work like giant thermal batteries.<br><br>I've built and used many different types of methods and houses, and even in New England you're apt to encounter problems with over heating. Swamp coolers, thermostatic vents, fans and earth tube ventilators are all potential solutions, but leaving your little terra-hut completely untended may produce some unwelcome surprises upon your return. Might want to check out a shade cloth depending on when you're going to be around and when you're not.<br><br>Again, great job...but what's with the lid? Even biology majors have to take history and math don't they?
Thank you very much for your comment and suggestions! We are definitely going to incorporate them into our improved version!<br><br>What do you mean by lid?<br><br>Peace,<br>Clover
Lid...in military vernacular (yes, I am a former cog in the Military Industrial machine) means hat.
Very nice! Like the creativity and music...and plants!
Thank you!!
great ible , very cool
Thank you!<br>Peace,<br>Clover
looks good.<br><br>what are you using to turn the water flow on an off on the hose? I've been trying to find a cheap solenoid valve for my project, but so far haven't found anything.
We bought ours from Sparkfun. Here is a link:<br>http://www.sparkfun.com/products/10456<br><br>Thank you very much for your comment!<br><br>Peace,<br>Clover
Very nice project and my compliments to CloverCreature's Vanna White impression. Love her hat and smile... oh, that I was young again....
Thank you very much LandMime! That made my day!<br>Peace,<br>Clover
If it's airtight, how are you going to facilitate gas exchange?
Easy: Add humidity and temp sensors, and a couple of waterproofed DC 120mm computer fans. But what's important to start with - just the basics right? It's hard to get everything you want in a version 1.0 (and I've learned when perfect is your 1.0, you never finish).<br><br>I've favorited this and will be borrowing many details. <br><br>One thing i will change is the power source. The other comments about movable AC hold true (which could be fixed), but I'm looking at AC as being overkill also. <br><br>I just need a reliable DC power source, and for that a portable car charger would do (and would probably last 2 weeks or more on a full charge). [of course, solar is an option, but again the rule about getting things done.<br><br>My other planned changes are using metal conduit and a manual pipe bender. I have read that UV light will make plastic conduit brittle after a couple of years. I'll bend the pipe to fit INSIDE the soil box, inside 1 foot 1&quot; plastic conduit &quot;brackets&quot; so it's anchored more and offers less chance of flexing at the base.

About This Instructable




More by clovercreature:Plantduino Greenhouse 
Add instructable to: