I have just put my newly modified system on my top tank. I changed my system configuration completely.
I originally had what most people here have described. A 4-20mA gravity throw in sensor, current to voltage converter, ads1115 into an esp32. All of this was regulated to be in sleep mode to conserve battery.
I was doing my head in with inconsistent readings from the sensor. The voltage converter was putting out 0.58v but when checking the signal received on the data pin of the esp - it was reading 5v (I have read that this value is problematic for esp32)
Anyway I came across a Lars Klint video in which the use of a 0-10v throw in sensor was partnered with a shelly uni. I put this together in less than an hour and bingo - it works flawlessly. It also appears to only run at about 30mA. My 12v battery needs no step down for the Shelly and it connects to my wifi over a distance of about 50m. One very happy chappy. Lars has instructions on setting up sensor and templates for easy gauge setup.
Pat
Iâm using the Gravity throw in sensors, paired with ESP32s. I get small fluctuations, which I filter out.
Antonio,
do you put the signal from the sensor through an ADS1115 or go direct from the current to voltage converter to the adc on the esp?
Pat
Via an external converter module that comes with the sensor, then utilising the onboard ADC.
Antonio
that is exactly the sam one that I have. I didnât connect direct to the esp32 as I had been reading about the limitations of the ADC on that board. That is why I used the ads1115. I muight have a go without that.
Pat
Would you mind sharing your ESPhome code that converts the voltage to Tank Level percentage? Iâm also using the ADS1115 and a 4-20 mA throw in sensor.
N.P. note this code lives in â/config/configuration.yamlâ. In my case I have two sensors in the field with different voltage returns, so this will need to be changed to meet yours. I have four throw in sensors (to spares) and they all return slightly different readings.
- sensor:
- name: "Main Water Tank Level"
unit_of_measurement: "%"
icon: "mdi:gas-cylinder"
state: >
{% set voltage = states('sensor.esp32thingplus_00_tkm_tank_sensor_voltage')|float(0) %}
{{ ((voltage - 0.90)/(1.90-0.90)*100)|round(0) }}
availability: >
{{ states('sensor.esp32thingplus_00_tkm_tank_sensor_voltage')|float(0) > 0.50 }}
the farm received 3.6mm of rain last night. iâm using simple Gauge Cards.
Antonio
seems like you have a similar farm setup to me. Tanks near the house and a header tank uphill? Are you confident enough in the measurements to have an automation turn your pump on when header tank gets to a certain level?
Pat
no header tank, just these two 40,000l in-ground concrete with internal submersible pressure pumps in a âredundantâ configuration. I cut over manually at 25% to avoid letting the tanks get too empty (light) the soil here is rated âextremeâ and will literally spit things out. I have a further two poly tanks (rain water) and a mains water feed 800m away on the lower property. I am working on connecting these now. I have all the hardware, just waiting for the right moment to lay the 1600m of pipe with the tractor and pipe layer. Although I have some events set as triggers (my security cameras and lights) I do not have the solenoid valves automated yet. Waiting until after the âgridâ is connected. But thatâs trivial for me.
How long do you think the battery will last? Once you test it, I think that would be some good info to know.
Do you think a water consumption sensor could be derived from the level change?
My house only consumes water from the cistern, if the value decreases it is the value of water consumed, if it increases it should count for nothing, maybe it is difficult to apply as a code I am realising.
Antonino, I try to obtain additional independent data sources when I can. I have water flow sensors running on additional ports on the same ESP32 cards. to add to this I aggregate rainfall data from our Davis weather station. We live in Australia in an area that is drought prone so water is a precious resource, hence the priority.
Antonio,
Was the Davis weather station easy to integrate into HA? Iâm in OZ as well and run the entirre house from rain water.
Pat
Patrick, From memory it wasnât especially hard, might have even been easy. Itâs been a while now since I integrated it. Iâm using a custom integration, I havenât checked if thereâs a native one yet. What I can tell you is that itâs the primary way I view and use weather (especially rainfall) data. For water management, having accurate dimensions of the roof area, accurate rainfall to the property, the volume of the tanks before and after rainfall and the litres used means I can make better decisions. I.e: when to implement 4min showers. We havenât come close yet because weâve had good rain last few seasons (I subscribe to indigenous weather knowledge) and the setup here has an astronomically high efficiency, something I worked on with the builder.
Hi fribse,
Are you happy with your skimmer solution? Does it work well?
I was wondering, if you are aware of any projects to weather the skimmer is full of leafs.
Thank you!
I leave my currently working code,
Hardware:
Esp D1 mini v4.0
conversion ADC: ADS1115
Sensor : TL136 4-20mA
Current sensor converter: HW-685 4-20mA Current Sensing
esphome:
name: cisterna
friendly_name: Cisterna
esp8266:
board: d1_mini
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
ota:
password: "xxxxx"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
use_address: cisterna.local
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Cisterna Fallback Hotspot"
password: "xxxxxxxx"
captive_portal:
web_server:
port: 80
# i2c Bus per ADS1115
i2c:
id: bus_a
sda: D2
scl: D1
scan: True
# 1-Wire sensore temperatura
dallas:
- pin: 12
# ADC Pin ADDR-GND 0x48
ads1115:
- address: 0x48
# Canale ADC A0 per l'acquisizione del valore di misura
sensor:
- platform: ads1115
multiplexer: 'A0_GND'
gain: 4.096
name: "Livello acqua cisterna cm"
id: levelraw
update_interval: 3s
unit_of_measurement: cm
accuracy_decimals: 1
icon: "mdi:car-coolant-level"
# Misure filtrate
filters:
- sliding_window_moving_average:
window_size: 6
send_every: 2
- delta : 0.0010 #non invia i valori di tensione sotto questo valore delta di cambiamento
# Convertire le tensioni in base alla serie di misure in livello di riempimento Tensione ricevuta > cm
- calibrate_linear:
- 0.13 -> 2
- 3.05 -> 170
# Calcolo della quantitĂ di riempimento in litri in base alla curva del livello di riempimento (precedente) Cm> Litri
- platform: template
name: "Litri cisterna"
lambda: |-
return id(levelraw).state;
filters:
- calibrate_linear:
- 0 -> 0
- 170 -> 2000
unit_of_measurement: l
accuracy_decimals: 0
# Temperatura dsb
- platform: dallas
address: 0x150300a279b11628
name: "Temperatura cisterna"
unit_of_measurement: °C
accuracy_decimals: 1
#Attenuazione segnale wifi
- platform: wifi_signal
name: "Wifi sensore Cisterna"
update_interval: 60s
thatâs awesome Antonino.
here is my water management âviewâ. basically 2 x 40,000l in-ground concrete tanks. the next stage is hooking up a mains water feed and 2 x 20,000l water tanks at the other end of the property, 800m away. I will be using the same device design to manage them. iâll start building them when i have the 32mm pipe underground, and for that i have to wait for the right weather conditions.
HW-685 Hot LM317, module not work over vcc 12V.
This problem is solved by replacing the resistor in the divider for LM317 from 240R to 330 R. This is due to the fact that at current values of resistors, the output voltage is 10.6 which is higher than what is needed for IC1 (LMC7660). After replacing the resistor, the module works as it should (VCC 7-36V). Might be useful.
Whatâs the best (reliable) option for well? I need to measure water level in 23m deep well, water level is up to 5m. Anyone?