ESPHome water level sensor

Nice idea, very imaginative. I think it could work and you would also have the temperature.
Don’t forget to tie a wire to pull the sensor up when you need to change the battery;)
Let me know if your experiment works as expected, please.

1 Like

Yep, same here, I would love to know how that works out.

I could need a sensor for the water tank of my espresso machine :smiley: :laughing: And fortunately I still have one of these aqara sensors laying around :slight_smile:

1 Like

Does anyone who knows a bit about waterproofing under pressure and water permeability of materials (and knots?) have a view on whether a condom or balloon (maybe two?) will leak water for this idea? I guess we know that a knot in a ballon is quite air tight but I don’t know how these things will hold up over time (creep)? I guess a nice silicone sealant dip could do it too but would make battery replacemnt harder. Thoughts?

Have you thought about using sealer or lamination? :slight_smile: Not sure, if these are the right terms, but here is, what I mean:

Both things could work, especially the sealer should do the trick. If I get time this weekend, I’ll experiment with both. :smiley:

1 Like

Cool. Yeah I probably won’t get to test for a few weeks. Keep me posted. I wonder if you’ll need to put a ‘sinker’ in there too?

Initial results are here: Use Xiaomi temperature/pressure sensor as water tank level sensor

@paddy0174, @malesci

For anyone wanting to implement a ultrasonic sensor as a liquid level monitor, here is a link to a very good video, Ultrasonic Level Sensors - Range, Tank Height, Fill Height and Dead Band Explained, about how to choose and setup an ultrasonic sensor as a liquid level gauge. It explains the basic things you need to know.

1 Like

I used on of those pressure transducers (5v, 5psi) to measure my 1.8m hight water tank level, connected to a Wemos D1 mini running ESPHome. Very simple to set up as a voltage sensor as the transducer simply outputs a voltage proportional to the pressure. However I’m finding it is not consistent, and varies by >30% all the time. I’m not sure why but maybe the supply voltage is not stable enough, or perhaps the influence of atmospheric pressure. Has anybody managed to get it working accurately?

I’d imagine that the atmospheric pressure is your issue. This is why when we use pressure transmitters to determine level in cases like this we (in industrial applications etc.) use pressure transmitters which give a value relative to atmospheric, so the output is automatically compensated.

I have this sensor hooked up to a 8266. Works perfectly with a 3,000 gallon 8 ft tall tank. Basically rock solid

2 Likes

Hi @teich, how did you connect it? And can you share the esphome config?

I read on the page:
We sold this product together with our Gravity: Analog Current to Voltage Converter. The converter can convert current into voltage signal which can be read…

Didi you do this? Or hook it up to 8266 directly?

There is literally a connection diagram on the page!

I know, but that’s not the question. It is WRT this item: https://www.dfrobot.com/product-1863.html
and if you do need that converter yes or no.

You do need that (or a similar conversion circuit, which can be done with a couple of resistors) because your ESP cannot read current directly, only voltage

The DFRobot website isn’t 100% clear - the throw in liquid level transmitter comes with the current to voltage converter. Click on the ‘shipping list’ on the right side of the page.

The ESPHome code couldn’t be easier. Here is my config

One note on wiring - you need both a 24V power supply (for the sensor) and a 3.3/5V supply (for the ESP). You could of course step down the 24V or up the 3.3. In my case I just used an old POE injector lying around and a USB for the ESP.

1 Like

Here is a what the last 4 days of data from the sensor looks like.
I’ve had it installed for a month now, but only setup Influx/Grafana last week to capture longer term data.

I’m keen on using a pressure sensor due to the unreliability of an ultra sonic. Should I get one with an amp 4-20ma output or 0.5-5v output.
Will the specific sensor determine the calculation I need to apply for the output reading?

I hope it comes back into stock, that looks very easy. In my case when the water level drops I need to go change the filter.

Looks like it’s in stock right this second.

1 Like

I tried the Grove Water Level Sensor, and it is completely unreliable with ESPs, so i am throwing them in the garbage bin and trying the sound option.