ESPHome Water leak detector With a D1 mini board

So I’ve been trying to make a simple water leakage detector to put under my kitchen sink.
It has been challenging as I don’t have a lot of background in electronics.
I’ve seen @tom_i Idea and he helped me a lot -

But I decided to make it even simpler and had a success with the analog pin of the D1 mini.
Next time maybe I will use something like a rain sensor instead of this probe, a good idea I think is to wrap it in a sponge so if there is a leakage you can know quick enough…
The problem with this probe is that it has to have a good contact with the water, so it’s not that sensitive.

Giving back to the community, here are the specs for this project:

Parts:

Schema:


(Notice that A0 is on the 7th pin and not the 8th like in the diagram)

YAML:

Sensitivity can be altered by changing this value:

return analog < 2.55;

You can see here my original article, I’ll try to keep it updated.

10 Likes

Looks a nice simple project! Will bookmark as I’ve been contemplating buying some water leak sensors. I wonder how long this would run on a battery for.

Also what software did you use to make the schema diagrams? That’ll be useful to document some of my other projects.

The software is Tinkercad

Many years ago I converted a smoke detector to a water leak sensor by just stripping of the plastic from two cables and taping them on the floor below the dish washer with a small distance between them then just hooking it to the test button connection.

3 Likes

Awesome idea :slight_smile: How much time did it held? Problem is with wires that with contact of water they get corroded pretty quick, a probe or a rain sensor will probably be more durable

Since we didn’t have any water leaks then it was no issue.
When it was decommissioned (10-12 years later) it was still working

That’s amazing!

Hello,

I have issue with Wemos ESP32 module in esphome (with ESP8266 everything fine): Allways 2.45V. Code part:

esp32:
board: wemos_d1_mini32
sensor:

  • platform: adc
    pin: 35
    #pin: A0
    icon: mdi:water-alert
    name: “Oraputes32 Nutekejimas”
    id: orapute32_nutekejimas
    update_interval: 5s
    filters:
    • multiply: 2.4
      binary_sensor:
  • platform: template
    id: Oraputes32_nutekejimo_statusas
    device_class: moisture
    name: “Oraputes32 apsemimo statusas”
    lambda: |-
    float analog = id(orapute32_nutekejimas).state;
    return analog < 2.05;

Always 2.45V if it is putted contacts in water or no. It doesn’t mater.

Hey @juavinas,
Please refer to the esp32 part in this documentation:

Cool. Done exactly the same😂