The YL-69 Sonda is a soil moisture sensor designed for monitoring water content in soil. It is an essential tool for agriculture, gardening, and environmental monitoring, allowing for precise irrigation control and plant care. The sensor operates by measuring the conductivity between two probes, which varies with moisture level.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V to 5V) |
2 | GND | Ground connection |
3 | AOUT | Analog output signal |
4 | DOUT | Digital output signal (threshold set by potentiometer) |
// Define the sensor's analog and digital pins
const int analogPin = A0; // Analog output from the sensor
const int digitalPin = 2; // Digital output from the sensor
void setup() {
Serial.begin(9600); // Start serial communication at 9600 baud
pinMode(digitalPin, INPUT); // Set the digital pin as input
}
void loop() {
int sensorAnalogValue = analogRead(analogPin); // Read the analog value
int sensorDigitalValue = digitalRead(digitalPin); // Read the digital value
// Print the values to the serial monitor
Serial.print("Analog Value: ");
Serial.print(sensorAnalogValue);
Serial.print(" | Digital Value: ");
Serial.println(sensorDigitalValue ? "Wet" : "Dry");
delay(1000); // Wait for a second before reading again
}
Q: Can the YL-69 Sonda be used with a 3.3V system? A: Yes, the sensor can operate at 3.3V, making it compatible with both 5V and 3.3V systems.
Q: How do I clean the sensor probes? A: Gently wipe the probes with a soft cloth and distilled water. Avoid using any harsh chemicals.
Q: Is it possible to use the sensor in a pot with a plant? A: Absolutely, the YL-69 Sonda is ideal for monitoring moisture in potted plants to ensure optimal watering.
Q: How long can I leave the sensor in the soil? A: While the sensor can be left in the soil for monitoring, it is recommended to remove it when not in use to prevent corrosion.
Q: Can the sensor be calibrated for different soil types? A: Yes, the onboard potentiometer allows for adjusting the threshold to suit various soil types and conditions.