0% found this document useful (0 votes)
20 views

Water Level Detection Sensor Module

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 det

Uploaded by

instdesgin23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Water Level Detection Sensor Module

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 det

Uploaded by

instdesgin23
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

● Working temperature :. 10 ℃ -30 ℃

● Operating Humidity : 10% ~ 90 % non -condensing

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

if(((HistoryValue>=value) && ((HistoryValue - value) > 10)) ||


((HistoryValue<value) && ((value - HistoryValue) > 10)))
{

2/3
sprintf(printBuffer,"ADC%d level is %d\n",adc_id, value);
Serial.print(printBuffer);
HistoryValue = value;
}
}

3/3

You might also like