The Micron YL-69 Soil Sensor is a device designed to measure the moisture level in soil. It is commonly used in agricultural and gardening applications to ensure optimal watering. By providing real-time data on soil moisture, the YL-69 helps in maintaining the health of plants and optimizing water usage.
Parameter | Value |
---|---|
Operating Voltage | 3.3V - 5V |
Output Voltage | 0V - 4.2V (analog) |
Current Consumption | < 20mA |
Interface | Analog |
Operating Temperature | -40°C to 85°C |
Dimensions | 60mm x 20mm x 5mm |
Pin Number | Pin Name | Description |
---|---|---|
1 | VCC | Power supply (3.3V - 5V) |
2 | GND | Ground |
3 | AOUT | Analog output (voltage proportional to soil moisture) |
Arduino UNO
+---------+
| |
| A0 |<------ AOUT (YL-69)
| |
| 5V |<------ VCC (YL-69)
| |
| GND |<------ GND (YL-69)
+---------+
// Include necessary libraries
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud rate
pinMode(A0, INPUT); // Set A0 as an input pin
}
void loop() {
int sensorValue = analogRead(A0); // Read the analog value from the sensor
float voltage = sensorValue * (5.0 / 1023.0); // Convert the analog value to voltage
Serial.print("Soil Moisture Voltage: ");
Serial.println(voltage); // Print the voltage to the serial monitor
delay(1000); // Wait for 1 second before taking another reading
}
Q: Can the YL-69 be used with other microcontrollers? A: Yes, the YL-69 can be used with any microcontroller that has an analog input pin.
Q: How deep should the sensor be placed in the soil? A: The sensor should be placed at the root level of the plants for accurate moisture readings.
Q: How often should the sensor be calibrated? A: Calibration frequency depends on the soil type and environmental conditions. Regular calibration is recommended for best results.
This documentation provides a comprehensive guide to using the Micron YL-69 Soil Sensor. Whether you are a beginner or an experienced user, following these instructions will help you effectively measure soil moisture and optimize your watering practices.