CADSample

  • Free Dwg
  • Cad Blocks
  • SolidWorks
  • 3D Models
  • Inventor
Home Arduino Soil Moisture Sensor with Arduino

Soil Moisture Sensor with Arduino

Soil Moisture Sensor with Arduino

This is a simple arduino project for a soil moisture sensor that will light up a LED at a certain moisture level. It uses Arduino Duemilanove microcontroller board. Two wires placed in the soil pot form a variable resistor, whose resistance varies depending on soil moisture. This variable resistor is connected in a voltage divider configuration, and Arduino collects a voltage proportional to resistance between the 2 wires.

Insert the 2 probes (wires, pcb) in the dry soil and measure the resistance value and then pour water and measure it again.
Use a mid value for the resistor (eg: 50kΩ for 100kΩ in dry soil and 10kΩ in wet).

The other method to find the resistor’s value is to try different values or use a potentiometer. Insert the probes into the soil that has the desired moisture when to light up the LED and signal that the plant needs water.

Adjust the potentiometer and see the point at which it starts to light. Measure the potentiomenter current value and replace it with a fixed resistor.

const int VAL_PROBE = 0; // Analog pin 0

const int MOISTURE_LEVEL = 250; // the value after the LED goes ON

void setup() {

Serial.begin(9600);

}

void LedState(int state) {

digitalWrite(13, state);

}

void loop() {

int moisture = analogRead(VAL_PROBE);

Serial.println(moisture);

if(moisture > MOISTURE_LEVEL) {

LedState(HIGH);

} else {

LedState(LOW);

}

delay(100);

}

 

Feb 21, 2016
Arduino MEGA 24 LED Knight Rider DisplayArduino Based Part Fill Automatic Valve
  You Might Also Like  
 
Arduino UNO Pin Diagram
 
Arduino Based Part Fill Automatic Valve
 
Arduino Thermometer
 Recent Post 
  • Anime Girl Free Dwg
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Knight Free Dwg Drawing
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Free Big Hospital Architecture Project
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Free Private Jet Dwg
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Free Knifes Cad Blocks
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Fighter Jet Su 35
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
  • Baby Stroller DWG Drawing
    In AutoCad
    Example of AutoCAD drawing in DWG format. Drawing […]
2016 © CADSample.Com Free Dwg Free Cad Blocks
Go to mobile version