I need to follow the water level in a water well (in addition of monitoring the temperature with a DS18B20 + TH10).
The level can be at 2 meters maximum, and the minimum is almost 0.
With the shape/size of the well and the very cold temperature here (up to -40°c), I can’t use ultrasound sensor.
So I’m looking for a water pressure sensor to place on the bottom.
It’s easy, 10 vertical meters of water = 1 bar (+~1 bar of atmospheric pressure = 2 bars).
So I need to monitor a pressure between 1 (=the well is empty or almost) and 1,2 bar (the well is full).
Please, do you know any waterproof sensor with this range of pressure?
But I guess the issue is to get the 10 v down to something acceptable in a ESP.
Perhaps set up a series of voltage dividers that “trip” depending on the input then use different I puts of the ESP to see the “depth”.
You won’t get the perfect accuracy but depending on the inputs you have available you can get a fairly decent scale I think.
I found this too, it’s not domotic, but we can find some informations.
It need to check the barometric/atmospheric pressure, and adjust the water pressure.
I have a creative proposal for you. If you put a hose in the well with its end somehow stuck to the botttom and the top sticking out somewhere conveniently located, you could seal off the end of the hose and insert one half of a differential pressure sensor in this now sealed end. If the water level rises, the air pressure should rise, if it sinks, it sinks. With this contraption you have access to the sensor and all “maintenance parts”. But: you will have to somehow calibrate it…
You are right, did not think about that. The question is how coarse/fine you need the water level and what influence the temp change has on the measurement. Might be good enough…
The sensor to sink has a pipe to go out the water to transmit the outside air pressure inside the sensor.
“Now, how can they know the reference atmospheric pressure that follows weather changes? The trick is in the cable which has a small ventilation hose that brings the external atmospheric pressure into the sensor. That’s why you need to specify the cable length before purchase and the connection point must be above the water level.”
They have this one, with 1 km wireless range if WiFi is an issue.
I don’t know how they treat variations in atmospheric pressure, but they are very responsive, so just send them an email.
They can also provide you with a longer tube if the original one is too short.
Your sensor has a 4…20mA output which is perfect for long cables that might encounter electronic disturbances and “higher” resistance due to long distances.
You could just use an ESP8266 [ESPHome] (f.ex. Weemod D1) with an 4…20mA to voltage converter (like this one) and the attached sensor to measure an anlogue value that you just need to calibrate.
The calibration can directly be stored in the ESPHome config. So you have a WLan sensor that directly gives you Water level in m. You can also directly add the Temp sensor to it so you have an all-in-one sensor set
More perfect would be the RS485 option, but I did not see any documentation on this on the sensor seller. If you need to reverse engineer this one its likely not worthy. With good documentation it will likely directly give you pressure values.
I’m not sure to fully understand.
You wrote :
“Your sensor has a 4…20mA output which is perfect for long cables that might encounter electronic disturbances and “higher” resistance due to long distances.”
“output which is perfect for long cables” but after about resistance and disturbances.
So I can’t connect the sensor straight to a 35m long Cat 7 (with lot of shields) to a board inside the house ? (in the house because here in winter I can have -40°c and 2 meters of snow).
Where need I to install the voltage converter ? Near the sensor in the well ? (It’s ok, I can easily enclose/protect it from humidity/water - in the well the temp will be around +1, we have to warm it inside with a specific warmer).
Then after the convertor I put my 35 meters long cables, to the ESP8266 in the house.
You would connect your sensor to the cat 7 cable and then put the 4-20 ma to voltage convertor inside the house. You would however need to have a termination box near the top of the well so that the sensor vent tube could be vented to atmosphere. The wire connections could then be ‘potted’ to keep out moisture. you could also run the DS18B200 +/- and signal down the same cat 7 cable.
You mention 2 metre of snow so you would need your termination box vent tube to be above that level and covered but still open to air. If you vent the sensor into the small box and terminate the sensor wires in a small box near the well, then run a separate vent pipe from that box, say 2.5 metres high, you will have a good system. I would use two waterproof cable glands where the cat 7 and sensor cables enter the waterproof box. A plumbing gland can be used for the vent pipe so that it is sealed. That way the box is completely sealed with its inside at atmospheric pressure, therefore the sensor is also at atmospheric pressure.
But not really with electronics.
If I put 35 meters of Cat 7 wires between the sensor and the current/voltage convertor, I’m not sure that is the good way.
Adding 35m of wire will increase the resistance, and it’s why I understood to put the current > voltage converter at the beginning near the sensor, because the voltage will not be worried by the long cable. Then inside the house I can connect to the board that will receive “data”/signal to send to Home Assistant.
Exactly the opposite way. If the sensor gives a voltage as an output signal, this voltage does not have a lot of current. So an external electric disturbance (say a running pump) could easily alter this voltage. Your CAT 7 cable is a good way to prevent that, still it is not perfect. In additition to that, every meter of your cable has an electric resistance that might not be constant (temperature, humidity…) Therefore you get a voltage drop that is not calculatable.
With the 4…20mA output, your signal is transferred via the current (f.ex. 0mA: broken cable …4mA lowest signal … 20mA highest signal).
Let’s say the sensor wants to set a constant current of 12mA because that’s your value. It increases the voltage, until 12mA are flowing. Do not get me wrong: The volatage in this scenario ist just a tool to adjust the current.
So if we have a loop of:
Sensor -> short cable -> current/voltage converter -> short cable -> sensor
the voltage the sensor might need to have 12mA flowing is f.ex. 3V
If we exchange the short cable with the long one, the voltage needs to be increased to again have the 12mA of current (f.ex. 4V).
If an electromagnetic disturturbance comes along, it not only needs to enter the cable but needs also a lot of energy to disturb the current flow, which would not be typical.
So long story short: If you connect the sensor directly to the current/voltage converter, you can directy use a voltage output sensor, with all the disatavantages mentioned. To make full advantaga of the current sensor, place the converter as close as possible to the ESP for most best performance.
@CeeCee
Hey, I’ve read some of your responses. I have a 4-20ma sensor with a current-voltage converter on a node mcu. I can get voltage but am having trouble calculating water height from the reading. The calculation given by the manufacturer doesn’t seem to work.
Your elaborate code is very helpful for pointing you in the right direction ;-).
In general: always convert the voltage into mA and then start working with the formulas. And: the height the sensor is calculating is the height of water above the sensor, not the height from the top of the water to the bottom of the tank.