UNIVERSITY OF TOBRUK
FACULTY OF ENGINEERING
DEPARTMENT OF ELECTRICAL ENGINEERING
Water Level Indicator
Interfacing water level sensor with Arduino
Prepared by:
Ismail Mohammed F17479
Under the supervision of:
Mrs. Wafa M. Abied
Introduction
"Water Level Indicator: Interfacing Water Level Sensor With Arduino." In this
step-by-step tutorial, we will walk you through the process of building a water
level indicator using an Arduino board and a water level sensor. With this
project, you will gain valuable insights into water management and
conservation , making a positive impact on the ongoing water crisis.
Goals
To address the water crisis and promote water conservation at an individual
level, the water level indicator project using Arduino comes to the rescue. This
mini water management system allows you to monitor the water level in your
water tank effectively. By interfacing the water level sensor with the Arduino
UNO, you can build a simple yet efficient water level indicator that provides
real-time information about the water level in the tank to ensuring timely
refilling or pumping as needed. This empowers you to make informed
decisions about water usage and avoid unnecessary wastage.
The water level indicator can be used in residential buildings, industries,
agriculture, and even in water tanks of remote areas where water supply is
scarce.
Components
To build the water level indicator , you will need the following components :
Water level sensor
The water level sensor is a critical component of the water level indicator
project.
The sensor operates based on the principle of variable resistance. As more
water is present in the tank and the sensor is submerged, the conductivity
increases, leading to lower resistance. Conversely, less water results in
higher resistance. The sensor's analog output is proportional to the
resistance, allowing you to determine the water level.
1
Arduino Uno
Jumper wires
LEDS (Red, Yellow, Green)
Resistors
Breadboard
Each component plays a vital role in the functionality of the water level
indicator. the Arduino Uno processes the sensor data, and the LEDs provide
visual indications. Jumper wires, resistors, and the breadboard ensure proper
connections and circuit stability.
Steps
Wiring a Water Level Sensor to the Arduino
To begin, connect the + (VCC) pin on the module to 5V on the Arduino and the
– (GND) pin to ground.
One well-known issue with these sensors
is that they have a shorter lifespan because
they are constantly exposed to moisture.
Moreover, constantly applying power to
the sensor while immersed in water
significantly accelerates the rate of corrosion.
To avoid this, it is recommended that the sensor be turned on only when taking
readings.
One easy way to do this is to connect the sensor’s power pin to a digital pin on
an Arduino and set it to HIGH or LOW as needed. So, we’ll connect the +
(VCC) pin to the Arduino’s digital pin #7.
Finally, connect the S (Signal) pin to the Arduino’s A0 ADC pin.
Wiring
Connect three LEDs to digital pins #2, #3, and #4 using 220 ohm resistors.
Connect red LED to pin #2.
Connect yellow LED to pin #3.
Connect green LED to pin #4.
2
Circuit
Code
The code uses two variables, Upper Threshold & Lower Threshold, to represent
the threshold levels. When the water level is below the lower threshold, the red
LED will turn on. When the water level is above the upper threshold, the green
LED will turn on. If the water level is between these two levels, the yellow
LED will turn on.
3
4
Conclusion
The water level indicator project with Arduino offers a simple yet effective
solution to tackle the water crisis at an individual level. By understanding the
water level sensor, calibrating it, and interfacing it with Arduino, users can
monitor their water usage and promote water conservation.
Implementing the water level indicator project not only benefits the individual
but also contributes to the broader goal of water conservation and
sustainability. By taking the first step towards efficient water management,
readers can play a part in addressing the water crisis and creating a more
sustainable future for all.