Water alarm with ESP01, deep sleep and message via mqtt

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Dondolo
Normal user
Posts: 77
Joined: 03 Jul 2019, 06:56
Location: Germany

Water alarm with ESP01, deep sleep and message via mqtt

#1 Post by Dondolo » 02 Apr 2021, 20:50

Hi,

I would like to build a water alarm sensor with the ESP01 (battery 3AAA).
I modified the ESP01 so that it goes into deep sleep. When water should be detected
the ESP01 wake up and report. The ESP01 should wake up at regular intervals
and send its status including the battery voltage via mqtt.

In order for the ESP01 to boot, the reset pin must be briefly set to high.

What's the best way to do this? With a transistor?

Greetings Dondolo
Attachments
esp01.png
esp01.png (70.79 KiB) Viewed 7604 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Water alarm with ESP01, deep sleep and message via mqtt

#2 Post by TD-er » 03 Apr 2021, 09:33

A transistor is one option. Just make sure the pulse is a nice block pulse.
It is set to the reset pulse, so if the pulse remains high (or gets triggered a number of times), the ESP will not boot at all or continuously reset.
Another problem here is that the ESP still consumes some power. Typically 60 uA and some repor that if the sleep timer has been passed the ESP is not as dormant as before, thus drawing more sleep current until it wakes.

So why not use the water sensor to power on the ESP instead of trying to wake it?
You could use a FET to power on the ESP and keep it powered until you decide to power it off again.

I am sure I did see some video on it, but I cannot find it right now.
I did find this nice project: https://homecircuits.eu/blog/battery-po ... ot-logger/


Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests