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.
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:
Related Links:
- Interfacing GPS Shield for Arduino(ublox NEO-6M-0-001) with Arduino Mega 2560
- Downloading a webpage from internet using Arduino
- Increasing the length of Serial Buffer in Arduino
- Interfacing SIM900D GSM Module Board with Arduino Mega 2560
- Master RESET ESP8266 Wifi Module using Arduino mega 2560
- Interfacing Accelerometer ADXL345 (GY-291) with Arduino UNO/ Mega
- Getting feeds from ThingSpeak using ESP8266 and Arduino
- Reset Arduino using Programming
- Interfacing MPL3115A2 Altitude Sensor with Arduino UNO/ Mega
- Bluetooth HC-05, HC-06 Command/ Master Mode and AT Commands
- Interfacing Bluetooth Modules HC-05, HC-06, JY-MCU BT_BOARD v1.02 and v1.03 with Arduino Uno and Arduino Mega 2560
- Bluetooth Error Codes: