Skip to main content

Moisture Sensor interface with Arduino

Moisture sensor is used to detected the presence of water in soil. This project is used to Test the moisture level in the farming land.This sensor is easy to use and applicable for the commercial farming.
Fig :- Moisture Sensor Module


Component Required 
  1. Moisture Sensor Module
  2. Arduino UNO
  3. Motor for irrigation(here we use LED for Testing) 
  4. PC  

Objectives
  1. To Calculate the Moisture Level in Soil

Circuit Diagram
Fig :- Circuit Diagram 
Connect the component as shown in the figure.Connect A0 pin of sensor to A0 pin of Arduino , VCC to 3.5V  and GND pin to GND pin of Arduino. Connect led in 12 pin of arduino to view the output.

Code 
int led =13;
int Moisture_sensor = A0;
void setup()
{ pinMode(led,OUTPUT);
   pinMode(Moisture_sensor,INPUT);
   Serial.begin(9600);
}
void loop()
{
  int value = analogRead(Moisture_sensor);
{
   Serial.println(value);
  if (value>500)
 {
  digitalWrite(led,HIGH);
 }
else
 {
 digitalWrite(led,LOW);
}
}
}
Sensor show its value low in the presence of moisture and its value is gradually increase in the absence of moisture.
Here when the sensor reading is higher then 500 then the LED is turn ON .



Popular posts from this blog

warm clothes distribution program

‘ Small step can make a big difference ’ Rural Women Development Centre from morang,Nepal distributed the warm clothes to the needy people. They manage it possible by collecting fund from working staffs and management committe. Here is the video link of the distribution program. https://youtu.be/AxaHbivcQUM

Multiple mcp23017 interfacing with Arduino

MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple  mcp23017 with arduino.  fig:- mcp32017 module IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7. first of all we are going to interface the single mcp23017 with Arduino. For this  connect the circuit as shown on figure. Download the library for mcp23017  from  sketch-- include library -- manage libraries.

How to open ppt file in C# desktop app