Water Level Measurement Using Arduino

Water Level Measurement

Here we discuss on low cost continuous liquid level monitoring system based on MPX5010DP differential pressure sensor. Most of the traditional measuring systems were designed and implemented by complicated hardware circuitry. It made the product expensive, with low functionality and with limited precision. With virtual measurement technology, more of the instrument can be substituted by software. Using this approach the cheaper and more versatile measurement system can be developed. The method for obtaining liquid level with one differential pressure sensors MPX5010DP is suggested and considered. Some basic considerations about the modern integrated pressure sensors and some aspects concerning their capability for liquid level measurement are done. Finally, a prototype of a liquid level monitoring system based on integrated differential pressure sensors, arduino board is developed for measuring liquid level accurately at distances up to 10 metres.

Hydrostatic pressure and level sensing theory

There are three types of pressure measurement. Absolute pressure does include atmospheric pressure, and is measured relative to vacuum. Differential pressure is the difference between two pressures. Gage pressure is a form of differential pressure measurement in which atmospheric pressure is used as the reference. A pressure transmitter can be used to determine the liquid level in a tank, well, river or other body of liquid. If a pipe is placed vertically, with one end dipped into a liquid and the upper end of the pipe is closed off and some air volume is trapped.

Components Required:
1. Arduino Uno or any internal ADC microcontroller
2. MPX5010DP Pressure sensor
3. LCD Display 16×2
4. Water purifier pipe 1 mtr

Pin Diagram of MPX5010DP

Pressure Sensor Pinout
Pressure Sensor Pinout

Circuit Diagram of Water level measurement

This time we used LCD to display the liquid level as we progressed in skills. Connect Sensor one end to water filter pipe, take care that air will not leak through the sensor and pipe joint as we want to measure pressure of air trapped in pipe. Keep one end of sensor open to air. Capacitors near to sensor are provided for noise reduction. You can use fixed 1K resistor in between ground and LCD contrast setting pin instead of pot.

Water Level Measurement using Arduino
Water Level Measurement Circuit

Arduino Code for Water level measurement

/*=================================================
www.circuits4you.com - 2016
Pricision Liquid Level measurement using arduino
=================================================*/
#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 10, 5, 4, 3, 2);
int Level;

void setup()
{
  lcd.begin(16,1);
  Serial.begin(9600);
}

void loop() 
{
  Level = analogRead(A0)-45;  //Sensor is having some offset so do some   
                              //calibration here
  
  lcd.setCursor(0 , 0);
  lcd.print("Liquid Level:");
  lcd.print(Level);
  lcd.print(" Ltr");
  
  Serial.print("Liquid Level:");
  Serial.print(Level);
  Serial.println(" Ltr");
  delay(1000);
}

Result of Water Level measurement code

  Open serial monitor and see the result, It is also displayed on LCD.

Water Level Result
Water Level Result

One thought on “Water Level Measurement Using Arduino

Leave a Reply