Introduction: Soil Moisture Sensing - SF

To begin the test plan, we started with our goal which was to design a device that would be able to detect whether or not a sample of soil is wet from rain or not. To execute this plan, we had to learn how to properly use and set up a soil moisture sensor with an Arduino.

Step 1: Step One: Gather Materials

To begin designing the soil moisture sensor, we started by gathering our materials:

  1. Sparkfun Soil Moisture Sensor
  2. USB cable
  3. Bread board
  4. 2 Beakers for the different soils
  5. Dry soil
  6. Moist Soil
  7. 2 LED's (Blue/Yellow)
  8. Several Jump Wires
  9. Arduino UNO
  10. Computer

Step 2: Step Two: Constructing the Circuit

Next, we had to construct our circuit by connecting the soil moisture sensor to the Arduino. To do so, you should get the Arduino board and get ready to start connecting the jump wires and moisture sensor so you can get started. After you construct the circuit as shown in the picture above, upload on Arduino and open the Serial Monitor. After doing so you should start to see a value that is in the range of 0 when the sensor is not in contact with anything. If you want to make sure that the sensor is doing what it is suppose to, grab the probes with your hands to make sure that the probes sense moisture, the reason it works is because the moisture from your body is enough for the sensor to detect and have a reaction. Once you're done constructing the circuit, make sure to connect the rest of the LEDs and wires for it to work. It should be so that when the soil is moist, the yellow LED will light up, and if it is dry the blue LED will light up.

Step 3: Step Three: Entering Your Code

When starting to add your code for your soil moisture sensor use the code above as a reference for your circuit and Arduino setup. When using this code, also remember to add an "if then" statement which will indicate that if the soil is under a certain value it's not moist and over it is. We obtained this code from the source: SparkFun.

Step 4: Step Four: Finalize + Output

Now it is time to make sure the soil moisture sensor works. To start, have two separate samples of soil readily available, one sample of soil being wet and the other dry. First, put the soil moisture sensor in the wet soil. If the yellow LED lights up, then the sensor works. Dry off the sensor, and test to see if it works for the dry soil. Place the soil moisture sensor in the sample of dry soil, if the blue LED lights up, then the sensor works for the dry soil as well.