The soil moisture sensor is used to sense the moisture of soil.
Moisture is volumetric water content of soil which is measured by soil moisture sensor and is provided as an output in form of percentage.
Soil moisture sensor ideal for performing projects on agriculture or soil science.
Project description:
In this project we are going to work with soil moisture sensor and will be recording its output on serial monitor.
Specifications:
PIN Description:
Soil Moisture sensor FC-28 has four pins
Steps:
Step 1:
Connect soil moisture sensor to Arduino
Connections:
Step 2:
Upload the code
int sensor_pin = A0;
int output_value ;
void setup() {
Serial.begin(9600);
Serial.println(Reading From the Sensor ...);
delay(2000);
}
void loop() {
output_value= analogRead(sensor_pin);
output_value = map(output_value,550,0,0,100);
Serial.print("Mositure:");
Serial.print(output_value);
Serial.println(%);
delay(1000);
}
Step 3:
Open serial monitor
Conclusion:
You can see the value being printed on serial monitor which is amount of moisture in the soil.