Hi all,
Iām wondering if someone can help me out hereā¦ I feel like Iāve got waaay too many tabs open (YT/HA Forum etc) with different options on how to try to get my setup to work.
Hereās a diagram of what Iām trying to do:
As per the diagram, Iām planning on installing a DF Robot Analog Pressure Sensor on the lower outlet pipe of our 2400 L water storage tank.
The tanks dimensions are Height: 1700mm. Diameter: 1420mm
The other components that I plan to use include:
The tank is currently empty so I would like to try and calibrate it every 50 or 100L as I have a flow gauge on the garden hose which I plan to use to fill the tank. Iām planning on initially using the code below to get a Voltage reading every 50 or 100L until the tank is full.
When I connect the signal cable and ground to my multi meter, I get a reading of 0.435 volts- I assume that this is what the reading should be when the tank is empty. I then filled up a 5L tank whilst measuring the voltage and confirmed that the voltage went up to 0.445 volts. I seem to be having issues integrating this into HA.
For simplicity sake, Iāve been using the NodeMCU ESP32 dev board (and not the ESP8266 as shown in the diagram above), and running the following:
sensor:
- platform: adc
pin: GPIO33
name: water pressure
update_interval: 2s
unit_of_measurement: V
I get the following readings with no water in the tank:
[21:29:29][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
[21:29:31][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:29:33][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:29:35][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
[21:29:37][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
[21:29:39][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:29:41][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
When I add 5L to the tank, I get the following readings:
[21:38:25][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
[21:38:27][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:38:29][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:38:31][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:38:33][D][sensor:127]: āwater pressureā: Sending state 0.45300 V with 2 decimals of accuracy
[21:38:35][D][sensor:127]: āwater pressureā: Sending state 0.07500 V with 2 decimals of accuracy
[21:38:37][D][sensor:127]: āwater pressureā: Sending state 0.88500 V with 2 decimals of accuracy
[21:38:39][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
[21:38:41][D][sensor:127]: āwater pressureā: Sending state 1.05100 V with 2 decimals of accuracy
So it seems like something is off.
The next planned step was to do the following but I donāt think Iām ready for this:
- platform: adc
pin: A0
name: "water volume"
update_interval: 2s
unit_of_measurement: "liter"
accuracy_decimals: 5
filters:
- median:
window_size: 200
send_every: 10
send_first_at: 4
icon: "mdi:gauge"
accuracy_decimals: 1
filters:
- calibrate_linear:
- 0.1 -> 0
- 0.5 -> 50
- 0.9 -> 100
Please can someone help me - Iāve reached out to numerous folks without any luck.
Thanks in advance.