water leak sensor

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
KampfHund
New user
Posts: 3
Joined: 06 Nov 2017, 08:30

Re: water leak sensor

#11 Post by KampfHund » 08 Nov 2017, 21:11

Hi Guys,

I have the same Problem...
I want a simple Solution to Connect 2 wires to nodemcu8266 with easyesp in deepsleep and wakes up from deepsleep when the two wires are in contact with water.
next step should be a message to my telegram bot.

Is there a simple Solution?

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#12 Post by karl222 » 18 Nov 2017, 17:06

Hi,

I have just tried a solution where I start the ESP out of deep sleep by giving a GND Signal to RST via a BS170 MOSFET Transistor. the current on the gate of the BS270 which is led through water is sufficient to errect the BS170...

regards
karl
Last edited by karl222 on 26 Nov 2017, 18:01, edited 3 times in total.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: water leak sensor

#13 Post by papperone » 18 Nov 2017, 23:41

karl222 wrote: 18 Nov 2017, 17:06 Hi,

I have just tried a solution where I start the ESP out of deep sleep by giving a GND Signal to RST via a BS170 MOSFET Transistor. the current on the gate of the BS170 which is led through water is sufficient to errect the BS170...

regards
karl
Great, woudl you mind to share the schematic or at least some pictures of your test sensor?
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#14 Post by karl222 » 19 Nov 2017, 08:14

Hi,

I just did a fritzing for you.

As a casing I ordered a few of these and will take out electronics in order to replace it with esp: https://www.ebay.de/itm/Wireless-Buzz-W ... 2749.l2649

regards
karl

edit: I am using the BS170 NOT the BS270
Attachments
Water Leak Sensor_Steckplatine.jpg
Water Leak Sensor_Steckplatine.jpg (552.27 KiB) Viewed 22625 times
Last edited by karl222 on 26 Nov 2017, 18:01, edited 1 time in total.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: water leak sensor

#15 Post by papperone » 19 Nov 2017, 12:24

thanks, any specific reason you used a mosfet instead of a simple NPN transistor?
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#16 Post by karl222 » 19 Nov 2017, 12:48

It was a hint from an other user. I think a standard transistor needs a higher current but maybe it works with a BC237 as well...

with the BS270 it works, I can confirm ;)

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#17 Post by karl222 » 19 Nov 2017, 15:30

I'd like to challenge another approach.

why not use the bs170 to power up the esp. this saves standby power at all. bs170 doesn't consume any power at all, when there is no water detected, only in case of high water gain of bs170 is errected and esp is powered up and sends a message on boot.

I have tried this already but the esp doesn't come up properly. instead of consuming 70mA it consumes 180mA and the blue led blinks slowly...

any ideas on my idea... ;-)

regards
Karl
Last edited by karl222 on 26 Nov 2017, 18:01, edited 2 times in total.

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: water leak sensor

#18 Post by Shardan » 19 Nov 2017, 16:04

Nearly any small N-FET should work (BS270, BSS138, 2N7000, 2N7002.....)

Just one point:
These FETs are somewhat sensitive to electrostatic discharge.
So a serial resistor between gate and sensor and a small ceramic capacitor 10nF .. 47nF between gate and ground
gives at least some protection against static voltage.
Remember, this makes the sensor a bit slow (3..5 Seconds).

Standard NPN transistors won't work reliable with such simple circuit, it needs
more electronics around to make that work.
The reason: Standard Transistors are driven by current, FET's are driven by (nearly pure) voltage.
For a standard transistor it needs a low resistance of water on the sensor, about 10..100KOhm.
It needs a big sensor and a lot of water, some drops of pure water won't do.
Regards
Shardan

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: water leak sensor

#19 Post by papperone » 19 Nov 2017, 16:22

Shardan wrote: 19 Nov 2017, 16:04 Nearly any small N-FET should work (BS270, BSS138, 2N7000, 2N7002.....)

Just one point:
These FETs are somewhat sensitive to electrostatic discharge.
So a serial resistor between gate and sensor and a small ceramic capacitor 10nF .. 47nF between gate and ground
gives at least some protection against static voltage.
Remember, this makes the sensor a bit slow (3..5 Seconds).

Standard NPN transistors won't work reliable with such simple circuit, it needs
more electronics around to make that work.
The reason: Standard Transistors are driven by current, FET's are driven by (nearly pure) voltage.
For a standard transistor it needs a low resistance of water on the sensor, about 10..100KOhm.
It needs a big sensor and a lot of water, some drops of pure water won't do.
Thanks Shardan for the clear explanation :)
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

KampfHund
New user
Posts: 3
Joined: 06 Nov 2017, 08:30

Re: water leak sensor

#20 Post by KampfHund » 19 Nov 2017, 21:06

Hi guys,

nice :mrgreen:

I will Test it.

I tested before a Flip Flop with 3 transistors, this Works Perfect but you need many things...
https://github.com/esp8266/Arduino/issues/1488
( Fritzing - Monostable Flip Flop )

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#21 Post by karl222 » 25 Nov 2017, 15:55

Shardan wrote: 19 Nov 2017, 16:04 Nearly any small N-FET should work (BS270, BSS138, 2N7000, 2N7002.....)

Just one point:
These FETs are somewhat sensitive to electrostatic discharge.
So a serial resistor between gate and sensor and a small ceramic capacitor 10nF .. 47nF between gate and ground
gives at least some protection against static voltage.
Remember, this makes the sensor a bit slow (3..5 Seconds).

Standard NPN transistors won't work reliable with such simple circuit, it needs
more electronics around to make that work.
The reason: Standard Transistors are driven by current, FET's are driven by (nearly pure) voltage.
For a standard transistor it needs a low resistance of water on the sensor, about 10..100KOhm.
It needs a big sensor and a lot of water, some drops of pure water won't do.
Hi,
I don't understand what you mean exactly
it is clear that there should be a small capacitor between gate and ground
you mean gate --- resistor 10k --- water --- +

but it doesn't work. esp vdd goes to 3,0V only and consumes 120mA instead of 70mA.

any ideas how to get the MOSFET powering up the ESP properly. via the VDD pin..

thanks
karl

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: water leak sensor

#22 Post by kimot » 03 Dec 2017, 23:37

But do not forgot, that if you wake up your sensor only when water leak, you will never know, if your sensor is still alive after some time.
Better way is wake up sensor periodically and send some data to controller ( with battery voltage for example ).
And if controller do not receive any data for some period, it will send alert to you.
Then you have assurance, that your sensor is ready detect water leakage all the time.

You can use simply internal timer and wake up cca every hour with 20 mikroAmp. consumption in this time.
Or build something sophisticated and wake up every 2 hours with consumption 1 mikroAmps between wake ups.
Look here for inspiration:
http://www.kevindarrah.com/wiki/index.php?title=Pusher

karl222
Normal user
Posts: 90
Joined: 23 Aug 2017, 17:18
Location: Vienna

Re: water leak sensor

#23 Post by karl222 » 05 Dec 2017, 10:31

You are right, probably the better way...

Thx

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: water leak sensor

#24 Post by papperone » 05 Dec 2017, 14:53

kimot wrote: 03 Dec 2017, 23:37 But do not forgot, that if you wake up your sensor only when water leak, you will never know, if your sensor is still alive after some time.
Better way is wake up sensor periodically and send some data to controller ( with battery voltage for example ).
And if controller do not receive any data for some period, it will send alert to you.
Then you have assurance, that your sensor is ready detect water leakage all the time.

You can use simply internal timer and wake up cca every hour with 20 mikroAmp. consumption in this time.
Or build something sophisticated and wake up every 2 hours with consumption 1 mikroAmps between wake ups.
Look here for inspiration:
http://www.kevindarrah.com/wiki/index.php?title=Pusher
I agree this page bring a lot of inspiration but still... I don't see this guy using deepsleep for waking up on a regular interval! Am I missing somethign so obvious that I can't see in his schematic?
I will brainstorm with myself (the best way to come up with bright or sh***y ideas :mrgreen: ) as I'd like to build such setup for several sensors (including water leak which is in my high priorities when few months ago I had my ground floor flooded after a broken water pipe while nobody was at home... Murphy's law) and the "must" are (1) running on batteries (2) last at least 6 months between recharging cycle (3) send out battery level status to prevent sensor dying without alert
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: water leak sensor

#25 Post by kimot » 05 Dec 2017, 16:26

He do not use deep sleep because high consumption 20 mikroAmp and wake up interval max 74 minutes.
His solution uses timer to wake up possibility every max 7 200 seconds ( not wake up really - switch on ESP and through sw action switch off then ) or through external event.
Consumption 1 mikroAmp.
Will bi nicer "wake up" one time per day - maybe with some RTC chips with alarm pulse possibility or another long interval timer.

papperone
Normal user
Posts: 497
Joined: 04 Oct 2016, 23:16

Re: water leak sensor

#26 Post by papperone » 05 Dec 2017, 18:01

kimot wrote: 05 Dec 2017, 16:26 He do not use deep sleep because high consumption 20 mikroAmp and wake up interval max 74 minutes.
His solution uses timer to wake up possibility every max 7 200 seconds ( not wake up really - switch on ESP and through sw action switch off then ) or through external event.
Consumption 1 mikroAmp.
Will bi nicer "wake up" one time per day - maybe with some RTC chips with alarm pulse possibility or another long interval timer.
Yes got it, I was before looking the only IC I didn't know (TLP5111) and it looks perfect for such a job.
I've already a latch circuit I designed to allow micro to turn off completely itself, but it was for a project where the turn on was to be manually activated then the micro performs itw own cycle of actions and turn itself off completely once done using a GPIO as a trigger.
I think I will try to add this IC to my latching switch circuit so to have the timely wake up and as well the sensor wake up, thanks a lot for the link!!
My TINDIE Store where you can find all ESP8266 boards I manufacture --> https://www.tindie.com/stores/GiovanniCas/
My Wiki Project page with self-made PCB/devices --> https://www.letscontrolit.com/wiki/inde ... :Papperone

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: water leak sensor

#27 Post by kimot » 02 Mar 2018, 21:27


Finnarduino
New user
Posts: 3
Joined: 19 Jun 2017, 19:48

Re: water leak sensor

#28 Post by Finnarduino » 07 Mar 2018, 10:50

hi! is it possible to create water flow sensor by using sound detection?

How this works?
streamlabswater.com

ziancolins
New user
Posts: 1
Joined: 08 Mar 2018, 07:47

Re: water leak sensor

#29 Post by ziancolins » 08 Mar 2018, 07:51

Finnarduino, I think you should go to the youtube, and watch videos for understanding the process or work of water flow sensor.

Post Reply

Who is online

Users browsing this forum: No registered users and 48 guests