Water depth sensor identify cable

I bought about 5 years ago a water tank level kit. The unit was great until a failure in a connection pin left a $500 system useless.
I then became interested in home assistant and am now trying to ensure that all new devices have some way of linking back through hassio
I now have a great water depth sensor but i need to work out how to use the wiring. Most of the sensors written about and used in hassio are 3 wire.
The sensor i have is 4 wire. I have contacted the manufacturer for assistance but they only want to sell me more products.
I understand the basics of sensors being that a voltage pulse goes down and a voltage pulse returns and the difference between the two provides a way of calculating depth.
Attached are two pictures showing the sensor and the 4 wires. If anyone has come across these before and can assist that would be great. Alternatively point me in the right direction for trial testing cables?
Much appreciated
Patrick

Maybe if you could tell us what kind of sensor it is, it would help. manufacturer? make? model?

There are many different types of sensor out there, you seem to think this is an ultrasonic sensor, but it doesn’t look like one. This looks like a pressure sensor. There are also many different types of interface as well, there is no way to tell what type of interface this sensor has without the model number.

It could be I2C, SPI, 20ma, analog, serial - no way to tell without more info.

Hi Nick,
Sorry i knew i left something out.
Its labelled SmartWater and has a serial number AB003178.
I understand it is a pressure sensor as it goes at the bottom of the tank. Don’t they rely on a voltage in and voltage out difference to calculate water depth?
I believe i have correctly identified it as a SW800. At least when i contacted the manufacturer they didn’t say that my identification was wrong.
I don’t still have the control unit though unfortunately. This may have helped to do some trace back of circuitry.
It was powered by a 9v battery and solar top up.
This unit then sent a wireless signal to the display unit.
Patrick

So this is just the sensor from the kit?

The way a pressure sensor is used to measure the depth of a tank is one of two ways:

  • Relative pressure (with a vented cable)
  • Absolute pressure, with an atmospheric pressure sensor (in the control unit)

I don’t know if the sensor has a vented cable or not. you are basically measuring the difference between atmospheric pressure and the water pressure, which = water depth (for a given density of liquid).

The problem is, with 4 wires, there are several different digital communication protocols that could be used, it could be i2c, spi, or most likely 4-20mA loop. It could even be analog. There is really no way of telling without a specific model number on the transducer.

If it isn’t a vented cable, then you are also missing the atmospheric pressure sensor (in the control unit), so you only have half the sensor anyway.

I don’t think you are going to get far with just the sensor.

Looks like this is similar to this
I have got one working through ESPHome

esphome:
  name: watertank1
  platform: ESP8266
  board: d1_mini_pro

wifi:
  ssid: 'xxxx'
  password: 'xxx'

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: 'xxx'

ota:
  password: 'xxx'

  
sensor:
  - platform: dht
    model: DHT22
    pin: D1
    temperature:
      name: "Tank Temperature"
    humidity:
      name: "Tank Humidity"
    update_interval: 60s
  - platform: adc
    pin: A0
    accuracy_decimals: 0
    unit_of_measurement: "%"
    update_interval: 60s
    name: "Tank1 Water level"
    filters:
      - lambda: |-
          if (x <= 0.59840) return x;
          else return {};
      - calibrate_linear:
        - 0.15625 -> 0.0
        - 0.28027 -> 28.5
        - 0.37109 -> 50.0
        - 0.59840 -> 100
      - filter_out: 0
      - sliding_window_moving_average:
          window_size: 40
          send_every: 40

switch:
  - platform: restart
    name: "Watertank1 Restart" 

I calibrated the sensor at different depths and entered the values in Esphome sketch

- calibrate_linear:
        - 0.15625 -> 0.0
        - 0.28027 -> 28.5
        - 0.37109 -> 50.0
        - 0.59840 -> 100

0.15625 v at normal atmospheric pressure > 0%
0.59840 v at the bottom of the tank > 100%

You do still need to subtract atmospheric pressure (which varies), otherwise your water levels will fluctuate with the weather (even if the water level does not change).

It depends on the depth of your tank, atmospheric variations make a difference of about 10cm. In a 10m tank, that probably doesn’t matter - I am measuring a 20cm tank - so it does!.

I guess I am seeing the vent pipe at the top If you look closely at the first picture

Nick and Anil,
hey thanks for your input. The sensor does have an atmospheric pressure tube that goes to outside air. Anil I remember our conveersation about this. I was hoping to avoid buying another sensor when I already had one. I looked at the one you have and it is a 3 wire.
So I have two red wires a blue and a yellow.
I’m currently thinking that a 5v signal goes down the red wire with a blue to ground. The return voltage signal comes back on another red and the yellow goes to ground. Then an ADC shows that voltage drop as a value that is then put into Anil’s equation?
However I’m not quite sure why there is two reds. Anil’s unit that he used only has one.
Does that make sense?

I didn’t spot the vent in the first picture - good catch!

It could be something like this https://www.sensorsone.com/imcl-low-cost-submersible-pressure-sensor/

data sheet https://www.sensorsone.com/wp-content/uploads/2013/10/IMCL.pdf note that what it calls a “2 wire” interface actually has 4 wires, and the “3 wire” and “4 wire” interface has 5 wires, but one is a cable screen wire (which you might not have).

No real way to tell, if you are lucky, it’s just an analog voltage sensor.

Nick
hey thanks for your help. I guess I can just send a 3.3v signal down one of the red wires and then start testing what happens on the others.
fun and games
Patrick

Guys,
I think I may have found the 4 wire version datasheet. Apparently I can measure temperature and current? This is from https://www.pmc1.com/Customer-Content/www/Products/Files/VL5005_809.pdf
I guess it’s now a bit of testing to see which one is temp and which is current.

pressure meter