Lps35hw pressure readings slowly getting too low

Hi, I've tried to read all topics about pressure sensors and lps35hw with no clue, so I hope I did'nt miss something obvious.

I'm experimenting on reading water level in water tank by measuring pressure difference between tank bottom (in the water) and atmospheric pressure.

Experiment idea:
Sensor #1 should read combined value of atmospheric + hydrostatic pressure. Since it's submerged on the bottom of water tank.
Sensor #2 should read atmospheric pressure. But #2 is not installed yet.
Value of (#1 - #2) should then get the cleared hydrostatic pressure and thus information of water level.
So far it's just recording #1 readings.

Problem:
Sensor #1. Which is lps35hw is over time slowly reading lower and lower values of pressure. Even less than actual atmospheric pressure, which should not be possible.
In one month it dropped from 1050hPa to 882hPa, even bellow actual atmospheric pressure.

What could be reason of such behaviour? Why is readings slowly dropping? What should I try?

Hardware:
Sensor is:
lps35hw
Arduino UNO R3, ATmega328P
Sensor is connected via I2C.
Measure is once per 600s.

This arduino is also wired to:
W5500 ethernet modul
JSN-SR04T Waterproof Ultrasonic Module
two-relay board
So could it be voltage problem?
I'm using 5V usb power supply since the arduino voltage regulator was overheating when board was supplied by 12V connector.

Parts of code concerning lps35hw:

#include <SPI.h>
#include <Adafruit_LPS35HW.h>

void setup_preasure() {
  Serial.println("Adafruit LPS35HW Test");

  if (!lps35hw.begin_I2C()) {
    Serial.println("Couldn't find LPS35HW chip");
  }
  lps35hw.setDataRate(LPS35HW_RATE_ONE_SHOT);
  Serial.println("Found LPS35HW chip");
}

double get_pressure() {
  lps35hw.takeMeasurement();
  double val = lps35hw.readPressure();
  Serial.print("Pressure: ");
  Serial.print(val);
  Serial.println(" hPa");
  return val;
}

double get_temperature() {
  lps35hw.takeMeasurement();
  double val = lps35hw.readTemperature();
  Serial.print("Temperature: ");
  Serial.print(val);
  Serial.println(" C");
  return val;
}

lps35hw Wiring
[Adafruit Learning System]

On screenshot you can see:

  • Actual water level measured by ultrasonic sensor.
  • Pressure readings from lps35hw which should be result of atmospheric pressure + hydrostatic pressure
  • Temperature readings from the same lps35hw sensor. In case it have samothing to do with it.

I would be glad for any hint.

I bet it is a defective sensor, maximum pressure is about 1.2 bar in the datasheet, and you are adding almost 0.2 bar with the water. May be something fell into the tank sending a pressure wave that bricked the sensor.

:thinking: I didn't though of that. Is it possible, that pressure slightly above measurable range would brake the sensor?
Maximum recorded value was 1158.17hPa though and tank is covered. I don't know if something like that might have happened. There is also pump in the tank, which could emit same vibrations.

Is your sensor module designed to be completely submerged in water, with all connections perfectly waterproofed?

This one certainly is not: Adafruit LPS35HW Water Resistant Pressure Sensor [STEMMA QT] : ID 4258 : $12.50 : Adafruit Industries, Unique & fun DIY electronics and kits

I tried to "waterproof it" by sealing it to soft tube for insulating cables and filled it with silica gel (just for sure). I'll check it.

The slightest bit of moisture will create conductive paths on a PCB, and corrosion due to electrolysis will set in, destroying the PCB. In a matter of days, sometimes.

Your idea works fine and I've been doing that for many years to monitor water level in holding tanks. However, you MUST either use a sensor designed to be permanently submerged, or a sensor mounted outside at the bottom of the tank, connected via a small pipe to the fluid inside.

It is a posibility, the membrane of the sensor is made of silicon, pretty hard, but only within range. May be you can find a diving sensor.

I think you need a different method .
You could just use a gage type sensor suitable for use in high humidity .
Connect to a piece of tube and then you put the tube to the bottom of the tank . You then get the output proportional only to the depth .
Pressure will be lost over time if you leave it submerged if there is the smallest of leak , there are ways to overcome that tho .

You are right guys. It was the pressure loss. I should've checked that first. My bad. :face_with_diagonal_mouth:
But silica gel looks like minimum humidity got inside.
So the readings seems to be correct.


I'm bit disappointed that sealing didn't worked so well.

Gage sensor mounted to pipe is probably what I need. I checked this Measuring differential pressure with strain gauge sensor but I'm not sure if it would be the right sensor.

I tried to find some pressure gage sensors like this https://www.distrelec.cz/cs/tlakovy-snimac-pro-montaz-na-zakladni-desku-600-mbar-merka-digitalni-spi-plyn-kapalina-dip-honeywell-abpdrrv600mgsa3/p/30159393?trackQuery=cat-NAV_PL_01030814&pos=22&origPos=22&origPageSize=50&track=true
The I2C interface would be easier for wiring. But i thing this would do the job.

Thanks.

Make sure you get the version compatible with water

That only absorbs a limited amount of moisture, then does not absorb more until regenerated in an oven.

Maybe you should try a bubbler setup, so you can have all the electronics out off the water, or even inside if that water tank is outside. A differential sensor would eliminate the need for another barometric sensor.
Leo..

1 Like

I know. The picture is not good, but maybe you can see some silica absorbed humidity and changed color to yellow, but most of it is still pure.

I'm not sure what you mean by that. I was thinking of attaching sensor to thin tube with other end open and submerged. But good sealing is needed anyway and sensor needs to deal with humidity inside tube.

Look this is an industrial solution

Basically an air tube to the bottom of the tank, with a small (sphygmomanometer) air pump and differential/gauge pressure sensor attached to the other end of the tube.
Maybe this video will help.

Could try these.
Pressure sensor with digital HX710 chip (Arduino library available).
Sphygmomanometer pump.
Leo..

That's some interesting solution and parts. Thanks!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.