Moisture_Sensor_(SKU_SEN0114) - jimaobian/DFRobotWiki GitHub Wiki

right

Introduction

This moisture sensor can read the amount of moisture present in the soil surrounding it. It's a low tech sensor, but ideal for monitoring an urban garden, or your pet plant's water level. This is a must have tool for a connected garden!

This sensor uses the two probes to pass current through the soil, and then it reads that resistance to get the moisture level. More water makes the soil conduct electricity more easily (less resistance), while dry soil conducts electricity poorly (more resistance).

It will be helpful to remind you to water your indoor plants or to monitor the soil moisture in your garden.

Specification

  • Power supply: 3.3v or 5v
  • Output voltage signal: 0~4.2v
  • Current: 35mA
  • Pin definition:
    • Analog output(Blue wire)
    • GND(Black wire)
    • Power(Red wire)
  • Size: 60x20x5mm
  • Value range:
    • 0 ~300 : dry soil
    • 300~700 : humid soil
    • 700~950 : in water

Usage

Moisture sensor Connection diagram

/*
  # Example code for the moisture sensor
  # Editor     : Lauren
  # Date       : 13.01.2012
  # Version    : 1.0
  # Connect the sensor to the A0(Analog 0) pin on the Arduino board

  # the sensor value description
  # 0  ~300     dry soil
  # 300~700     humid soil
  # 700~950     in water
*/

void setup(){

  Serial.begin(57600);

}

void loop(){

  Serial.print("Moisture Sensor Value:");
  Serial.println(analogRead(A0));
  delay(100);

}

Open the Arduino Serial Monitor, and choose its baud rate 57600 as set in the code.

image:DFR0355 serial monitor in Arduino IDE.png

image:SEN0114 serial monitor Observe.png

More

:link=http://www.dfrobot.com/ shopping online from dfrobot store or dfrobot distributor. category: Product Manual category: DFR Series category: Sensors category:source category:Diagram

⚠️ **GitHub.com Fallback** ⚠️