Interfacing Soil Moisture Sensor with Arduino

interfacing soil moisture sensor with arduino

Interfacing Soil Moisture sensor with Arduino

Soil Moisture sensor is used to determine the moisture in the soil, this sensor is specially used for agriculture purpose.

interfacing soil moisture sensor with arduino

The pins are already mentioned on the backside of the module. It contains 4 pins and a potentiometer.

Interface the sensor with any microcontroller using the Analog-to-Digital converter (ADC) Pin or A0, or connect the digital pin (D0) of the sensor to any digital pin of a microcontroller.

The threshold for digital pin can be set by using potentiometer available in the module.

 

Connections using Analog Pin A0:

Pins on Soil Moisture Module Arduino UNO/ Mega
VCC 5V
GND GND
D0
A0 A1

 

Arduino Code:

void setup() {

Serial.begin(9600);
}

void loop() {

Serial.println(analogRead(A1));
delay(500);
}

 

Results/ Output:

interfacing soil moisture sensor with arduino

Related Links:

Leave a Reply

Your email address will not be published.