Soil Moisture Sensor

Soil Moisture Sensor

Soil Moisture Sensor
TRIOE
IoT
Embedded Systems

The soil moisture sensor is used to measure the moisture content of soil. It is commonly used in gardening, agriculture, and environmental monitoring systems.

Quick Actions

1234

Downloads

567

Likes

Specifications

VCCPower supply (3.3V or 5V, depending on the module)
GNDGround (-)
AOAnalog output signal

Sample Code

#include <MoistureSensor.h>

MoistureSensor moistureSensor;

void setup() {
Serial.begin(9600);
moistureSensor.begin();
}

void loop() {
int moisturePercentage = moistureSensor.readPercentage();

Serial.print("Moisture: ");
Serial.print(moisturePercentage);
Serial.println(" %");

delay(1000);
}

Crash Course: Using the Soil Moisture Sensor

Objective

Teach learners how to use the soil moisture sensor to measure soil moisture, and integrate its readings with a TRIOE microcontroller.

Materials Required

  • Soil Moisture Sensor Module
  • TRIOE
  • Breadboard and jumper wires
  • USB cable for programming the TRIOE
  • Computer with Arduino IDE installed

Steps

1Understand the Soil Moisture Sensor

  • The soil moisture sensor measures the moisture content of soil.
  • Pin Description: VCC: Power supply (3.3V or 5V), GND: Ground, AO: Analog output signal.

2Set Up the Circuit

  • Connect the VCC pin to the TRIOE's 5V.
  • Connect the GND pin to the TRIOE's GND.
  • Connect the AO pin to the TRIOE's analog pin A0.

3Install the Moisture Sensor Library

  • Open the Arduino IDE.
  • Go to Sketch > Include Library > Manage Libraries.
  • Search for 'MoistureSensor' and install the library.
  • Also, install the 'MoistureSensor' library, if prompted.

Video Tutorial: Using the Soil Moisture Sensor

Video Player Placeholder

Common Applications

Application 1

Description of application 1.

Application 2

Description of application 2.

Application 3

Description of application 3.