Water Level Detection Sensor Module
Water Level Detection Sensor Module
Overview
In this lesson, you will learn how to use a water level detection sensor module.
This module can perceive the depth of water and the core component is an
amplifying circuit which is made up of a transistor and several pectinate PCB
routings. When put into the water, these routings will present a resistor that can
change along with the change of the water’s depth. Then, the signal of water’s depth
is converted into the electrical signal, and we can know the change of water’s depth
through the ADC function of MEGA2560 R3.
Component Required:
(1) x Elegoo Mega2560 R3
(3) x F-M wires (Female to Male DuPont wires)
(1) x Water lever detection sensor module
Component Introduction
Water sensor:
A water sensor brick is designed for water detection, which can be widely used in
sensing the rainfall, water level, even the liquate leakage. The brick is mainly
composed of three parts: an electronic brick connector, a 1 MΩ resistor, and several
lines of bare conducting wires.
This sensor works by having a series of exposed traces connected to ground.
Interlaced between the grounded traces are the sense traces.
The sensor traces have a weak pull-up resistor of 1 MΩ. The resistor will pull the
sensor trace value high until a drop of water shorts the sensor trace to the grounded
trace. Believe it or not this circuit will work with the digital I/O pins of your
MEGA2560 R3 board or you can use it with the analog pins to detect the amount of
water induced contact between the grounded and sensor traces.
This item can judge the water level through with a series of exposed parallel wires
stitch to measure the water droplet/water size. It can easily change the water size
to analog signal, and output analog value can directly be used in the program
function, then to achieve the function of water level alarm.
131 / 223
It has low power consumption, and high sensitivity.
Features:
1、Working voltage: 5V
2、Working Current: <20ma 3、
Interface: Analog
4、Width of detection: 40mm×16mm
5、Working Temperature: 10℃~30℃
6、Output voltage signal: 0~4.2V
Connection
Schematic
132 / 223
Wiring diagram
133 / 223
Wiring tips: Power supply (+) is connected to 5V of MEGA2560 R3 board, ground
electrode (-) is connected to GND. Signal output (S) is connected to the ports (A0-
A5) which have function of inputting analog signal in MEGA2560 R3 board, random
one is OK, but it should define the same demo code as the routine.
Code
After wiring, please open the program in the code folder- Lesson 18 Water Level
Detection Sensor Module and click UPLOAD to upload the program. See Lesson 2
for details about program uploading if there are any errors.
Example picture
134 / 223
Open the monitor then you can see the data as below:
Click the Serial Monitor button to turn on the serial monitor. The basics about the serial
monitor are introduced in details in Lesson 1.
135 / 223