What is soil moisture ?
Soil moisture is the measurement of how much water present in perticular amount of soil .Soil moisture play vital role of growth of any plant . Some plant need higher moisture and some need lower .Soil moisture Content is measured in m3.m-3 (so how much of a cubic metre is water out of the entire cubic metre of soil sample). Or you can simply measure it in percentage .
soil moisture sensor
There are different kind of soil moisture sensor available in market . These are generally analog in nature .They give analog output between 0-5 volt according to the water present in soil .Out of three pin two pin are used for power source and from third pin we can take analog output and microcontroller after converts its output in digital form
circuit diagram of soil moisture sensor with atmega 32 microcontroller
and the code for it is shown in below . no code explanation is needed because i have already explained it in adc section of AVR
if you didn't understand any thing please feel free to comment below .
please comment here if you do not have any output and let us help each other