fbpx

Interface Soil Sensor with Arduino Uno

Soil sensor measure the water content in soil.

  • The Soil Sensor is used to measure the volumetric water content of soil.
  • Soil moisture sensor has two probe through which current passes in soil.
  • Then read the resistance of soil to know the moisture level.
  • Water make the soil more prone to electric conductivity resulting less resistance in soil where on the other hand dry soil has poor electrical conductivity thus more resistance in soil.
  • Using these properties of electricity the sensor is designed.
  • Inside the sensor there are circuitry for measuring the resistance and converting it into voltage as output.

Application

  • Irrigation controller.
  • Gardening.

Hardware Required

  • Soil Sensor.
  • Arduino.

Pinout

  • VCC: +5v.
  • Gnd: Gnd.
  • OutPut: Digital.

Circuit

Code

 const int VAL_PROBE = A0;
 const int MOISTURE_LEVEL = 250;
 void setup()
 {
 Serial.begin(9600);
 }
 void loop()
 {
 int moisture = analogRead(VAL_PROBE);
 Serial.println(moisture);
 if(moisture > MOISTURE_LEVEL)
 {
 Serial.print("MOISTER");
 }
 else
 {
 Serial.print("NO MOISTER");
 }
 delay(100);
 } 

Leave a Reply

Your email address will not be published. Required fields are marked *