Here is what you need:
1 Opamp UA741 (or LM741, or other '741 'type')
1 LED (chose your color)
1 resistor of 10-200k (I'll get back to that in the text)
1 resistor of 10-100 Ohm (whatever you have lying around)
1 reed switch (The small ones in a glass) if you can't find one, try a door contact
1 8 pins DIL IC foot
1 electrolytic capacitor 220uF 16-25 V (optional)
1 small submersible pump (I use a 5 W pump that pumps 430 l/h that is about 7 liters a minute) (Garden centers, eBay)
- if you chose to build the thing with a solid state relay add the following:
1 resistor 220 Ohm
1 solid state Relay (I use a 39MF22)
1 8 pins IC foot
1 resistor of 100 Ohm (optional)
1 capacitor of 100 nf 400 V (optional)
- if you chose to build it with a mechanical relay, add the following
1 resistor 1k
1 NPN transistor such as BC547
1 diode 1N4001
1 relay (make) voltage 5-18 Volt (depending on your situation)
A large bucket (DIY stores, I use one that is used to mix cement)
Tubing/Hose (DIY stores, garden stores)
Double cable low voltage
110-220 V cable suitable for outside use (DIY stores)
2 galvanized nails or a galvanized clothes hanger (DIY store, your mothers closet)
heat shrink tubing
blank PCB of about 5x5 cm
Hydrochloric acid (drugstore, diy store)
A watertight wall socket for outside use (DIY store)
A wallwart PSU of 5-15 Volt (depending on your situation).
That is very difficult to say as I had much of the stuff already available. The most expensive was I think the pump (14 euro's). The electronic components are really nickle and dime stuff. A 741 cost 25 cents (euro's), the 39MF22 was 1.80 euro.
I used a watertight wall socket that I had available, but I think these are about 3 euro's. Everybody must already have a wallwart PSU available somewher.
Mains cables for outside use are not really cheap (say a euro/meter) but often you can get it cheaper and if you are a gardener, you may have something left over from a previous installation.
I am not really counting the chemicals for etching either coz I had these for other projects as well, but also that is very cheap.
If I just count stuff that I had to buy especially for this project, it may have costed me 20-25 euro's, but I guess that if you dont have that much stuff laying around, it could be 35-40 euro's.
I will cover the following steps:
The electronic circuit (Intro)
Printing the PCB (step 1)
Etching the PCB (step 2)
Mounting the components (step 3)
Using a stripboard instead of a PCB (step 4)
Making a humidity sensor out of galvanized material (step 5)
Making an alternative humidity sensor out of gypsum (step 6)
Making a level indicator (step 7)
On overview of the finished project (step 8)
Seeing it in action (step 9)
Expansions (step 10)
The circuit is quite simple. P1 is used to set the level where the pump should start pumping. In dry soil the resistance of the spikes is high and the voltage on the inverting pin of the opamp is low. If that is lower than the voltage on the non-inverting pin (set by P1) the output will go high. This will activate the solidstate relay (a 39MF22) and or activate the mechanical relay. The PCB allows for both. The value of R1 is depending on your humidity sensor and the type of soil you use. For me 10 K was a good choice. In Step 4, where I describe the humidity sensor. I will tell you how to choose a good value for this resistor.
The pump that I use is a small submersible pump, used for small pond fountains. It pumps water from a container into a drip line in my veggie bed. Submersible pumps do not like to run dry, so we need some way to measure the waterlevel and to stop the pump when the level is too low. That is where S1 and R5 come in. S1 is a simple Normally Open float switch. I use a reed relay attached to the outside of the container and a floating device with a magnet on the inside (more about that later. When the level in the container goes too low, the float switch closes.
The trick is that I connect the floatswitch via a very small resistor (10-100 R) to the same terminals that the moisture sensor is attached to. So if the water level is too low, and the switch closes, there suddenly is a very low resistance over the humidity spikes and the 741 Op amp is 'tricked' into 'thinking' that the soil is wet enough and will switch off the pump.
You could use other switches than a reed relay, but this one has worked for me (I will come with some suggestions later)
C2 is not really necessary. One can put it in to give a bit of a delay with switchin the relay's on or off and thus avoid jittering.
The voltage to feed the 741 op amp is not so critical. Mine works on 5 Volts (I would not go much lower) but depending on the type of 741 you use you may go as high as 18 or 22 Volts. If you do though, you may want to recalculate R2. The current value of R2 is 220 Ohm.
In calculating the resistor value for other voltages, take the following in consideration: The 39MF22 has forward voltage of 1.2 Volts. Current should be between 5 and 20 mA. Most green or red LED's have a forward voltage of 2 Volts. Therefore the value of R should be at least (Vcc-3.2)/20 (gives value in kOhm) and at most (Vcc-3.2)/5 (gives value in kOhm).
So for 5 Volts this would be 1.8/20=90 Ohm till 1.8/5=360 Ohm
This table will save you calculating the value of R2:
Voltage Minimal value Max value
5 90 360
6 140 560
7 190 760
8 240 960
9 290 1160
10 340 1360
11 390 1560
12 440 1760
13 490 1960
14 540 2160
15 590 2360
16 640 2560
17 690 2760
18 740 2960
Values in Ohms. Just chose one sort of in the middle of the range for your voltage
The snubbing network around C1 and R3 is optional and most likely not necessary as I understand solid state relays to be quite capable of handling inductive loads. If you use it, put it in the wall socket (more about this later)
Step 1: Irrigating your garden with an opamp: printing the PCB
The design as you see it on paper is as if you would be looking at it from the component side, so if you want to use this design for any other method than toner transfer, keep that in mind.
Though this is not a tutorial on how to make your own printed circuit boards, I will quickly lead you through the steps of how I did it. The pictures I use are not specifically from this board but from another board but the method is the same:
-Print the PDF on glossy paper in a 1:1 scale, and cut it out. This can be special photopaper but just printed paper from a glossy magazine do well. Some people use paper that is normally used in baking
-Thoroughly clean a piece of PCB of about 4x5 cm, use steelwool. (picture 2)
-Heat up a regular flat iron on its highest temperature (setting for linnen or cotton). (picture 3)
-Put the printed design, face down on the copper and hold it in place with your fingers
-Take the tip of the hot iron and put it on a spot neer the center and hold it there for a few seconds, while you still hold the paper in place.
-This should have fixated the design to the board so it won't move anymore.
-Now put the flat iron, completely on the paper and press it down
-Hold that for about 30 seconds, while presing firmly.
-Now use the tip of the iron to rub down every part of the paper.
-Throw it in some water (watch it, probably very hot) and leave it there for about 10 minutes. Dont forget to switch off your iron
-After 10 minutes, peel of as much paper as possible, use your thumbs to really rub hard.
-Throw it in water again to let is soak and then take off more paper
-Repeat this till all the paper is gone
-You will probably be left with a final very thin layer of paper that is hard to remove. Use a soft tootbrush to remove that.
Your PCB now has its mask and is ready for etching . (picture 3)
Just one remark: the design you will download is very slightly different from the one you see below: I moved the position of the diode that protects the transistor from the relay, to make it easier to mount