DIY SOIL MOISTURE SENSOR CHEAP YET ACCURATE !

2,711

14

12

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

Share

    Recommendations

    • Optics Contest

      Optics Contest
    • Plastics Contest

      Plastics Contest
    • Make it Glow Contest 2018

      Make it Glow Contest 2018

    12 Discussions

    0
    None
    ChristianI1

    11 days ago

    Hey ! thanks for this guide. Isn't the drawing from Step 2 wrong ? It says to connect to GND but at the same time to 5V (I know it must be 5v but...)
    Just to prevent some misunderstandings. Keep on with the awesome work tho.

    1 reply
    0
    None
    ParthK2ChristianI1

    Reply 11 days ago

    Hi, sorry for that bro thanks for pointing that out I will take care of these thing from next time

    0
    None
    Droid9117

    Question 6 weeks ago on Step 2

    if you replaced the galvanized nails with stainless steel screws would this improve the corrosion factor?

    1 more answer
    0
    None
    ParthK2Droid9117

    Answer 6 weeks ago

    According to chemistry stainless steel is alloy of iron and carbon where as galvanization is process of electroplating of a metal with zinc as zinc is placed low in activity series it is less prone to oxidation insense rusting than the stainless steel so i will recommend to use galvanised nail or else plated the nail with chromium or nickel. The best way to avoid rust in cheap way is to add some soldier on the sensor. Let me know if you need more help on it

    1
    None
    somEonEneWherE

    3 months ago

    Nice and cheap idea, but in my experiance the big problem with these sensors is corrosion and also galvanized nails will corrode. Do you have experience how long it will take until these are no more usable or need recalibration?

    2 replies
    0
    None
    ParthK2somEonEneWherE

    Reply 3 months ago

    I know that the galvanized nail may also corroded after 6 month the the quick fix is to upgrade to chrominium plate nail or else cover the whole nail with a solder. Talking about calibration it takes 5 min and in most cases it doesn't need calibration

    0
    None
    somEonEneWherEParthK2

    Reply 3 months ago

    Sounds very good,so I think I will try it. And if it lasts 6 Month, this is should be long enough although solder seams to be also cheap and might help.

    Thank you very much for your answer! :)

    0
    None
    ParthK2

    3 months ago

    It needs a little bit of calibration it can be done by taking a soil completely wet making it as reference and to make sure that you have above 95% of moisture if not try changing the distance between probe or change the variable in code

    1
    None
    TirthaK1

    3 months ago

    a very good and innovative idea . well done!

    1
    None
    anujakunjir

    3 months ago

    Nice and innovative great job and your project is pretty economical

    0
    None
    ParthK2DIY Hacks and How Tos

    Reply 3 months ago

    thank you for your beautiful comment let me know if you have any query i'll be happy to help you