Automated watering of potted plants with Intel Edison... A Moisture Sensor detects the low moisture content of soil and activates the water pump or the solenoid valve which controls the flow of water. When the required water is pumped to the plants, the sensor automatically stops the pump / solenoid valve. It is a repeat process.

This is one of my original proposals submitted to Intel IoT Invitational where the Instructables HQ team seeded about 300+ community members with specially bundled kits under different themes. I was awarded a kit under "Environmental & Agriculture".

The Intel Edison is based on Arduino Uno. I was new to Arduino and Intel Edison. So, when the first batch of recipients were announced and I got an email from instructables that I was wait-listed, I felt relieved. The reason being that I need not get into the process of something new which may take a month or two to learn even the basics. But when I got another mail that my proposal has been selected under "Environmental & Agriculture" I was happy. I am a learner, so Immediately I started my learning process, browsing through related websites, forums and collecting resource material. It took me almost two months to come to a beginner's level and I can proudly say that I can do small projects with Intel Edison and develop my own simple Arduino code for such projects.

I have tried my level best to make this instructable as simple as possible with multiple steps explaining everything involved in this project so that anybody can replicate and use it in their home.

Regarding the parts and materials required, instead of posting all of them in one step and scaring away the readers, I have broken down the material requirement and combined them separately with the relevant steps.

Please watch the video and go through the instructable. Your comments and valuable suggestions for improvement are most welcome...

Step 1: Setting Up Intel Edison

Setting Up Intel Edison

The first time you got your Intel Edison, you need to assemble and set up the necessary device drivers and the programming language of your choice.

  • Assemble Intel Edison with the Breakout Board
  • Install the necessary Device drivers
  • Install Flash Tool and Flash the Edison
  • Set up your preferred programming language

You need two numbers of Micro USB 'B' to Type 'A' Cables and a 12 Volt DC power adapter suitable for the power supply in your country (110/120 or 230/240 volts). Make sure that the rated power of the adapter is minimum 1.5 ampere and the inner pin is the positive pole.

Easy to follow step-by-step clear instructions on getting started with Intel Edison board is provided in the following link :


Please follow these steps to assemble, install necessary device drivers, flash Edison Board and installing the Programming language of your choice. I preferred Arduino as it is very easy to learn and also there are lots of sample codes for the sensor modules available online. Sometimes the flash tool may fail and you may need to flash the board manually. For this project we do not require to setup the serial terminal and wi-fi.

Once you finished installing the Board, please remember to note down the Virtual Com Port number and the USB Serial Port number from the Control Panel - Device Manager - Ports (COM & LPT) menu. You can see in the last picture of my Device Manager screen-shot, that the Virtual Com Port number is 21 and the USB Serial Port Number is 22.

If you have any problem or doubts please post a comment here and I will be happy to help to the best of my knowledge.

Step 2: Other Hardware You Need With Intel Edison

Grove Base Shield V2 for Arduino : The Base shield makes it easier for connecting different sensors with the Intel Edison Board. Its pinouts are same as Arduino Uno / Edison Breakout Board, so it can be directly inserted on top of the Edison Breakout Board

Grove Moisture Sensor with Connector Cable : The Moisture Sensor is used to detect the moisture level of the soil, which works based on soil resistivity measurement. The sensor shows a lesser value when the moisture content is low and shows a higher value when the moisture level in the soil is high. The Moisture Sensor can be directly connected to an Analog port of the Grove Base Shield using the connector cable.

Step 3: Assemble Grove Base Shield and Moisture Sensor With Edison

Once you completed assembling, installed necessary device drivers and the Programming language, you are ready to connect Grove Base Shield and Grove Moisture Sensor Module to the Edison Board.

  • Connecting the Grove Base Shield - The Grove Base Shield V2 is compatible with most of the Arduino boards available. Some boards work with 5 volts power supply and some with 3.3 volts. Intel Edison Breakout board is based on Arduino Uno Board which works on 5 volt power supply. You can find the power selector switch on the Base Shield near the Analog Connector A0. Slide the power selector switch towards 5 Volts. The number of pin out on Grove Base Shield is same that of Arduino Uno board, so it can be directly inserted on the Edison Breakout Board.
  • Connecting the Moisture Sensor - Using the connector wires provided with the module, connect one end of the connector to Moisture Sensor and the other end to Analog connector A0 on the Grove Base Shield. The connectors can be connected one way only so there is no worry of wrong connection.

Step 4: Arduino Code for Testing Moisture Sensor

This is a simple code I got from Seeedstudio wikipage for testing the Moisture Sensor at the link below...


Copy the code to your Arduino IDE, compile and upload to your Edison. Now open the Serial Monitor. You can open it from the 'Tools" Menu or click on the Magnifier icon on top right of Arduino. Alternately Shift+Ctrl+M will also bring out the Serial Monitor.

Here you can see that the initial value of the sensor is set to Zero. So when the sensor is in open air, it will display values of '0's in the Serial Monitor. When you immerse the Moisture sensor in water, you will get higher values. Please see the two Screen shots above for reference. Take care that the electronic circuits of the sensor are not immersed in water which will short-circuit and damage the Sensor.

int sensorPin = A0; // select the input pin for the Moisture sensor

int sensorValue = 0; // variable to store the value coming from the Moisture sensor

void setup() {

// declare the ledPin as an OUTPUT:



void loop() {

// read the value from the Moisture sensor:

sensorValue = analogRead(sensorPin);


Serial.print("sensor = " );



Step 5: Test With Garden Soil to Determine Required Moisture Content

The plants need watering when the soil moisture content reaches a certain low level. If the plants are not watered at this stage they show signs of stress and after sometime they start wilting. When you water the plants, you also consider the moisture holding capacity of the soil and stop watering when the soil reaches the maximum level. Watering beyond this point may lead to over-watering and is also harmful to plants. So, we collect soil samples from the garden and conduct a test to find out both these levels.

  • Do conduct tests on the same type of soil you use for your potted plants as these levels may vary for different type of soils (eg. Clay, Silt, Sand, loam and combinations of them...)
  • Make a visible inspection and decide a spot where you think that it needs watering. You can also collect samples from the containers of existing plants.
  • Collect soil sample from a depth of about 2 to 3 inches below the surface.
  • Insert the Moisture Sensor in the soil sample and note down the average reading from the Serial Monitor. You can see the screen-shot here that the Serial Monitor displays reading between 343 and 352.
  • So, we will keep 350 as the average reading and set this as the level when the plants need watering.
  • Now slowly add water to the soil and watch the readings on Serial Monitor. You may find that after certain level of watering the readings does not have much different and are almost constant.
  • In the screen-shot above, you can see that the serial monitor readings are between 720 and 735 and the soil sample also slightly over-watered. So, we will keep 700 as our maximum water holding capacity of soil sample we are testing.

Considering these readings as our base, we will develop an Arduino program for controlling the watering cycle.

Step 6: Protective Enclosure for Edison Board and Accessories

As there are chances of accidentally spilling water over the system, we need some short of protective covering for the Edison Board with Base Shield and other accessories.

Placed the Edison Board inside a suitable plastic case, drilled holes and fixed the board with screws to the case. I have also made necessary openings for the power adapter and USB cables. The Moisture sensor module and the circuit to operate the pump can be connected from the top. A word of caution here... The WiFi antenna of the Edison is located under the board. If you enclose the system with a protective case, you may not be able to use WiFi with Intel Edison.

Step 7: Arduino Code for the Setup

The following is the Arduino code for running Automated watering system for the potted plants. I have gone through many reference material and sample codes and came with this slightly modified version. The code is self explanatory as I have given the description of each line after // (couple of forward slashes)

Here you can see that we have set the Dry value as 350 when the water pump starts watering the plants and the Wet value as 700 at which point the water pump stops. The moisture sensor will be connected to Analog connector "A0" on the Grove Base Shield. The output signal to start and stop the water pump is through Digital pin 9 on the Edison Board.

The program tells Intel Edison to read values from the Moisture sensor connected to Analog connector "A0". When the sensor value falls below 350, a small signal current is sent to Pin 9 which will activate the water pump connected to a simple electronic circuit. When the sensor value reaches 700, the signal current to Pin 9 is stopped which also stops (or opens) the circuit operating the water pump.

The code also has provisions for monitoring the sensor values through the serial monitor, connected to a computers using the Micro USB cables.

You can copy / paste the code in your Arduino IDE and upload to your Edison Board. Make sure to set the com port numbers you noted down from your computer before uploading.

/* Automated Watering With Intel Edison using a Water Pump

* Grove Moisture Sensor detects soil moisture condition and triggers the Water Pump


int moistureSensor = A0; // The input pin for the moisture sensor

int waterPump = 9; // The output pin to actuate the Water Pump

const int dryValue = 350; // This value is when the Plants need watering

const int wetValue = 700; // This value is when the plants are fully watered

boolean DEBUG=true; // Display the output on the Serial port

void setup() {


pinMode(moistureSensor, INPUT); // Declare the Moisture Sensor as an INPUT:

pinMode(waterPump, OUTPUT); // Declare the Water Pump as an OUTPUT:

digitalWrite(waterPump, LOW); // Make sure the Water Pump is off.


void loop() {

int sensorValue = analogRead(moistureSensor); // read the value from the Moisture Sensor:


Serial.print("Sensor value: ");



if (sensorValue

digitalWrite(waterPump, HIGH); // Operate the Water Pump


if (sensorValue>wetValue){ // If the sensor value is greater than the wet value

digitalWrite(waterPump, LOW); // Stop the Water Pump



Since our code is ready, let us build the circuit which controls the operation of water pump.

Step 8: Tools Required

The following tools and accessories will come in handy during building the project

  • A good quality Soldering Iron with Solder wire
  • Wire cutter to trim away excess length of terminals from Transistors and Diodes
  • A multi-meter to test for short-circuit
  • A screw driver set
  • Wire stripper
  • Hacksaw Blade
  • Craft knife
  • marking pen
  • Measuring scale

Step 9: Electronic Components Required

  • TIP 122 Transistor : One piece (You can use TIP 120 and 121 also)
  • IN 4007 Diode : One piece (You can use IN 4001, 4002, 4003 and 4004 also)

A NPN Bipolar Transistor which will act as a Switch : Here you can see a NPN type Transistor (TIP 122) which we will use in our circuit as a switch. The transistor has three pins namely Base, Collector and Emitter. The required voltage to operate the water pump is connected to Collector pin of the Transistor which will pass through the Emitter to the water pump. NPN Transistor circuit is normally open, means no current will pass through from Collector to Emitter in normal condition. However, a small signal current through the Base will close the Circuit and allow the current to pass from collector to emitter and operate the water pump.

If you go back and refer the Arduino code, you can see that we have declared Pin 9 as an out put to operate the water pump, which will be connected to the Base of the transistor. When the Sensor value is less than 350, the program triggers a small signal current to Pin 9 connected to the Base, which closes the circuit and operates the water pump. When the sensor value is more than 700, there will be no signal current through pin 9 and the circuit opens stopping flow of current from Collector to Emitter and the water pump stops.

In the next Step we will see the technical details and the type of Transistors you can use in the circuit.

What is the role of Diode ? : You can see that we have also included a Diode (IN 4007) in our circuit. The Diode allows the current to pass from Anode to Cathode, that is from the (+) ve end to the (-) ve end and not the other way round.

Now consider that our water pump is in operation. When the sensor value reaches 700, the signal current to Pin 9 is cut off which also stops the water pump. When the water pump stops, it creates a reverse current which flows back through the Emitter, Base and to the Edison Board through Pin 9. The probability of the Edison Board getting damaged with this reverse current is very high. In order to stop this, we place a Diode between Pin 9 and the Transistor, Anode to Pin 9 and Cathode to Base of the Transistor. As the Diode will allow current to pass from one direction only, it stops the flow of reverse current from the motor and safeguards the Edison Board.

We will see in the subsequent Step what type of Diode we can use in the circuit.

Step 10: Technical Details of Bipolar Transistor in Our Circuit

We have used a TIP 122 NPN type Transistor in our circuit. The Transistor we used is actually a combination of two transistors known as Monolithic Darlington Configuration. Even a very small signal current at the base is able to activate the transistor due to its exceptional high gain performance.

Please see the first picture. If you hold the inscription on the Transistor facing you, then Pin 1 is the Base, Pin 2 is the Collector and Pin 3 is the Emitter. Remember to make your circuit accordingly.

In the second picture we can see the Electrical Ratings of the Transistors. TIP 120, TIP 121 and TIP 122 are NPN type & TIP 125, TIP 126 and TIP 127 are PNP type transistors. Except for the Collector -Base and Collector - Emitter voltage handling capacities, all other ratings are same for all Transistors.

In my Circuit I have used a TIP 122 NPN type transistor. You can also use TIP 120 and TIP 121 in your circuit as per availability as all can handle input voltage above 60, whereas our maximum voltage will be around 12.

You can also use TIP 125, TIP 126 and TIP 127 PNP type transistors in your circuit but the connections will be a bit different. I have TIP 127 with me but I do not know how to use it in the circuit. Hope some Electronic experts will throw some light on how to use PNP type Transistors.

Step 11: Selection of Diode in the Circuit

As we have seen earlier, we have used a IN 4007 Diode in our circuit, which will allow the current to pass from one direction only, that is from Anode to cathode. If you look at the Diode carefully, you can find a white or black band marked on one side of the Diode. The banded side is the Cathode terminal.

Please also refer to the third picture above for technical details of Diodes. Here you can see that enclosed within red border are IN 4001, IN 4002, IN 4003, IN 4004 and IN 4007 rectifier type.diodes. For all these Diodes, only difference is the Peak Inverse Voltage (PIV) and all other details are same. The minimum PIV for IN 4001 is 50 volts, so you can use any of the above Diodes in your circuit as per availability as our PIV will be maximum of 12 volts only.

Step 12: Simple Circuit to Control Water Pump

I have made this simple sketch based on some reference material from the net to control the water pump through Intel Edison.

Let us start from the Power Supply

  • Connect the (+) ve pole from the power supply to (+) ve pole on the Water Pump
  • Connect the (-) ve pole from the power supply to Emitter pin of Transistor
  • Connect the Emitter pin of transistor to GRD on the Base shield
  • Connect the (-) ve pole of water pump to Collector pin of Transistor
  • Connect the Base pin of Transistor to Cathode end of Diode
  • Connect the Anode end of Diode to Pin 9 on Base Shield

Now our Circuit is completed

Step 13: Bread-Board Your Circuit

Let us prototype our circuit using a Bread-board

What you Need ?

  • A Bread-Board
  • Male-to-Male Jumper Wires


A Bread-Board helps you prototype and test your circuit without soldering. Just plug-in the components vertically in the position you want and connect the required terminals with jumper wires to complete the circuit. This makes it easy for repeated use of bread-board to test different circuits before actually making them.

  • The outer two rows on each end are called as Bus Strips. You can use these bus strips to provide power supply to the circuit, one for the supply voltage and other for the ground.
  • The central portion with many terminals running perpendicular to the Bus strips are known as Terminal Strips.
  • A central notch divides the terminal strips for easy prototyping of Dual In-line Package (DIP) Integrated Circuits.

The Bread-Board I have used contains two separate portions which I have marked with black lines. If you open the backside of the Bread Board, you can easily see that the connections of the bus rows at the ends are broken at the middle. So, here you have 8 buses of 25 connected terminals on the Board.

Please also refer to the third image from wiki page about layout of the Bread-Board

Make The Circuit

Now prototype the circuit with reference to the sketch in the previous step. It is very easy. You can see the completed circuit in the last picture

Step 14: Test Water Pump

What you need

  • 6 volts Mini water pump
  • 6 volts adapter suitable for the water pump

Other Accessories

  • Two vessels, one empty and another with about 1 to 2 liters of water
  • A timer. You can use a mobile phone also.
  • About 12 inches of plastic tube suitable for the pump
  • An empty plastic bottle of known capacity. Here I have used an empty cool drinks bottle of 500 ml capacity

Test the Water Pump

  • Cut the plastic tube in two, one about 2 inches long and another remaining 10 inches
  • Attach the 2" long tube to the outlet of the water pump
  • Attach 10" long tube to the inlet of water pump
  • Connect the power supply to water pump. There are red and white markings on the pump. Connect the (+) ve pole to Red marking and (-) ve pole to the white marking
  • Place the long inlet tube in vessel containing water
  • Switch on the pump for 30 seconds, using your mobile phone as timer
  • Collect the pumped water in the empty vessel
  • Measure the water collected using the empty plastic bottle.

The water pump could pump about 500 ml in 30 seconds, means it can pump about one liter of water in one minute.

I have also tested the water pump to see how many potted plants it can water. This mini pump can not water more than three plants due to its limited capacity. The specifications of the water pump at Seeedstudio web page below mentions that the working voltage of the water pump is 4 v - 12 v. But the pump did not work well on 12 volts. So use only 6 volt power supply for the pump.


Step 15: Test the Circuit With Water Pump Connected to Edsison

Now our Intel Edison with Moisture Sensor, Bread-board circuit, water pump and Arduino code for the system are ready. Let us test the system in real time.

  • Connect the water pump to the circuit as mentioned earlier. Keep the circuit sketch handy for reference.
  • Also make other necessary connections to the Edison Board
  • Connect Moisture sensor to Analog connector "A0" on the Grove Base Shield
  • Place the Moisture sensor in soil in a cup or any other utensil
  • Run the code. Since the Sensor value in dry soil is less than 300, the water pump will start running.
  • Slowly add water to the soil
  • When the Moisture content of the soil reaches 700 as sensed by the sensor, the water pump will stop.

Our system is working perfectly.

Please watch the video above on testing of the system. I have added a buzzer to the system for clear sound while testing.

Step 16: Make the Circuit With Perforated Board

Let us make our circuit permanent by soldering to a perforated board

What you need

A suitable perforated board.

Perforated boards are thin sheets with pre-drilled holes with 2.54 mm spacing. The holes are ringed by copper pads. There are boards with single side pads and also double sided pads. You can simply insert the electronic components as we did with Bread-Boards. However, here we solder the parts together as per the circuit diagram. Here I have selected a single sided perforated board for assembling the circuit.

  • Select a suitable perforated board and keep the non-padded side up.
  • Insert the TIP 122 Transistor pins on adjacent holes at one end leaving some space.
  • The cathode end of the diode IN 4007 will be connected to Base of the Transistor. Place the diode accordingly
  • Invert the Board and solder all pins to the adjoining copper pads surrounding them. Make sure you are not connecting the adjacent holes or pins while soldering
  • Trim the excess terminal wires using the wire cutter
  • Solder and connect the Base of the Transistor with Cathode end of the Diode
  • Test with multi-meter for any short circuit.

Step 17: Female Pin Headers for the Circuit

In order to connect our circuit with the water pump and Edison, we will add female pin headers of suitable length and solder the component pins to the pin headers.

What you need

A piece of female pin header

The Pin header is an electrical connector where the pins are spaced exactly at the same distance as that of holes in perforated board. A male pin header has pins on both sides where as a female pin header has pins on one side and holes on the other side through which male jumper wires can be inserted.

Though I need only a single row pin header with 4 connector pins, I will make a 6x1 (6 pins x one row) piece of female pin header for our circuit. Here I got a long strip of pin header with me. So we will sacrifice one connector pin and cut the required length.

  • Take a craft pin or needle and push through the seventh hole from one end.
  • A hard push will bring out the connector pin from that location
  • Using a garden shear or a knife cut through the location from where we have removed the connector pin.

Now we got a pin header with 6 connectors

Step 18: Complete and Label the Circuit

Let us number the holes 1 to 6 from left to right for ease of use. Please refer to the sketch above for soldering the components with pin header. When inverted the numbers will be from right to left.

  • Place the 6x1 pin header on the perforated board as shown in the picture and insert the connector pins through the holes.
  • Invert the perforated board with the pin header in place.
  • Connect and solder pin 1 (extreme right on the inverse side) to Anode end of Diode.
  • The pin numbers 2 and 3 will not be used.
  • Connect and solder pin 4 with Collector end of the Transistor
  • Pin 5 and 6 can be connected together and soldered with Emitter end of the Transistor
  • After soldering check for continuity as well for short-circuit with the Multi-meter
  • Cover the soldered portion of the perforated board with insulation tape.

The connection of this circuit with power supply, water pump and Edison board will be as under :

  • Jumper wire from Pin 1 will go to Pin 9 on the Grove Base Shield
  • The (+) ve pole of 6 volt power adapter will be connected to (+) ve pole of water pump (Pole with a red dot)
  • A jumper wire from the (-) ve pole of water pump will be connected to Pin 4 of the circuit
  • The (-) ve pole of 6 volt power supply will be connected to either pin 5 or 6 (Both are soldered together, you can use any pin)
  • A jumper wire from pin 5 or 6 will go to Ground, marked as GRD on the Grove Base Shield

Our circuit is now completed.

Step 19: Make Long Sensor Cable

A longer connector cable for the Moisture sensor is essential so that the entire system can be placed safely away from the plants and prevent accidental spray of water from the pump.

  • Cut a connector cable in to two halves.
  • Select suitable length of four wires.
  • Strip ends of all wires and connect each end to both the halves of connectors.
  • Test with a Multi-meter that the connection at both ends are correct.You can use Heat shrink tubes and insulation tape to secure the connections.

The last picture shows the Moisture sensor attached with a long sensor cable.

Step 20: Protective Case for the Moisture Sensor

As the Moisture Sensor will be placed in soil near the plants, we should also protect the electronic parts of the sensor from accidentally getting damaged with water.

  • Select a suitable plastic case with cover
  • Cut openings for the sensor legs as well the cable
  • Place the Moisture Sensor inside the case as shown in the picture and close with lid.
  • You can also use insulation tap to keep it more safe

Step 21: Plant Your Favorite Flowers

I bought four pieces of these plastic buckets for this project. I will use three of these to plant Roses and one for storing water for the system. Also drilled drainage holes at the bottom of the buckets and planted three rose plants in them

Step 22: Accessories for Pipe Connection

You need the following accessories for making the water pipe connection

  • About 10 feet of 1/4 " size flexible plastic pipe. This is the same type of pipe used in RO/UV water purifiers. It is same size of inlet and outlet of our water pump, so you can very easily connect the pipe line to the pump.
  • "T" connectors for the pipe line about 3 to 4 pieces
  • "L" connectors for the pipe line about 2 to 3 pieces
  • Sugru or "M" Seal to make joints leakproof

Step 23: Pipe Line Connection to Plants

  • Drill holes on top of each bucket for fixing the "T" / "L" connectors. If you do not have a mini drill, you can make holes by heating a sharp metal rod
  • Place "T" / "L" connectors as required in the drilled holes. You can use "T" connector for the first and second & a "L" connector for the last bucket.
  • Fix the connectors to the buckets using Sugru or "M" Seal (Epoxy compound)
  • Place all potted plants side by side and roughly measure the distance between connectors.
  • Cut 1/4 " size water pipe to the required length and join the connectors together as shown
  • Cut three small pieces of 1/4 " pipe and fix them on the inside of the buckets

Our pipe line is now ready

Step 24: Assemble Water Pump

  • The water pump needs to be fixed firmly to a support to prevent it from making jerking movements during start and stop. I have fixed the water pump to a small piece of Acrylic sheet and then nailed it to a wooden stool by drilling holes on the acrylic sheet.
  • Place the wooden stool at the desired position nearer to the potted plants.
  • Place a water-filled bucket below the stool
  • Attach a suitable length of 1/4 " plastic pipe to the inlet of water pump.
  • If you look at the picture above, you can see that the inlet pipe is floating up inside water. So I have used a small piece of hard PVC pipe and inserted the plastic pipe through it. Now the plastic pipe stays straight
  • I have also attached a "L" connector at the pipe end which will help in easy flow of water from bottom of the bucket.

Step 25: Power Supply and Adapters

As we have detached the Edison Board from the computer, we need a separate power adapter to power Edison. Make sure that the rating of the power adapter is 12 volt, minimum 1.5 ampere and the center pin of the adapter is the positive pole.

The power adapter provided with Edison works on 110/120 volts and is not suited for the power supply of 230/240 volts in our place.

A Surge protector with multiple plug points will also help you in connecting 12 volt adapter for powering the Edison and 6 volt adapter for the water pump. The one I got here has four outlets with individual switches for each point.

Step 26: Assemble Edison With Water Pump

  • Place the Edison board with Grove Base Shield and Moisture Sensor near the water pump
  • Insert the Moisture Sensor in soil in the bucket nearer to the water pump
  • Fix the Surge protector at one end of the wooden stool with double sided tape
  • Attach few pieces of double sided tape to the bottom of Edison case and fix on the stool at a suitable place

Step 27: Make Connections and Test

Remember the sketch of the circuit we made earlier, please keep it handy as reference when making connections. Please also refer instructions on Step 18 above.

  • Connect the water supply pipe from the planters to the outlet of water pump
  • Power both Edison and the water pump. It may take less than a minute for the Edison to power up and read data from the Moisture Sensor.
  • As the sensor reading is below 350, our water pump will start and water the plants.
  • The water pump stops when the moisture sensor reading reaches 700.
  • Initially you may find that water supply to all the three plants are not uniform and the first plant may get more water than the last one. To rectify this I made some adjustments in the outlet openings by sealing with Sugru with little openings.
  • There are some leakage of water at few places also. I have rectified the leakage with "M" seal Epoxy compound. After curing, the leakage is stopped.

I have made this arrangement in such a way that the Edison Board with other components like water pump and surge protector can be disconnected from the plants any time by simply detaching the outlet from the water pump

Please watch the video in the introductory part of this instructable on working of this system

Step 28: Bottom Line

I have tried to make this instructable as simple as possible so that anybody can follow the steps involved and replicate it in their home. In case of any doubt or any help required please make a comment and I will be very happy to help to the best of my knowledge.

Very well documented and executed.
<p>Dear Antony , </p><p>i am from India , Tamilnadu , i am interested in growing bonsai plants , i seen ur instruction on Air layering its amazing i just loved it , pls ping me @ kishorejoshuva27@gmail.com , i am 22 years old and love to make home gardening , i wanna to ask u more ques pls pls ping me sir .</p>
I am also from Tamilnadu in Theni District. Please give me a message whenever you are coming to this area.
<p>Very detailed and understandable project thank you!</p>
Thank you...
Sometimes one of the most difficult projects seem so easy to make. This is just because of the perfect and detailed documentation by the author. This is what happening here :)<br><br>I don't believe that you are able to grasp so much about electronics in so less time and write such epic instructables! I salute the efforts you have put in making and presenting this project. Hope that you win :)
Thank you Saiyam... I am still not able to make circuits with PNP type transistors. Hope you may help in this
<p>Sir I can help.Just tell me what you need to do with PNP type transistors.<br>I can tell you the basics of PNP and NPN and when to use one.<br>Thank You!<br>And Congratulations! </p>
<p>thank you <a href="https://www.instructables.com/member/rjawale" style="">rjawale</a>... can you please tell me how I could use PNP type transistor, say TIP 127 in place of TIP 122 in the circuit I made here ?</p>
<p>yes sir.<br>PNP transistors are opposite of NPN. In case of an NPN transistor, a +ve voltage(greater than 0.7V) applied to base turns the transistor to ON state i.e the load in the collector will switch on.Whereas in case of a PNP transistor a low voltage like -ve or ground will turn the PNP transistor ON. <br>Also the biasing techniques change in case of PNP. You have to reverse the polarities in the NPN circuit and change the transistor to PNP.<br>Here's the circuit for both the transistors-<br> PNP transistors are hardly used alone. In case you want some circuit to trigger when a low pulse is applied like in case of many burglar alarms, we use PNP.<br>Also they are used along with NPN transistors in a power amplifier configuration called as complementary symmetry push pull power amp.<br>And the TIP transistors you're are using in your project are darlington pairs. Darlington pairs are two transistors in common collector config. in which you get a very high current gain. Darlington pairs can be NPN and PNP type both. Usage is same as a single NPN or PNP transistor as I have explained above.<br>Why use Darlington pairs?<br>Applications like speaker drivers,motor drives need high current. because they work on electromagnetism principle. They need more current to drive rather than voltage. So we want current to be amplified. And common collector amplifier is used for current amplification. Darlington pair is a cascaded common collector config. which has very high current gain and unity voltage gain.<br>I hope you got it. You can again ask me if you want more details on it. I will send a personal message.</p>
<p>thank you <a href="https://www.instructables.com/member/rjawale" style="">rjawale</a> for your explanation and the circuit diagram. I will go through it and come back to you in case of any clarifications needed</p>
<p>Hi - I'd like your plumbing setup - really need something like that for my plants :) <br><br>I've never seen a diode used like that before though - the current drawn from the pin might be too high for the Edison (you could test with a multimeter in series - should ideally be way way less than the max of 20mA) - normally a resistor would be used there (1K or slightly larger) - and as you are switching a motor you would normally then place the diode across the motor terminals. Like this:</p><p></p><p>https://www.ez-robot.com/Community/Forum/posts.aspx?threadId=3050</p><p><br>The spare PNP transistor you are trying to find a use for is not really suitable for these types of single transistor applications - depending on the circuit you use you may have issues with the maximum voltage motor you can use (5v in this case) or getting the motor to switch off (some more info here: <a href="http://www.w9xt.com/page_microdesign_pt8_pnp_switching.html">http://www.w9xt.com/page_microdesign_pt8_pnp_switc...</a> )<br><br></p><p>If you are short of transistors, you can salvage lots of great power Transistors - including really useful MOSFET transistors from old PC power-supplies if you disassemble them safely.</p>
<p>Thank you for your suggestions and links provided. I will certainly go through them. I am new to electronics and followed the circuit from some documents I downloaded from the net.</p><p>I have lots of old computer parts like power supplies and all. I will try to salvage power transistors from them as suggested by you. I also have MOSFET Transistors (IRF 530) with me. Will try to use it in my future projects.</p>
<p>Your hard work got you in the finals! Congratulations :)</p>
thank you Saiyam...
<p>Congratulations Sir.</p>
<p>thank you deba, congratulations to you too...</p>
<p>Nice basic approach, however, it does not scale well to additional plants. Reason being is that pressure drops across the line will cause a different flow rate at each discharge point. There are equations to solve what the flows at each discharge point will be, however, your basic approach of controlling the pump 'on time' will cause different amounts of liquid in each planter for a given on time. There are at least two solutions: a) vary the diameter of the pipe between each planter to ensure the same volume of water gets to each planter, b) use drip emitters at each discharge point to ensure a constant volume. Drip emitters are sized in gallons/hr, and range from 0.5 gph to 20 gph. The line requires a minimum of 20psi (I believe...dont recall exactly) for the emitters to function at their rated discharge rate. You can try the varying pipe diameter approach but changing the topology will cause you to (most likely) resize the pipes. The emitter approach is more practable and flexible. </p>
<p>thank you... I experienced the problems of all plants not getting the water in equal amounts. As I mentioned in Step 27, I have reduced the openings at different points so that all plants get equal amount of water. However, the drip emitter as suggested by you seems to be a better option</p>
Hi sir....i m indian @ tamilnadu...how your state ?? I need ur friendship sir...my mail <br>mynamebalakrishnan@gmail.com
<p>Hello, I am also from your state. Since you are following me you can get updates of my new instructables in your page</p>
<p>Congratulations, great Instructable ... If you intend to actually use this system while unattended, I strongly recommand to add error detection and safety actions !<br>You could do a &quot;what if&quot; review for typical events (sensor no longer responding, water hose no longer in pot, etc ...) with actions (timer, ...) to avoid unlimited flow of water in your pot / balcony / home ... :-(</p>
<p>thank you very much... I will do reviews as suggested by you as they are very important for the system to work efficiently...</p>
<p>Great instructable !!!!</p><p>I have a question, though : shouldn't you take measurements or soil moisture every 20-30 seconds to give some time to let the soil absorb water ? <br>And cycle through sequences like : measurements / watering for X seconds / timeout to let the soil absorb water - measurements (repeat until measurements reach 700)</p>
<p>Thank you <a href="https://www.instructables.com/member/AlienSKP" style="">AlienSKP</a>...</p><p>Though I have not explained it in step 5, I did exactly as you suggested, not every 20 to 30 seconds, but about 5 or so seconds. I took screen shots of intermediate readings in Serial monitor also but did not post here as they may confuse the reader</p>
<p>OK cool ! I was looking the same kind of automated system to water a garden next spring, I might use your code ! <br>the only difference with what I try to achieve is the size (way bigger) and use of a solenoid valve instead of a pump and the use of a battery/solar panel as main power.</p><p>Thanks for your inspiration !!! </p>
<p>thank you, I am also on the same idea as yours, using a solenoid valve in my next project with MediaTek LinkIt One Board. I have already bought one and tested. This time I will connect it to a permanent water outlet nearby as shown in pictures here</p>
<p>This is cool !!!! you rock</p>
<p>thank you... you are very kind</p>
<p>Great instructable!<br>I can however see a potensial &quot;problem&quot; in your setup...<br>You're using 1 pump to water 3 plants, and if they're different plants they'll probably consume water at different rates. It's a risk that the two plants without sensors will dry out or get too much water... ;-) <br>But it's great starting point!</p>
<p>thank you, yes you are right it's a great starting point. As I mentioned in Step 27, the first plant used to get more water than the other two. So I plugged and adjusted the water flow so that each plant gets equal amount of water. I will monitor the plants and make necessary adjustments in future also. </p>
<p>Neat project and good job on the Instructable. I've played around with a small drip irrigation system at home and ended up doing my own moisture meter but it is still a work in progress. Two thoughts... </p><p>a) If you have a spare diode, it wouldn't hurt to place it across the pump motor to reduce reverse EMF.</p><p>b) I put an inch or so of shrink tubing over the very tops of the two moisture probe tips. It was my hope that by doing that, when the probe is pushed into the soil, also allowing some of the shrink tubing to be covered, there would be less variability in the readings with respect to the probe placement depth (same contact area is always exposed).</p><p>If you end up using the moisture probe for more than a season, you will probably have to replace it since they are expendable. Knowing that, I made stainless steel probe tips for my sensor but even after one season they were toast. The DC sense current caused them to corroded. One tip was like swiss cheese and thinner than tin foil. </p>
<p>Thank you <a href="https://www.instructables.com/member/c.r.h." style="">c.r.h.</a>...</p><p>a) I will do as suggested by you. I got spare diodes with me and I will do a new circuit for future use.</p><p>b) I have covered the electronic parts in a small plastic case to prevent accidental spray of water and pushed the exposed portion of the moisture probe in soil.</p><p>You are right about the moisture probes getting damaged due to prolonged exposure. I will use this system only when we are away from home for an extended period of time. Otherwise we water the plants manually as the plants need watering twice a day and about one liter of water is sufficient for all three plants one time.</p>
<p>It's fun stuff. I use a Linux computer to trigger watering cycles because it was my goal to never have to touch our potted plants for the whole summer. I did have one 'ops' though. During a watering cycle, I had to reboot the computer, a very rare occurrence. Not knowing that the plants were being watered at the time, I only found out hours later. I got an ear-full from my special someone. Live and learn. For safety, maybe a delay-off circuit for the solenoid since mine is on city water.</p>
<p>I did a similar project using simple modules and handmade pump called &quot;Watering houseplants&quot; (text on Russian language)</p><p><a href="http://vip-cxema.org/index.php/home/raznoe/282-sistema-poliva-komnatnykh-rastenij" rel="nofollow">http://vip-cxema.org/index.php/home/raznoe/282-sis...</a></p>
I saw your project. Unfortunately I could not read the contents as it is in Russian
<p>Great, but I agree with the other commenters that using an Intel Edison for this is serious overkill. The same can be done with An Attiny13, or even an opamp.<br><br>You will find that the sensor probably will be eaten away quite quickly by electrolytic corrosion.<br><br>As you are using an Intel Edison that has plenty of ports left, consider adding a variabel resistor that allows you to tune the level where the soil is considered 'dry'<br>You now have hardcoded that value in your program and you will find that over time that value will not be accurate anymore due to fertilizer ions being in the soil and due to corrosion of your sensor<br></p>
<p>thank you very much... I agree with you that Intel Edison is an overkill. I got the Grove Sensor modules and the Intel Edison as a give away from instructables under the theme Environmental &amp; Agriculture. So I have to make the project using Intel Edison.</p><p>Secondly, I will be using this set up when we are away from home for an extended period only. you can simply disconnect the outlet pipe from the water pump and take everything inside for safe keeping. If you look at the photograph in the concluding step, you can very well see that I have an additional pipe line running from a near by water outlet (Extreme Left in the picture). We will normally use this for watering the plants.</p><p>I am new to Intel Edison and Arduino. It took me more than two months going through so many documents and resources available online to make this instructable. So, regarding adding a variable resistor to the setup, if you could point out some reference material from the net that will be very helpful</p>
<p>In fact, if you would buy these two modules: one humidity sensorboard and one relay board for a combined cost of 2.44 euro!!! That already does more than your current set up. Dont get me wrong, it is a great, well detailed instructable, but it is kind of a waste of the Intel Edison, even if it was for free<br></p><p><a href="http://www.aliexpress.com/item/Hot-Selling-Soil-Hygrometer-Humidity-Detection-Module-Moisture-Water-Sensor-for-Arduino-NVIE/32275795794.html">http://www.aliexpress.com/item/Hot-Selling-Soil-Hy...</a> 1.24 euro<br><br><a href="http://www.aliexpress.com/item/5V-one-Channel-Relay-Module-for-arduino-free-shipping-N19/32317893729.html">http://www.aliexpress.com/item/5V-one-Channel-Rela...</a> 1.20 euro</p>
<p>thank you...</p>
<p>Very informative! Thanks sir.</p>
<p>thank you <a href="https://www.instructables.com/member/chrisjlionel" style="">chrisjlionel</a>...</p>
It's amazing sir. I love your writing style. Any one without tech background can easily follow this project. Keep up the good work.
thank you deba...
<p>too much power computing wasted...I mean is not too bad, but you could use something more compact.</p>
<p>can you be more specific...?</p>
<p>Nice project,But can't you replace the Edison with an cheap arduino,using Edison is wasteful,like killing mosquito with cannon. </p>
Thank you.. I have received Intel Edison kit from instructable for making projects. I will post an instructable soon using MediaTek LinkIt One board which is much cheaper than Edison.
<p>Thanks for reply,are Linkit One,Edison using the same code as arduino does?</p>
<p>yes, you can use the same code for both Edison and LinkIt One. Both are based on Arduino Uno</p>

About This Instructable




Bio: I like to make things more simple with easily available resources. My favorite quote: A human being should be able to change a diaper, plan ... More »
More by antoniraj:A Vegetable Cutting Tool From Trash Fresh Home-Made Pasta Using Plunge Cutters Stained Glass Indoor Hanging Flower Pot 
Add instructable to: