Thanks for the info. Tasmotoa looks like a handy framework, and great for plug'n'play use. My own one is much simpler and easier to maintain, and having spent a lot of years developing embedded software and APIs I wanted something I fully understood and could debug if anything isn't working properly.
Yep i use a few of those sensors and they are great - they can be connected to a NodeMCU (or equivalent) with no dramas - there are two versions of them one is 3.3v and the other is 5v. Tasmota supports these using the Tasmota-Sensors binary package.
Note that these units have a deadspot of about 20cm - due to the fact that they are an all in one unit - they have to send out the ultrasonic wave, then turn off the unit and then back on listening for the bounce back.
Measuring the depth of clear water is one of the most challenging tasks for people like us who like to 'roll their own' systems. Laser (light sensors) do not do well because of reflectivity issues. Ultrasonic sensors do not like moisture, although some claim to be waterproof. Capacitive sensors work well but are not easy to make. Mechanical switches that may arc cannot be used with flammable liquids. Hall effect float switches should be Ok.
One thought would be to install a series of hall effect switches in a waterproof tube, each with a different load resistor thereby creating a different output depending on which switch is activated. A float with an embedded magnet would operate the hall effect devices. A bit like an R-2R ladder with a hall device every 100 mm say.
Pressure switches at the bottom of the tank work well but can be expensive.
I've ordered the waterproof ultrasonic sensor mentioned by Bart above and a laser-based one as well for comparison, so I'll try them out in various situations and do an update with info on their performance once they arrive.
I had several Sonoff (TH10 and POW) devices in my HA system with my own code running. I wanted to measure a huge rainwater tank (almost 30m3 of clear water).
I used the HY-SRF05 ultrasonic sensor and patched the Sonoff TH10 to supply 5V instead of 3.3V on the TRRS plug. See photo on where to cut. Then just connect the 5V pin from the LDO to the corresponding pin of the TRRS plug. The sensor works flawlessly.
And since the Sonoff TH10 also offers a 220V relay, I can switch the pump with the same device.
That good to hear, did you do anything to waterproof the HY-SRF05 device? I don't use Sonoff or Tasmota although I do have some Sonoff devices. I prefer to make my own hardware and write my own code, probably because I like to make my life harder:). do you have a source for the HY-SRF05 module please.
I sent a direct message with my ESP8266 code for the HY-SRF05 module.
If there is broader interest, I could also share it on the ESP8266 Community Forum. Just let me know.
Hi @molesworth,
This was great input! It would have been a shame if my node didn't offer support for such kind of tanks. So I have introduced tabsheets in my config screen. When you choose as tank type "Custom (table)", the last tabsheet will become enabled. On that tabsheet you can enter your manufacturer data, so my node will do the linear interpolation during the calculation of that tank type:
There is a new section on my readme page about custom tank types. I have taken the liberty to use your tank photograph ...
@hominidae: Also great input! The two limits are now on the config screen:
And there is a section on the config screen to explain this feature:
The output message contains some extra fields, as also describe on the readme page: usableVolume, usableFilledVolume, usableEmptyVolume.
I'm dutch speaking myself, so don't know. On wikipedia they call it Ullage or headspace, but that sounds even more non-self-explaining to me.
Does somebody else have a proposal?
It would be nice if some folks could do some tests with this node. There are a lot of online tank calculators available, so you can easily compare the results... Thanks!!!!
Once the sensors arrive I'll set up some tests and try your node out. It looks like it will do exactly what's needed, and I can add oil level to my dashboard
I found these were great for about a month or so - then humidity and general water ingress from being close to a water tank ended up killing them.
I have had 4 of the Waterproof versions running on water and oil tanks for more than 2 years now with no issues - originally started with ESPEasy and then moved to Tasmota.
These resistive float sensors are an option, they are fully sealed and made of stainless and range from 150mm to 1000mm depths. Depth Sensor (Sealed resistive)
I bought the same in a webshop for the Raspberry tutorial for hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi.
Now it is waiting for me to finish a project I'm working on, to use it in a hydroponic system I suspended the developing.
I haven't used the ultra-sensor, yet. (I just tried it on the desk).
Het Neil,
Thanks for proposing an alternative name for "emtyVolume"! But when I look at my oil tank for my heating systel, the filled volume is for me the 'available volume´. Because that oil is 'available' for heating...
Hello, I have used differential pressure sensors such as the MPX 5010DP to measure liquid depth, for instance in an underground rainwater reservoir or water butts in the garden.