Page 1 of 1

Tank water level with MS5540-CM

Posted: 08 Sep 2018, 16:25
by Sejcek1
Hi all,

Is there support for sensor MS5540-CM planned? It is quite cheap waterproof pressure sensor. ... M&_sacat=0

It seems it might be good for projects where you need to monitor the amount of water or other fluid (height / pressure) and, for example, drive the garden irrigation automation. Certainly, such a possibility would apply to many other people. Could anybody will be able to write a plugin for this sensor? I found some script for Arduino, but I can not know how to write it for ESPEasy: ... 720e0e3431

Best Regards!

Re: Tank water level with MS5540-CM

Posted: 08 Sep 2018, 16:33
by grovkillen
Looks like a good sensor. You should add it as a feature request on GitHub.

Re: Tank water level with MS5540-CM

Posted: 08 Sep 2018, 19:32
by HomeJCL
Looks good

But how to implement ? how to rig this to existing piping or water tanks ?

By the way, for level ... a barometer won’t be of much use.

Re: Tank water level with MS5540-CM

Posted: 09 Sep 2018, 21:11
by Domosapiens
How about the supported Ultrasonic HC-SR04

Waterproof: ... 90912.html

(not sure if they have the same interface towards ESPEasy)

Re: Tank water level with MS5540-CM

Posted: 14 Sep 2018, 02:00
by Sejcek1
@HomeJCL: Just put it to the lowest place of the tank/pipe. Water/hydrostatic pressure is equal to water height so barometer should be useful (sure, only for atmospheric pressure tanks). It should be easy to convert pressure to water height.

@Domosapiens: You can measure up to 100m water level in narrow borehole within this sensor and sensitivity looks quite good.

Re: Tank water level with MS5540-CM

Posted: 14 Sep 2018, 04:16
by HomeJCL
There are several types of this sensor

The link goes to a range of 10 ... 1100 mbar
with 100m waterproof spec ! Means over pressure capability nothing todo with measuring range.

Anyway if you use the linked sensor, (abs press sensor barometer), you need a second one as reference (for measuring atmospheric pressure) to be substracted from the level pressure

Eg Pabs 1023 mbarabs. Measurement of level 1089mbarabs

Level 1089-1023=66mbarabs ~ 660mm level

With sensor max range 1100, this summer where I live, we had max Patm 1037 leaves us a max useful level on that day of 630mm water !!!

Recap :
read carefully spec sheet !
need 2 pces to measure level or anyway you’ll need a Pabs reference to calculate level from vessel. Needs additional “programming” not much but I’m lazy

So you simplify by using same type but looking for a gauge pressure type and not absolute pressure.

But then we are back at square 1, expensive, difficulty of mounting, exposed circuit and risk of leakage !

JSNxxxxx sensor costs around 7 $US works up to 4-5m and does mount in no time and no risk of leakage.

KISS ... that is ESP Easy philosophy