I have been using Attiny chips for irrigation tasks in my garden, but having plans to build a greenhouse, an Arduino seemed to be the way to go as it has more ports. I know, there are many 'Garduino' type projects already, including ones that twitter the state of your plants, but I just wanted something more basic, so, what does an anal retentive Asperger do in such a case: build something myself.

No use of course to spend 23-25 euro's for an Arduino Uno and then still have to add a shield for peripherals: seemed a bit overdone and as I have built various 'arduino's' already, I decided to just get the chip, a crystal, and 2 capacitors + some more stuff and build the entire thing on an Archer experiment board that I bought 20 years ago but has been idle all that time (radioshack partno 276-168). The Archer experiment board has islands with 3 holes and 2 seperate tracks (Vcc and Gnd) snaking in between. Of course it can also be done on regular strip board, perfboard or one can make a PCB for it.

Note At the time I wrote this, it was economical to build an 'Arduino' yourself with a bare chip. However, as prices of Arduino clones have dropped considerably, it now in fact is much smarter to get an Arduino Pro Mini clone and add the required hardware to that

In the end I decided I needed to have the following functions

  1. measure temperature
  2. measure humidity of the air
  3. measure humidity of the soil
  4. measure water level in a container
  5. measure light, basically to determine if it is light or day
  6. measure CO2
  7. choose between measuring soil humidity or a pure hydroponics irrigation
  8. switch a fan
  9. switch a pump
  10. switch a heater
  11. switch a lamp
  12. log daily temperature

List of materials
Atmega 328 here to burn bootloader yourself or buy one preprogrammed
1x 28 pins IC foot narrow (or 2x 14 pins ic foot)
16MHz Crystal
2x 22 nF (often carries '223' imprint)
1x 10 k (brown-black-orange)
1x 100nF (often carries '104' imprint)
1x PCB momentary make switch
perfboard This is what I used because I had that laying around idle for years already
NOTE:an attractive alternative is a cheap arduino clone such as the Pro mini or Pro Micro that can be had for a few dollars at e.g. Dealextreme.com or at AliExpress (currently 1.50 Euro)

16x2LCD CG046-3007 A00, but any other will do.
1602 I2C module

1x 7805, isolated
1x 1N4001
2x 100uF (16 V en 25 Volt)
1x 1 k resistor (brown-black-red)
1x LED
1x psu connector
Note: Consider getting a plug in USB charger with a cord and forget about making your own PSU

1x LDR
1x DHT11 moisture sensor (e.g. from dealextreme)
1x make push button
1x throw switch
1x buzzer (I use the CMB-06, a triggerable buzzer) ($2.99) but use any other buzzer you have or are comfortable with e.g. this one. Aliexpress has some buzzers that literally cost dimes
1x NPN transistor (e.g.BC547)
1x 330 Ohm (orange-orange-brown)
2x 10k (Brown-black-red)

Solidstate relays
4x330 Ohm (orange-orange-brown)
4x8pin dil foot
4x39MF22 SSR
4x2pin screw connector (mains voltage)
1x 5pin female printheader
1x 5pin male header 90degrees angle
ALTERNATIVELY: buy a ready made 4 channel mechanical relay for just about the same price as loose parts for the SSR, such as this one, or an even cheaper one.

bits and bolts
a couple of different colour wires, some print headers, four 3mm bolts and nuts, some 2.5 mm bolts and nuts, 4 spacers
solder tin, solder iron.
I have used Cinch plugs for connection... but actually these are hard to solder.

I use two casings:
one for the processor and most of the peripherals (I use a plastic box that contained screws: 9x12x4.5 cm)
one for the SSR's (I used a Tic-Tac peppermint dispenser The bigger one for 100 mints: 8.5x2x5 cm)

Step 1: Arduino for Garden, Greenhouse or Growbox: inputs and outputs

Before I describe the construction I will discuss the individual items:

An Atmel 328 with an Arduino bootloader is used. That makes for easy adaptation and uploading of the program. It will be a "bare bones" setup with no USB entrance, but simply with the TTL Rx and Tx signals on a header. Consider using a cheap Arduino pro mini, pro micro or Arduino nano

Simply a 7805 circuit fed from a wallwart. No 3.3 Volts will be necessary Consider buying a ready to use cheap 5 Volt USB charger

Humidity and temperature sensor
A DHT11 sensor will provide that. It is a 3 pin sensor of which the data can easily be read by the Arduino. There is a library available.

Simply read as an input to set various functions in the software

An LDR read by an analogue port. It basically is there to determine if it is day or night. This allows for extra light when the days are too short or to perform certain functions different at day or might(such as different day and night temperature, no irrigation at night etc)

Soil Moisture sensor
This sensor, read by an analogue port will give information about the humidity of the soil and signal the processor it is time to irrigate. There is an entire science on DIY soil moisture sensors. I will just be using the classic '2 nails' approach. The software and hardware will allow for the current through the sensor to be switched off, thus delaying corrosion.

Level sensor
This sensor checks if the water reservoir is still full. A simple float switch will suffice

used to give signals, e.g. if the water reservoir is empty. I use an old CMB-06 that has a trigger, meaning it can be triggered with a small current while it can get its main current directly from the power supply lines.

Solid state relays
I use 4 solid state relays to switch a fan, a pump, a heater and the lights. The solid state relays are separated from the processor print out of safety precautions. Consider using a cheap 5Volt 4 relay board

what are the software and hardware requirements for this project???<br>can any one suggest me???<br>i would like do this project as my college project.<br>please anyone suggest me the hardware and software requirments<br>
<p>they are described in the instructable, what is not clear in it?</p>
<p>this looks awesome and too complicated for me. Do you know an easier way to dispense water to the plant like giving the plant 30 mL of water every 12 hours. I'm new with the programming so i need something kind of simple, if you or anyone else could help me that would be awesome.</p>
<p>yes that is not that hard. there are various ways to do that. e.g. take an arduino pro mini, run a timer on that and every 12 hrs switch a pin high that has a small pump attached to it that pumps long enough to dispense 30 ml<br><br>or<br>Take a timer and an attiny85. Switch a pin high in the setup routine and keep that high with 'delay()' for a specified time to drive a pump. Set the timer for every 12 hrs and feed the attiny off the timer. It will restart every 12 hrs, run the setup and dispense the water</p>
<p>Very nice project and thank you for sharing the code..</p><p>Did you have a special reason for using a analog input ( A1 ) for the ' irrigation ' level ?</p>
<p>thank yuo for your kind words.<br>the raeson I use an anaolog input for irrigation level is because I need to read a variable resistor for that. Tha analog input is the way to do that</p>
<p>Thank you for your reply.. It's indeed a easy way to adjust your moisture level..</p>
<p>Thanks for sharing! This really motivated me to make my own Growbox! Quick question: You mentioned a heater, what would use as a heater? A heat lamp? Or what? A link to what you had in mind would be really appreciated! <br>Keep up the awesome work!</p>
<p>Thanks, I actually have used several, a lamp was one of them but that could disturb plants who will interpret the intermittent switching of a lamp at 'dark time' as a 'short day. some herbs and i think tomatoe dont like that. currently i use a 12 volt car heater.</p><p>That may not work in every space but mine is relatively small (130x60x60cm) and well insulated as it is completly build from alufoil covered foam</p><p>I must admitt i also have heated with a small burner. though that was ofcourse harder to regulate, the benefit was CO2 production that benefitted the plants. </p>
<p>Thanks for the reply! Going off of what you said i found this<br><a href="http://www.amazon.com/Lasko-100-MyHeat-Personal-Ceramic/dp/B003XDTWN2/ref=sr_1_4?ie=UTF8&qid=1447873183&sr=8-4&keywords=car+heater" rel="nofollow">http://www.amazon.com/Lasko-100-MyHeat-Personal-Ce...</a><br>Looks perfect</p>
<p>indeed looks good for a not too big space. Ceramic, like my carheater</p>
<p>the carheater i mentioned is a 12 volt heater thais used to keep windscreen from freezing in the winter</p>
<p>Thanks for sharing! I'm using your project as a base for mine (will post soon). I'm trying to use (almost) the same approach you have on step 5 to start a 3-6V water pump like this one <a href="http://www.aliexpress.com/item/DC3v-6v-5v-Small-Submersible-Waterproof-Water-Pump-Fish-Tank-Circulate-Aquarium/32361105440.html?spm=2114.01020208.3.20.098q5s&ws_ab_test=searchweb201556_3_79_78_77_92_91_80,searchweb201644_5,searchweb201560_9" rel="nofollow">http://www.aliexpress.com/item/DC3v-6v-5v-Small-Su...</a> connected to Arduino Uno's Vin (9v external)</p><p>But I'm not sure I'm getting it right, since it's not working...lol</p><p>Any help would be appreciated! </p>
<p>Alex, tnx for yr comment.Our approaches are a bit different as I use a transistor to put voltage on a sensor while you try to switch a pump with an altogether different voltage.<br>I understand what you are trying to do but I see some problems with your circuit:<br>When you switch on yr transistor 9 volt will fall over your 5 Volt pump. In order to regulate that you added the zener diode. However your zenerdiode will have trouble dealing with the almost 4 volt excess voltage as it has no resistor to lose the 4 volts in. Therefore chances are your zener will just burn out.<br>Although still a bit unorthodox you could put the aener in series with the pump. That way some 4 volt will fall over your relay and the zener will not be in trouble. (provided it can take the current the pump needs). </p><p>Still you need to put a reverse diode over your pump to suppress EMF feedback</p><p>I am wondering though why you are using 9 Volts to switch your pump if you have 5 volts available<br><br></p>
<p>hi there love the project </p><p>but I suck at the code part can any one help me I want to use this project with a uno but the code dosnt want to load can sumone please E-mail me the code for a uno <a href="mailto:Techead101@gmail.com" rel="nofollow">Techead101@gmail.com</a> thanks</p>
<p>it should load on a UNO so there must be another problem. What error message do you get?</p>
<p>Can I use an Arduino Uno?</p>
<p>yes of course you can, just need to add the RTC and LCD and other peripherals.<br>I just wanted to have it all on one perfboard and had still an atmega laying around. could even get a pro mini for say 2 dollars in china and use that on a perfboard</p>
Oh ok thanks! using this for my final project in robotics
<p>good luck</p>
<p>this is just perfect, wow.!! thank you for sharing.</p>
<p>my pleasure Akin</p>
you read my mind and thank god you made it right. you just showed 85% of my automation grade last project. the only thing diferent from what i need is the data readings, full control, and even especies choice from an android app. based on fancy pepper cultivars such &quot;ghost pepper&quot; &quot;Carolina Reaper&quot; an so on... once im done ill share!
<p>looking forward to that.<br>I currently am testing a wifi module on this project</p>
<p>One of the more comprehensive garden monitor/controllers.</p><p>Thanks</p>
<p>thanks Acheide. Sorry for my late reply, but i discovered i seem to have to click 'Make Comment' twice, otherwise it won't store</p>
That's a nice project! I would use your project to create my own watering system :D thanks for sharing
<p>thanks Timofte. As a matter of fact I quite enjoyed your clock project and have 'stolen' some of your symbol definitions that I am now using rather than text for temperature and humidity :-)</p>
very well done..nicely explained..cheers
<p>Thanks BLR_Ravi :-)</p>

About This Instructable




Bio: I am a physician by trade. After a career in the pharmeceutical world I decided to take it a bit slower and do things I ... More »
More by diy_bloke:Connect to Carriot with ESP8266 BruteForce codefinding for Infrared RGB LEDstrip Using the 4 pins of the ESP8266-01 
Add instructable to: