Water Level Indicator Using Arduino
by Rachana Jain in Circuits > Arduino
193 Views, 0 Favorites, 0 Comments
Water Level Indicator Using Arduino
Water level monitoring is a simple yet essential task in many household and industrial applications. Whether it's preventing the overflow of a water tank or automating an irrigation system, monitoring the water level can help avoid wastage and ensure proper use of water resources. In this project, we will build a water level detection system using an Arduino, a water level sensor, and a few basic components. This system will provide both visual (LED) and audio (buzzer) alerts when the water reaches a specified level.
Supplies
Water Level Sensor
The water level sensor operates based on the change in resistance as water touches different parts of its conductive path. The sensor consists of 10 exposed traces out of which 5 are power traces and 5 are sensor traces.
When the water reaches different heights on the sensor, the water bridges the traces, altering the sensor's resistance. The sensor outputs an analog signal that corresponds to the water level, which is then fed into the Arduino for processing. This analog value changes with the level of immersion of the sensor in the water, allowing us to detect the height of the water.
Water Level Sensor Pinout
The water level sensor module typically has three pins:
- VCC: Power input (3.3V–5V, connect to Arduino 5V).
- GND: Ground (connect to Arduino GND).
- SIG: Signal output pin (connect to Arduino analog input, usually A0).
Wiring Connections
This simple setup allows the Arduino to read the water level from the sensor and trigger the RGB LED and buzzer when the water level crosses the threshold.
The Arduino controls the RGB LED to display different colors for different water levels. When the water level is below 10%, the RGB LED will glow red. If the water level is between 10% and 99%, the LED will emit a blue light. Once the water level reaches 99% or more, the LED turns green, and the buzzer activates, signaling that the container is full and should no longer be filled.
Wiring Connections
First we connect the VCC pin of the water level sensor to the 5V pin of the Arduino. Then we connect the GND pin of the sensor to the GND pin on the Arduino. Then connect the SIG pin of the sensor to the Arduino's A0 pin (Analog input).
Now we connect a common cathode LED connected with the Arduino at pins 10, 9 and 8 for colours red, blue and green respectively. A buzzer is connected at pin 2.
Arduino Code
Working
Once the circuit is set up and the Arduino code is uploaded, the project works by continuously monitoring the analog signal from the water level sensor. The sensor detects the current water level and sends an analog signal to the Arduino, which reads it through pin A0. The Arduino then compares the sensor reading to a predefined threshold. If the water level exceeds this threshold, the Arduino triggers both the buzzer and the LED to notify that the water has reached a critical level.
To learn how to build a water level indicator checkout: Water Level Sensor with Arduino