
One of the major problems faced by most countries today is water scarcity. This scarcity is mainly due to the wastage of water. There is an urgent need to control water wastage to protect the environment and conserve water resources.
A water level monitoring system is one of the effective techniques used to control water wastage. It monitors the water level and wirelessly provides this information to registered users. In this context, a Bluetooth module–based water level monitoring system is an innovative solution that informs users about the liquid level and helps prevent overflow.
A water level monitoring system is an automatic process used to detect and indicate the level of water in reservoirs, overhead tanks, or other storage containers. Most households store water in overhead tanks using motor pumps. However, once the water is filled, it is difficult to identify the exact water level or determine when the tank is full.
As a result, water often overflows from the tank, leading to the wastage of both water and energy.
This problem can be addressed by implementing water level monitoring and control systems using wireless technology. Such systems transmit real-time information to a smartphone, indicating the water level in overhead tanks. The objective is also to design a contactless water level indicator and controller using an ultrasonic sensor, along with dry pump run protection.
If you have been living in Bangalore for a few years, you are no stranger to floods. Every year during the monsoon, the underground parking area of my apartment fills with water to such an extent that it becomes impossible to even start my bike’s engine. What makes it worse is that once the water recedes, I have to take my bike to a mechanic due to water damage.
This year, I decided not to go through that again. So, I built a water level monitoring system that alerts me whenever the parking lot starts to flood.
Circuit Diagram for Water Level Detection and Alert System


The water sensor, also known as a water level sensor, is an easy-to-use and cost-effective device capable of detecting high-level and low-level conditions. It operates at a voltage range of DC 3–5 V and draws less than 20 mA of current. The sensor provides an analogue output signal.
The MCP3008 is a 10-bit Analogue-to-Digital Converter (ADC) that combines high performance with low power consumption in a compact package, making it well-suited for embedded control applications.
- 10-bit resolution
- Eight single-ended channels
- SPI interface
- ±1 LSB DNL
- ±1 LSB INL
- 200 kbps sample rate at 5V
- -40 to +85°C temperature range
- AEC-Q100 Grade 3
One unique benefit of SPI is the fact that data can be transferred without interruption. Any number of bits can be sent or received in a continuous stream. With I2C and UART, data is sent in packets, limited to a specific number of bits. Start and stop conditions define the beginning and end of each packet, so the data is interrupted during transmission.
- MOSI (Master Output/Slave Input) – Line for the master to send data to the slave.
- MISO (Master Input/Slave Output) – Line for the slave to send data to the master.
- MOSI (Master Output/Slave Input) – Line for the master to send data to the slave.
- MISO (Master Input/Slave Output) – Line for the slave to send data to the master.
- SCLK (Clock) – Line for the clock signal.
- SS/CS (Slave Select/Chip Select) – Line for the master to select which slave to send data to.
Arduino Code
The code uses the MCP3008 as the ADC converter and requires the corresponding library to be installed using the Library Manager. In the loop function, the data from the sensor is read and converted into the water level.
After writing the code, upload it by selecting the appropriate board and port. The code can be configured to control a pump (ON/OFF) or to trigger a light or buzzer-based alert by setting threshold values for the water level. The current version of the code is basic and only prints the water level to the Serial Monitor.

Download Source Code
Testing Water Level Detection and Alert System
Power the device and place the sensor in water. Open the Serial Monitor in the Arduino IDE and observe the sensor output, which changes according to the water level.
Check more such tested Arduino projects.
Water Level Monitoring and Control Projects
- Simple Overflow Stopper For Water Tanks
- Stop Tank Overflow With Wireless Water Level Indicator and Controller
- Water Level Indicator Circuit (LED based)
- Water Level Indicator using 7-Segment Display
- Water Tank Overflow Indicator
- Wireless Water Level Monitoring and Pump Control System
- Automatic Water Pump Controller
- Smart Water Meter To Help Control Water Wastage
- Ultrasonic Liquid Level Monitoring System Using MATLAB






