Introduction: Soil Moisture Sensor Plan

Do you know how to measure the wetness of soil for your plants? Have you ever wondered how dry your plants are during the summer time? Well Soil Moisture Sensor is here to solve all your gardening problems!

Soil Moisture Sensor is a sensor to monitor and measure the amount of wetness and dryness in the soil in reference to temperature and moisture. Soil Moisture Sensor is used by Farmers and gardeners throughout the US. This sensor is affordable and can be used by all grades and ages.

The goal is of the moisture sensor is to measure the amount of water content of soil. Thus, we will teach you step by step on how to function the water sensor!

Click the arrow to continue !

Step 1: Step 1: Gathering Your Materials

Planning and gathering your tools is always the most important part on a project. From downloading the right software, to your gathering your ideas on paper. For the Soil Moisture Sensor, the materials needed are 3 different color wires (we will be using yellow,blue,and red), a wire to connect to the computer, download the arduino software (copy and paste to download: https://www.arduino.cc/en/Main/Software) and most importantly, the soil moisture sensor tool.

Task for each tool:

1) Soil moisture sensor will be used to measure the moisture of the soil

2)The wires will be used to connect the soil moisture to the breadboard

3) One computer wire will used to connect the breadboard to the computer

4) The ardunio software will be used to construct the code

Step 2: Let's Begin!

What you will need for Step 2:

1) Breadboard

2) 3 different colored wires

3) Soil Moisture Sensor tool

To begin, connect your first wire (red wire) to the digital input 7. The second wire, (black wire) to the ground. The third wire, should be on the analog pin AO. However, make sure your code has the code depicted on the image, or else it will not read on the sensor correctly.

The connecting the wires on to the breadboard and the soil moisture sensor is very important. One mistake can disturb your data as a whole.

Ask your teacher or partner for help when needed.

Step 3: Step 3: Code and Data

You first need a breadboard like this, it need to connect computer that contends an arduino program. use 3 wires to connect the breadboard and the sensor, (see next step), connect them to the computer, and run the program:

int val = 0; //value for storing moisture value
int soilPin = A0;//Declare a variable for the soil moisture sensor int soilPower = 7;//Variable for Soil moisture Power

//Rather than powering the sensor through the 3.3V or 5V pins, //we'll use a digital pin to power the sensor. This will //prevent corrosion of the sensor as it sits in the soil.

void setup() { Serial.begin(9600); // open serial over USB

pinMode(soilPower, OUTPUT);//Set D7 as an OUTPUT digitalWrite(soilPower, LOW);//Set to LOW so no power is flowing through the sensor }

void loop() { Serial.print("Soil Moisture = "); //get soil moisture value from the function below and print it Serial.println(readSoil());

//This 1 second timefrme is used so you can test the sensor and see it change in real-time. //For in-plant applications, you will want to take readings much less frequently. delay(1000);//take a reading every second } //This is a function used to get the soil moisture content int readSoil() {

digitalWrite(soilPower, HIGH);//turn D7 "On" delay(10);//wait 10 milliseconds val = analogRead(soilPin);//Read the SIG value form sensor digitalWrite(soilPower, LOW);//turn D7 "Off" return val;//send current moisture value }

Step 4: Step 4: Connecting Your Circuit

Use 3 wires to connect the sensor with the breadboard. first use a wire to connect the SIG on the sensor with A0 on the breadboard, then take a second wire to connect both GND together, and then connect ACC with 7. see the picture

Use a wire to connect the breadboard with computer, open the arduino program. Then copy and paste the code, click the arrow to run.

Next go to the tool bar, click on the "tools" bar, and go to "serial monitor". You will see a tab pop-up and have numbers on it.

Step 5: Step 5: Dry Soil

Put the sensor in completely dry soil, make sure the wires are not falling of, read the numbers appeared on the serial monitor. For completely dry soil, the numbers should be 0.

it is very important to test completely dry soil first, this helps to test the accuracy of the soil sensor, if the number appears on the monitor is not 0, then it means either your sensor is off, or the soil is not completely dry.

if this happens, repeat previous steps to see is there any mistakes, and get new dry soil to test it.

(remember a little water would affect the data for dry soil.

Step 6: Step 6: Wet Soil

Next put the sensor in water to test the max. In complete water, the number should be around 900.

So here are ranges you might get for your soil:

completely dry: 0

dry with drops of water: <100-130

wet: 400-890

water: 900

Step 7: Works Cited

Soil Moisture Sensor Hookup Guide:

“SparkFun Soil Moisture Sensor.” Learn at SparkFun Electronics.

Main Software:

Arduino - Software, www.arduino.cc/en/Main/Software.