Introduction: DIY SOIL MOISTURE SENSOR CHEAP YET ACCURATE !

I am a plant lover and tech head. Recently I decided to grow some plants on my balcony. I decided to automate the watering system as I may forget to water them I didn't want to take any chance with my beautiful flower plants. so decided to get soil moisture sensor and water the plants accordingly for that matter I'll be using microcontroller I prefer Arduino nano as it is compact you may use another microcontroller.I found a lot of commercial soil moisture sensor which weren't cheap by any means as the idea behind this is pretty simple so in this instructable I take you through the steps of making this soil moisture sensor at cheap and readily available parts a home. I'll also be explaining the science behind the working of the resistive soil moisture sensor that we will be making.

So without any further ado let's get started

Step 1: Gathering the Parts and Tools

Required parts:-

  1. galvanized nails 2" - 2piece
  2. A bottle cap 1" wide - 1 piece
  3. 10k ohm 1/4 watt resistor
  4. few female jumper wires

Required tools:-

  1. Soldering Iron
  2. hot glue gun
  3. solder wire

Step 2: MAKING THE SENSOR

  1. After gathering all the required parts and tools lets get started with our making of a sensor.
  2. grab to nails and punch them through bottle cap 1 inch apart that's necessary the distance between the nails may affect your reading of moisture.
  3. hot glue them on the place.
  4. solder two wire to each nail/probe.
  5. fill the opening of the cap with the hot glue to make it sturdy so we could insert them in the soil.
  6. connect the 10kohm resistor between A0 and GND pin of nano connect it to probe 1 / nail 1 and connect probe 2 / nail2 to a 5v pin of an Arduino.

OOOH YES, THAT'S ALL ABOUT THE SENSOR PART ISNT IT EASY!

Step 3: INTERFACING THE SENSOR WITH AN ARDUINO

  1. upload the code which I have made into your Arduino board
  2. Open the serial monitor and whoola you will see the sensor reading
  3. Now you would modify the code, you may take the variable that has the sensor value and can switch on or off any external components such as water pump and or some other thing just by making the pin high which the sensor value variable is below a certain threshold.

IF YOU WANT ME TO MAKE A INSTRUCTABLE ON THE COMPLETE GARDEN AUTOMATION USING A SUBMERSIBLE MOTOR WHICH IS AGAIN DIY AND TEMP SENSOR DTH11 WITH TRACKING THE STATUS WITH ANDROID APP. PLS LET ME KNOW IN COMMENTS, PLS LIKE AND FOLLOW FOR FURTHER INSTRUCTABLES. COMMENT IF YOU HAVE A QUESTION OR PROBLEMS ILL DEFINITELY HELP YOU!

Step 4: SCIENCE BEHIND THE WORKING OF THE SENSOR

So as you had made the sensor I think its very essential to know the science behind the working of the sensor.

so, the 2 probe that we have created are energized with 5volts and other one grounded so when we will be dipped the sensor into the soil the medium between the 2 probes(soil)will be conductive in the sense the probes receive some electron. but we aren't calculating the current received as calculating is tendious and measuring the resistance between to probes is a lot easier than measuring current and the code is written accordingly to measure the resistance between 2 probes and that will determine the amount of moisture in soil and you may react accordingly be sure to use galvanized nail as it will not corrode easily . The 10kohm resistor between the pins A0 and gnd creates a reference resistance for us to calculate. SO THAT'S IT NOW YOU HAVE CREATED YOUR KNOW MOISTURE DETECTING SENSOR AND NOT JUST THAT YOU KNOW THE SCIENCE THE BEHIND THE ACTUAL WORKING OF THE SENSOR AND THATS A GREAT DEAL SO YOU COULD GIVE YOUR SELF THE TITLE OF TITLE SCIENTIST BUT ITS A LONG WAY TO GO FURTHER LET ME KNOW VIEW ABOUT MY INSTRUCTABLES IN COMMENT DOWN BELOW