The Water Level Detection Module (ESP32 M04) is a versatile electronic component designed to measure the level of water in tanks, reservoirs, or other liquid storage systems. It uses sensors to detect the presence or absence of water at various levels and provides output signals for monitoring or control purposes. This module is ideal for applications requiring water level monitoring, such as automated water pumps, irrigation systems, and water tank overflow prevention.
The following table outlines the key technical details of the ESP32 M04 Water Level Detection Module:
Parameter | Specification |
---|---|
Manufacturer | ESP32 |
Part ID | M04 |
Operating Voltage | 3.3V to 5V DC |
Operating Current | ≤ 20mA |
Output Type | Digital (High/Low) and Analog Signal |
Detection Range | 0 to 100% water level |
Sensor Type | Capacitive or Resistive (varies) |
Dimensions | 50mm x 20mm x 10mm |
Operating Temperature | -10°C to 60°C |
Interface | 3-pin (VCC, GND, Signal) |
The module has a 3-pin interface for easy integration into circuits. The pin configuration is as follows:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply input (3.3V to 5V DC). Connect to the positive terminal of the power source. |
2 | GND | Ground connection. Connect to the negative terminal of the power source. |
3 | Signal | Output signal pin. Provides a digital HIGH/LOW or analog voltage based on water level. |
// Water Level Detection Module Example Code
// This code reads the digital and analog output of the module and displays
// the water level status on the serial monitor.
const int signalPin = A0; // Signal pin connected to analog pin A0
const int digitalPin = 2; // Signal pin connected to digital pin 2
void setup() {
pinMode(digitalPin, INPUT); // Set digital pin as input
Serial.begin(9600); // Initialize serial communication
}
void loop() {
int analogValue = analogRead(signalPin); // Read analog signal
int digitalValue = digitalRead(digitalPin); // Read digital signal
// Display analog water level value
Serial.print("Analog Water Level: ");
Serial.println(analogValue);
// Display digital water presence status
if (digitalValue == HIGH) {
Serial.println("Water Detected (Digital Output: HIGH)");
} else {
Serial.println("No Water Detected (Digital Output: LOW)");
}
delay(1000); // Wait for 1 second before the next reading
}
No Output Signal:
Inconsistent Readings:
Analog Output Not Varying:
Digital Output Always HIGH or LOW:
By following this documentation, users can effectively integrate and troubleshoot the ESP32 M04 Water Level Detection Module in their projects.