

The Water Sensor is a device designed to detect the presence of water or measure moisture levels in various environments. It is commonly used in applications such as leak detection, flood monitoring, soil moisture measurement, and smart home automation systems. The sensor operates by detecting changes in conductivity when water comes into contact with its exposed terminals.








| Pin Name | Description |
|---|---|
| VCC | Power supply pin. Connect to 3.3V or 5V depending on your system voltage. |
| GND | Ground pin. Connect to the ground of your circuit. |
| Signal | Output pin. Provides an analog voltage proportional to water presence or a |
| digital HIGH/LOW signal depending on the sensor's configuration. |
Below is an example of how to connect the Water Sensor to an Arduino UNO:
// Water Sensor Example Code
// This code reads the analog value from the water sensor and prints it to the Serial Monitor.
const int waterSensorPin = A0; // Define the analog pin connected to the sensor
int sensorValue = 0; // Variable to store the sensor reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
sensorValue = analogRead(waterSensorPin); // Read the analog value from the sensor
Serial.print("Water Sensor Value: ");
Serial.println(sensorValue); // Print the sensor value to the Serial Monitor
// Add a small delay to avoid flooding the Serial Monitor
delay(500);
}
No Output or Incorrect Readings:
Fluctuating Readings:
Sensor Not Detecting Water:
Q: Can the Water Sensor be used to measure the water level?
A: The Water Sensor is primarily designed to detect the presence of water, not to measure water levels. For water level measurement, consider using a dedicated water level sensor.
Q: Is the Water Sensor waterproof?
A: No, the sensor is not waterproof. Only the exposed conductive traces are designed to come into contact with water. Avoid submerging the entire module.
Q: How can I increase the sensor's lifespan?
A: Minimize prolonged exposure to water, clean the sensor regularly to prevent corrosion, and store it in a dry environment when not in use.
Q: Can I use the Water Sensor with a 3.3V microcontroller?
A: Yes, the sensor is compatible with both 3.3V and 5V systems. Ensure the VCC pin is connected to the appropriate voltage source.