This product measures soil moisture levels by capacitive sensing, rather than resistive sensing like other types of moisture sensor. It is made of a corrosion resistant material giving it a long service life. Insert it into soil and impress your friends with the real-time soil moisture data!
The product includes an on-board voltage regulator which gives it an operating voltage range of 3.3 ~ 5.5V. It is compatible with low-voltage MCUs (both 3.3V and 5V logic). To make it compatible with a Raspberry Pi, an ADC converter is required.
Features
- Supports Gravity 3-Pin interface
- Analog output
Applications
- Garden plants
- Moisture detection
- Intelligent agriculture
Specifications
- Operating Voltage: 3.3 ~ 5.5 VDC
- Output Voltage: 0 ~ 3.0VDC
- Interface: PH2.0-3P
- Dimension: 98mm * 23mm (3.86in x 0.905in)
References
Sample Code
/*************************************************** This example reads Capacitive Soil Moisture Sensor. ****************************************************/ const int AirValue = 520; //you need to replace this value with Value_1 const int WaterValue = 260; //you need to replace this value with Value_2 int intervals = (AirValue - WaterValue)/3; int soilMoistureValue = 0; void setup() { Serial.begin(9600); // open serial port, set the baud rate to 9600 bps } void loop() { soilMoistureValue = analogRead(A0); //put Sensor insert into soil if(soilMoistureValue > WaterValue && soilMoistureValue < (WaterValue + intervals)) { Serial.println("Very Wet"); } else if(soilMoistureValue > (WaterValue + intervals) && soilMoistureValue < (AirValue - intervals)) { Serial.println("Wet"); } else if(soilMoistureValue (AirValue - intervals)) { Serial.println("Dry"); } delay(100); }