Moisture Sensor Working and its Applications

Moisture Sensor Working and its Applications

The soil moisture sensor or the hygrometer is usually used to detect the humidity of the soil. So, it is perfect to build an automatic watering system or to monitor the soil moisture of your plants. The sensor is set up by two pieces: the electronic board (at the right), and the probe with two pads, that detects the water content (at the left).
The sensor has a built-in potentiometer for sensitivity adjustment of the digital output (D0), a power LED and a digital output LED, as you can see in the following figure.
The voltage that the sensor outputs changes accordingly to the water content in the soil.

When the soil is:

Wet: the output voltage decreases
Dry: the output voltage increases

Moisture Sensor

The output can be a digital signal (D0) LOW or HIGH, depending on the water content. If the soil humidity exceeds a certain predefined threshold value, the modules outputs LOW, otherwise it outputs HIGH. The threshold value for the digital signal can be adjusted using the potentiometer. The output can also be an analog signal and so you’ll get a value between 0 and 1023.

ALL SENSOR DETAILS:
1. HC-05 – Bluetooth
2. Mpu 6050 accelerometer-gyroscope- -module
3. Flame-sensor
4. Rotary-encoder
5. Force-sensor-fsr400
6. Current-sensor-acs712
7. Flex-sensor
8. IR-sensor-tcrt5000
9. Pulse-sensor-pin
10. Color-sensor-tcs230
11. SD-card-module
12. Oled-with-arduino
13. Addressable-rgb-led-strip-ws1812
14. Relay-module
15. TFT-1-8-display-st7735r
16. 8×8-dot-matrix-display-max7219
17. Smoke-sensor-mq-2
18. Ultrasonic-sensor-HC-sr04
19. PIR-motion-sensor-hc-sr501
20. Tilt-sensor-sw-520d
21. Microphone-sound-sensor
22. Reed-switch-reed-sensor
23. Rfid-reader-Em18
24. Rfid-tag
25. RTC-real-time-clock-ds1307
26. Temperature-sensor-ds18b20
27. Moisture-sensor
28. Rain-sensor
29. Pressure-sensor
30. Accelerometer
31. MOC-3021-circuit
32. DHT11-DHT22-temperature-and-humidity-sensor
The advantages and disadvantages:
Advantages:
1. Can be connected to a range of DC loggers (DC Output signal)
2. Relatively inexpensive when compared to other measurements
3. Accurate after specific soil calibration
Disadvantages:
1. Only covers a small sensing area
2. Requires good contact between the soil and the sensor
3. Installation requires care to ensure there are no air gaps
4. Larger sensitivity to temperature, clay content and air gaps than other sensor types

MOISTURE SENSOR WITH ARDUINO.

In this example, you’ll read the analog sensor output values using the Arduino and print those readings in the Arduino IDE serial monitor.
Upload the following sketch to your Arduino board:

CODE:
int rainPin = A3;
int greenLED = 5;
int redLED = 6;
// you can adjust the threshold value int thresholdValue = 800;
void setup()
{
pinMode(rainPin, INPUT);
pinMode(greenLED, OUTPUT);
pinMode(redLED, OUTPUT);
digitalWrite(greenLED, LOW);
digitalWrite(redLED, LOW);
Serial.begin(9600);
}
void loop()
{
// read the input on analog pin 3:int sensorValue = analogRead(rainPin);Serial.print(sensorValue);
if(sensorValue < thresholdValue)
{
Serial.println(” – Doesn’t need watering”);
digitalWrite(redLED, LOW);
digitalWrite(greenLED, HIGH);
}
else
{
Serial.println(” Time to water your plant”);
digitalWrite(redLED, HIGH);
digitalWrite(greenLED, LOW);
}
delay(500);
}
Open the Arduino IDE serial monitor to see the values. Then, try your sensor in a wet and in a dry soil and see what happens.

Subramanian
Subramanian

Subramanian MK, currently serving as a workshop instructor at Sakthi Polytechnic College, Erode Tamil Nadu. With a career spanning 25 + years, Subramanian MK has dedicated himself to advancing knowledge in Electronics and Communication Engineering (ECE). His passion for exploring new technologies has led to the development of numerous projects, showcasing expertise in IoT and PCB design.

Articles: 514

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

×

Hi, How can I help you?

×