The Módulo Sensor Nivel De Agua Detección De Lluvia Clima (Yl-83), manufactured by ESP32, is a water level sensor module designed to detect rain and monitor water levels. It is commonly used in weather stations, irrigation systems, and other environmental monitoring applications. The module provides an easy way to automate responses based on environmental conditions, such as triggering alerts during rainfall or controlling water pumps in irrigation systems.
This sensor is ideal for projects requiring real-time water level or rain detection, making it a popular choice for hobbyists and professionals alike.
The module consists of two parts: the sensor board and the control board. The control board has the following pin configuration:
Pin Name | Type | Description |
---|---|---|
VCC | Power Input | Connect to 3.3V or 5V DC power supply. |
GND | Ground | Connect to the ground of the power supply. |
DO | Digital Output | Outputs HIGH (1) or LOW (0) based on the threshold set by the potentiometer. |
AO | Analog Output | Outputs an analog voltage proportional to the water level or rain intensity. |
VCC
pin to a 3.3V or 5V power source and the GND
pin to ground.DO
pin to a digital input pin on your microcontroller.AO
pin to an analog input pin on your microcontroller.Below is an example code snippet to interface the Yl-83 module with an Arduino UNO:
// Define pin connections
const int digitalPin = 2; // Digital output (DO) from the sensor
const int analogPin = A0; // Analog output (AO) from the sensor
void setup() {
pinMode(digitalPin, INPUT); // Set digital pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
// Read digital output
int digitalValue = digitalRead(digitalPin);
// Read analog output
int analogValue = analogRead(analogPin);
// Print values to the Serial Monitor
Serial.print("Digital Output: ");
Serial.println(digitalValue); // 1 = Dry, 0 = Wet
Serial.print("Analog Output: ");
Serial.println(analogValue); // Proportional to water level/rain intensity
delay(500); // Wait for 500ms before next reading
}
No Output Signal:
Inconsistent Readings:
Control Board Damage:
Analog Output Not Changing:
Q: Can the sensor board be submerged in water?
A: No, the sensor board is designed for surface water detection only. Submersion may damage the module.
Q: How do I increase the sensitivity of the sensor?
A: Use the onboard potentiometer to adjust the sensitivity. Turn it clockwise to increase sensitivity and counterclockwise to decrease it.
Q: Can this module be used with a 3.3V microcontroller like ESP32?
A: Yes, the module is compatible with both 3.3V and 5V systems, including ESP32 and Arduino.
Q: What is the difference between the digital and analog outputs?
A: The digital output provides a HIGH/LOW signal based on the threshold, while the analog output gives a proportional voltage representing water level or rain intensity.
This documentation provides a comprehensive guide to using the Módulo Sensor Nivel De Agua Detección De Lluvia Clima (Yl-83). By following the instructions and best practices, you can effectively integrate this sensor into your projects for reliable water level and rain detection.