Need advice on Water tank level monitoring

One of these (5PSI variant): 5v 1/8npt Oil Fuel Air Pressure Transducer Transmitter Sensor 5/15/30/60/100/150/200-1600psi - Pressure Sensor - AliExpress

If you go down this path, be aware the “1/8NPT” thread is a tapered thread so you can’t readily tap something and fit this in - I wasted hours finding this out. I fitted min to an ABS plastic Tee fitting and used the transducer to cut it’s own thread which makes it tight and waterproof. I fitted a baffle with a pinhole in it to minimise water flow pressure changes, but this isn’t good enough.

image

None come with an ADC, but your ESP32 has enough. Connect each sensor to a different ADC on the ESP32.

Oh damn ok thats good to know! Thanks!

Thats super cheap, will that sensor measure the pressure of a 30,000L tank?

Compared to the sensors im looking at, this is so much cheaper.

Multiple float switches will give general water level; full, 3/4, 1/2, low. Available readings are based on sensor count.

You can do same with multiple water sensor

Both those are available off the shelf

so one of these is fine.

The only reason is its just ready to dip the way it is. Way easier then playing around with trying to seal and waterproof it

1 Like

Should do it - very easy to install, that’s the kind I’m thinking of trying next.

If you want to connect to your ESP32 ADC you’ll also need the current loop > voltage converter, something like this: 0/4-20mA turn 0-3.3V5V10V Voltage Current to Voltage Module Converter Signal Generator | eBay

Dean, That’s the one I’m using. i bought from an Oz supplier and it came with the current to voltage converter. I have sent this signal through an ADS1115 though as apparently the ADC on the ESP32 is not real flash. Everything will be powered off a 5v supply with the sensor receiving it’s power from a dc/dc step up.
Have nearly finalised my bench testing and will be putting it into a box and throwing the sensor in my tank this week I hope. I have read that for the first two days I should have the sensor out to get my ‘empty’ tank reading calibrated. My tank is a 22000 litre and is located about 30m head above my house.
I fully intend a proper write up as this project has taken me nearly 4 years. I kept getting sidetracked into other brilliant integrations in HA.
Pat

Patraff, sounds good! I think im going to bite on these then.

Any chance you could link me to the one you bought as many that im looking at dont have the current to voltage converter.

I look forward to the write up!

Thanks

I got mine from core-electronics. It’s a bit pricier than just buying off ebay. I reckon they might both come from the same supplier. Here’s one on ebay that looks exactly the same AU Submersible 0-5mH2O Water Level Transmitter Liquid Transducer Sensor 6 | eBay
You’ll find the current to voltage converters cheaper on ebay as well.
Pat

Is this the one you got?

Gravity: Throw-in Type Liquid Level Transmitter | DFRobot KIT0139 | Core Electronics Australia (core-electronics.com.au)

Or this one?

Gravity: Analog Water Pressure Sensor | DFRobot SEN0257 | Core Electronics Australia (core-electronics.com.au)

Dean
the Df robot one.
Pat

Thanks, do you know when they say a measurement like 5m, are referring to 5m squared of water? Or 5m depth maximum for pressure readings?

I’m just trying to working out if it will be too much pressure for the sensor

Well I’m hoping that it means 5m depth - otherwise my past 3 years of tinkeering will be met with a roar of rage.

Just curious as I just got this response from someone locally here

That sounds a little weird. If I dive into a pool and go to 3m the pressure is ‘x’’. If I dive into an ocean and go to the same depth my pressure is ‘x’ also (discounting salt effects etc).
The amount of water surrounding the depth should have no influence on the vertical pressure.
Pat

Haha I agree, I recon he’s trying to pull a sales tactic on me.

That is so interesting!

I’m still just trying to get my head around this a little bit.

The majority of the sensors out there appear to output say 0-5v.

What do I need to read the output on a esp32? ADC? and why?

I understand the esp32 has a logic level or 3v3.

Sorry, do you mind just explaining to me, im not sure what im missing to understand this.

What is the board for included with the dfrobot version.

Thanks

I’ll try and help out, and understand your confusion (been there!).

For more accurate water level reading, depending on your sensor type your build would be:

  1. Pressure sensor (4-20mA loop) > current/voltage converter (0-5V output) > ADS1115 (analogue in, digital out) > ESPxxxx.
    OR
  2. Pressure sensor (0-5V) > ADS1115 (analogue in, digital out) > ESPxxxx.

As you note the majority of these pressure sensors have a 0-5V, or a subset of that range, as it’s the simplest to read. Note that often the “empty tank” reading is a non-zero voltage (like 0.5V) so it’s easy to differentiate from a “my sensor’s broken” reading. You fix the offset with a filter / offset in code.

A voltage output is easy to read on an ADC, but if you’ve got a long-ish cable run from the sensor then you’ll see some voltage loss and need to calibrate your readings. On a long cable the drop could be enough that your sensor doesn’t work, but I’ve tried my 5V sensor at 3.3V and it’s worked fine so I don’t think the supply voltage loss over a 5-10m cable run is a concern.

Switching to a current loop (4-20mA) gets over voltage loss issues - these loops are very common in household alarm circuits with lots of PIRs using a current loop for movement sensing. But ESPxxxx devices don’t have a current loop interface so you’ll need to convert back to 0-5V to read it. Dfrobot helpfully throw one of these boards in knowing most people will need them.

While the ESPxxxx is great at many things, it’s not so great (apparently) at reading an analogue voltage input. I’ve never plotted it but others have noted non-linearity in the ADC conversion - so you may need to add a filter or conversion table to code if you’re really concerned. The ESP32 (Wemos clone board) should read voltages up to around 3.2V but mine seems to unhelpfully max out at 1.04V for some reason.

For water head, I wouldn’t care about being out a few % but seeing my tank level go UP when I’m using water (due to ADC non-linearity) would really bug me!

To add extra ADC inputs or to get more accurate readings, as @Patraff noted above you can add an external ADC module like the ADS1115 which has a load of analogue inputs and is quite linear, with it’s digital output connected to the ESPxxxx.

It would be SO much simpler if you could buy a pressure sensor with a one-wire or I2C interface, and read a digital output. I gave up using analogue temperature/humidity sensors years ago and have never looked back.

1 Like

How’s everyone plotting along with things on this matter?

I still haven’t bought anything. Is everything working as expected and you are happy with the results?

I’m still trying to work out the best sensor to buy! Have you guys had your sensors in your tanks for long? No dead sensors from bad seals etc.

Ideally, I want to buy once and buy right as the wait to get one will be long.

There are just so many different options out there for these things!

Appreciate the update!