Water Level Detection Sensor Module
Water Level Detection Sensor Module
DESCRIPTION:
Water sensor brick is designed for water detection, which can be widely used in
sensing rainfall, water level, and even liquid leakage.
Connecting a water sensor to an Arduino is a great way to detect a leak, spill, flood,
rain, etc. It can be used to detect the presence, the level, the volume and/or the
absence of water. While this could be used to remind you to water your plants, there
is a better Grove sensor for that. The sensor has an array of exposed traces, which
read LOW when water is detected.
In this chapter, we will connect the water sensor to Digital Pin 8 on Arduino, and will
enlist the very handy LED to help identify when the water sensor comes into contact
with a source of water.
Specification:
● Operating voltage :. DC5V
● Working current : less than 20mA
● Sensor Type : Analog
● detection area :. 40mm x16mm
PIN CONFIGURATION:
1、”+”: +5VDC
2、“-”: GND
3、“S”: Analog output pin
1/3
Example:
Code:
int adc_id = 0;
int HistoryValue = 0;
char printBuffer[128];
void setup()
{
Serial.begin(9600);
}
void loop()
{
int value = analogRead(adc_id); // get adc value
2/3
sprintf(printBuffer,"ADC%d level is %d\n",adc_id, value);
Serial.print(printBuffer);
HistoryValue = value;
}
}
3/3