Hey Larry, any chance of some pics so I can see what is needed? I’m guessing I might be able to run 2 level sensors off the Shelly uni?
Can you please list your setup?
Thanks!
-
water level sensor: I choose 0 - 5v and 4m range. Keep the end of the control wire a little exposed as it has the pressure equalisation tube in it. This is 24v powered.
https://www.aliexpress.com/item/1005002655746818.html?spm=a2g0o.order_list.order_list_main.63.31691802mwRllD -
Water pipe pressure: I choose 0 - 5 bar. Mine was 5v powered
https://www.aliexpress.com/item/33028576390.html?spm=a2g0o.order_list.order_list_main.28.31691802mwRllD -
Power monitoring and control of in tank pump. Power monitoring allow me to see when the pump switches itself on (and allow me to turn it off by automation if there is an uncontrollable leak in the pressurised irrigation network). I used a contactor because the start up amperage was WAY more than a Shelly can handle.
Shelly Plus 2PM - All Products - Products - Shelly -
Lolin D1 mini ESP8266 (or similar)
-
ADS115: Aliexpress has these but I got it locally. Connect both pressure sensors and set to maximum gain. So make sure it goes up to the 6v limit
-
Buck converter: 24v to 5v
DC-DC Buck Converter 7-24V to 5V 4A | The Pi Hut
Dallas DS1820 in the tank … if you need one … I managed to get 25m run out of it … but it does sometimes drop off …and then come back! I also have a Hunter hydrawise system running the irrigation zones which is integrated into HA BUT i prefer to use the Hunter app.
My tank is cylinder on its side; the maths was a pig. Calibrate the pressure sensor to height at zero and full. Then create a template sensor component in ESPHome to do the maths for calculating what ever shape your tank is. I can post my yaml later if needed. Good luck
I realise that if you are running this remotely then you need to step up to 24v and down to 5v and a chunky battery! Or alternative pressure sensors …
@TommySharpNZ
I dont have a picture, I can take one on a dry day (as you know it has been a wee bit wet)
But it is not that difficult.
Shelly Uni -
Red from the uni - 24V+ (brobably can use a 12v supply as well)
Black from the uni to ground
Sensor
0-10v one
Red - 24V+
Black to ADC (white cable coming out of the uni)
-*- if anyone else if you purchase the wrong sensor (4-20ma sensor), just connect a 470 ohm resistor between ADC (white on the uni and Ground)
–---------------------
For temperature:
DB18B20
Red - yellow on the uni
Yellow Data - to blue on the uni
Black - Green on the uni
shelly will be picked up by home assistant.
The deeper the sensor goes the higher the voltage. So record when the sensor is above water and then when the tank is full when the sensor is at the bottom of the tank… and make a template sensor based on that. Also on the Uni you can set an offset. so I set that so the voltage is zero when out of the water.
I used to have a waterproof distance sensor, but in heavy rain it would spike to much…
Also I like the uni, as it has good range to talk to wifi.
I just use some wago connectors to hook it all up and put it in a waterproof box
hope this help
I must be honest, I much prefer go go down the route of ESPhome.
Esphome is great, use it for a lot of other functions. This however is local, and makes wiring and setup a breeze. no soldering, no extra adc converter. no tuning…
Hi, I use a pressure transducer in the tank which works really well
May you post your esp codes pls
And which card did you used to display tank level ?
Thanks.
I used a shely uni, which just works without code
I just used the custom-bar card from hacs.
Just used a template to convert the voltage to Liters. ( this might give a different voltage per how much you drop it to yours, and your tanks will be a different size…
sensor:
- platform: template
sensors:
water_tank:
friendly_name: "Water tank volume"
unit_of_measurement: "L"
value_template: '{{ ((states.sensor.tank_height.state | float) * (54.34782609 * pi * 170.5 * 170.5 / 1000 *2)) | round(2) }}'
Thank you so much, May you post your card codes pls, I tried to make the bar like this but all I got is a right facing rectangular
I need a sensor faster than I can source a 0-10v version, but I can get a 4-20ma version very fast. And it looks like using a resistor is fairly simple and straightforward. I googled it and am just coming up with a question if I need a resistor on each of the positive and negative lines coming off the sensor or just a single resistor wired to one of the sensor lines?
I’m a lifelong tinkerer but newish to this type of project. I love the idea of being able to just integrate into a shelly and not also trying to figure out arduino or esp stuff (for now) and this looks like the easiest way to get my project and up running. Thanks for any help or pointers!
Here you will find all the details about this sensor along with the installation method
English video
Arabic video
I am new in the shelly world, but would this work with the Shelly Add-On module as well? Not exactly sure about this, as the add-on only gets 3.3V from the plus device, but the sensor needs 10V.
I prefer the add-on over the UNI, as this has built in 230v converter and ready to go terminals.
Should work as the Shelly plus add-on can read 0-10V (if you take the 0-10V sensor variant), but the sensor needs 12-24V power.
I think this should work if you run the Shelly plus over 12V and share it’s supply
Thanks for these videos. I’m wanting to set this up for a cistern that I have. Water can be as deep as 8’ (about 2.4 meters). Is range essentially depth? So I could do this with the 3 meter range version?
Thanks for the video. It was super helpful.
You’re welcome
Yes, depth is the basis
You can choose the depth 3 meters
To make things clear to you if you buy for example 3 meters from 0 to 5 volts
When your tank is full, the result will be 4 volts.
This is the result of (2.4*5)/3=4 volts
These values can be modified by using Templates on home assistant to become 100% when When it’s full
Thank you for that calculation, it’s very helpful.
Hi,
I have just ordered my sensor and Shelly Uni. When it arrives, is there anyway of knowing what the voltage should be when the tank is full (while the tank is not full)?
I have 2x10,000L tanks connected and are currently less than half full. Setting up a gauge in HA would be pointless without knowing the upper value, so open to any suggestions on how to obtain the value while we await more rain. Thanks.
This may help you:
Water has a pressure of 0.433 psi/ft. or 9790 pascals/m.
So at the bottom of a tank of water 5 foot deep the pressure would equal 2.165 psi
If the gauge is good to 3 meters or 9.84 feet and 5 volts full range
(5ft * 5V)/9.84ft = 2.54 V
If the tanks are the same, you can calibrate by adding water from one tank to the other and recording the voltage and plot V vs Depth. You can also calculate the theoretical voltage from above to see if the theoretical v actual is skewed.
You can run a regression on the actual measurements and find an equation for V vs Depth. This you can convert to a sensor in HA.
I hope this makes sense to you.