SIMPLE SOIL MOISTURE SENSOR – ARDUINO PROJECT

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.

Arduino soil moisture sensor schematic

Project source code

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);
}

Tags: ARDUINO, PROJECT

Views: 1553

Latest Activity

Jonathan Dean replied to abhishek yadav's discussion how to record time between two events using arduion
"Just remember that millis() will overflow after about 50 days, so there's the potential for…"
yesterday
Jonathan Dean replied to Jonathan Dean's discussion Two LCDs in Parallel?
"Well, I finally got my 16x2 LCDs and a fresh new Nano 3.0. Both LCDs are wired up in parallel (same…"
yesterday
Christian Rheinnecker replied to abhishek yadav's discussion how to record time between two events using arduion
"float preTime = millis(); float afterTime; .... Do your Stuff afterTime = millis(); float YouTime…"
Friday
Christian Rheinnecker posted a status
"New Stuff @arduinoprx.de http://www.arduinoprx.de/"
Thursday
Profile IconWill Fleming, Elijah Patric, Paul R Avery and 4 more joined GarageLab (arduino, electronics, robotics, hacking)
Thursday
GarageLab posted blog posts
Thursday
Christian Rheinnecker posted a video

Arduino PrX : Sequencer AM808 VX3 - Recording a Beat to Atari Mega ST 2 in Cubase 3

In this video you see my AM808 VX3 Midi Sequencer Play a Beat and my Atari Mega ST 2 with Satan Disk NVDI 5 and Cubase 3 is recording a Beat in one Part. It ...
Wednesday
Doug Hyde updated their profile
Wednesday
Profile IconDoug Hyde, Stephen Gray, Mark Evans and 5 more joined GarageLab (arduino, electronics, robotics, hacking)
Wednesday
GarageLab posted a blog post

Airburr Flying Robot Attaches to Walls

Airburr was developed at the Laboratory of Intelligent Systems, a branch of the European École…See More
Tuesday
GarageLab posted a blog post

Arduino robotic hand under $200

Robotic hand is one of most important parts in robot equipment. This is main manipulator that…See More
Monday
Profile IconDavid M Patterson, Jordan Hanger , Jason and 3 more joined GarageLab (arduino, electronics, robotics, hacking)
Monday
abhishek yadav posted a discussion

how to record time between two events using arduion

i have a disk rotating at variable speed(max rpm 600) . i want to know how much time it takes to…See More
May 19
Danny Vigo updated their profile
May 19
Danny Vigo commented on Fernando Gil's blog post Tutorial: Servomotor + Arduino
"Why would you want to connect them in parallel? Are you trying to increase the current? Perhaps to…"
May 18
Danny Vigo replied to SATYA NARAYANA REDDY NIMMAKAYALA's discussion 5 stepper motor control code
"Well if you look in the examples that come included with the Arduino IDE you can find some code…"
May 18
Profile IconEvaristo Ramos, Jr. and Dayan Martinez joined GarageLab (arduino, electronics, robotics, hacking)
May 18
Christian Rheinnecker posted a status
"New Video Cypress Hill - Rap Superstar https://www.youtube.com/watch?v=VZSFgdrhzQQ"
May 18
Christian Rheinnecker posted a video

Arduino PrX : Sequencer AM808 VX3 - Demo Cypress Hill - Rap Superstar Beat Play

Demonstration eines Beats auf dem AM808 VX3 Arduino Midi Sequencer Cypress Hill - Rap Superstar Weiter Infos auf http://arduinoprx.de
May 18
Christian Rheinnecker posted a status
May 18

© 2013   Created by Marcelo Rodrigues.

Badges  |  Report an Issue  |  Terms of Service