I built a flood detection sensor based on DS18B20. The system detects and communicates the state of flood detection by changes of the DS18B20 parasite "power" output state. In short, the power pin have a power cut off circuit when the sensor detects water through the probes. The advantage of such a system is the fact that such a sensor still function as a temperature measurement and still communicates via a one wire line (1 cable + ground) and does not require connection using a protocol, e.g. I2C.
Everything works fine, but is it possible in Easy ESP to enable the option of sending a topic via MQTT in a situation when the parasite power supply state for DS18B20 changes?
Thanks in advance.
Easy ESP and DS18B20 as flood sensor
Moderators: grovkillen, Stuntteam, TD-er
Re: Easy ESP and DS18B20 as flood sensor
Not yet, but I like the idea as it can also be used to detect (wiring) issues via events.
Re: Easy ESP and DS18B20 as flood sensor
Great to hear! Thanks. Looking forward for that funcionality in next versions.
Manual for those who would like to build such sensor...
Sensor works using 1W (one wire) protocol, so you should remember about proper wire connections to ESP (e.g.):
You can mount all parts on very small (like 18mm x 22mm) universal PCB board. Part placement diagram (this is parts side view - drawn connections should be made from tin on the other side of PCB [mirror view]):
Manual for those who would like to build such sensor...
Sensor works using 1W (one wire) protocol, so you should remember about proper wire connections to ESP (e.g.):
- Line (at the end) termination (pull-up resistor between DATA pin and 5V) with R=4k7 (or less, if whole 1W line is much longer - a dozen, several dozens meters; minimum resistor value is 2k2).
- If some of your DS18B20 are still not stable (you can obseve that when your multiple DS18B20 sensors periodically appear and disappear in ESP Easy UI detected sensor list) you can add 10uF [microfarads] electrolytic capacitor between 5V and GND (directly before each of those non stable sensors).
- As I mentioned before this leaks monitoring method uses only 2 from 3 1W cables: DATA and GND (no Vdd 3-5V cable needed). - In my case I'm using ground and a one of free cables from the alarm system (which is present in every room).
- Long distance installations (several dozen or even hundreds of meters).
- Possibility to connect multiple sensors in one line or star structure using same cables (in some cases mixing line with star structures works too).
- Possibility to connect all sensors to 1 GPIO in ESP.
- You can use other different (light, smoke, etc.) sensors on the input (with open/close output) and make them work via 1W.
- no leak - ...28.DSIDXXXXXXXX\power = 1
- leak - ...28.DSIDXXXXXXXX\power = 0
You can mount all parts on very small (like 18mm x 22mm) universal PCB board. Part placement diagram (this is parts side view - drawn connections should be made from tin on the other side of PCB [mirror view]):
- P1 and P2 are probe connectors (you can use jumper pins).
- Doted lines are wire connections between those points.
- To make it waterproof, after assembly:
- put all in heat shrinkable tube (tube should be about 1-2cm longer then PCB board on both ends),
- fill tube (at least bottom of tube/senor) with e.g. sanitary silicone from both tube ends,
- heat up/shrink the tube and squeeze righ away each tube end (when tube is still warm) making top and bottom surface to stick together, what will make botch ends sealed (around the cable too),
- make point holes in places where probe pins are trying to sick out and if you wish, above head of DS too (for better temperature sensing - in this case think about a way to seal this point to make whole sensor waterproof again).
- Now you can just lay down sensor in place when the leakage risk exist.
Who is online
Users browsing this forum: Ahrefs [Bot] and 42 guests