I wounder if anyone tried to do something similar using esphome with JSN-SR04T or other sensors
I tried with JSN-SR04T and A02YYUW but I’m not detecting any change in the reading
The reason I want to use ultrasonic mainly because it will not require any pipe modification and it will be easy to install (I don’t care about reading anything else like temperature or pressure or water consumption)
What are you tring to detect, tapwater or a drainpipe?
Inside or outside your house?
When looking at your sensors, as far as I can see, it meant for measuring distance. It’s more for detecting the water level, for example, in a barel or a tank.
Maybe we can help you figure out the best solution for you when providing more information.
Assuming you have a proper ultrasonic device measuring correctly and the correct pipe material for the device …
Δt=t downstream−t upstream
Or if you have just a water meter installed and only worried about the pipe at night or during times no water is being used,
if the water meter is climbing with nothing on, there is a leak.
Aft - I think you are looking at 2 different types of sensors here. The one you linked to aliexpress is a pair of flow sensors (and extras), whereas JSN-SR04T (or A02YYUW) are distance sensors.
Both types are using ultrasonic, but with different setups for different purposes.
Just thinking out of the box, if the pipe is none-ferro (like PVC), can´t you try to use a Hall-sensor and a opposite magnet somewhere and see what happens?
Also, I did some Google reading and a microphone (acoustic, like @Karosm suggested) could also be used (tap-water pipes), otherwise a non-intrusive is kind of hard to do without being more expensive.
I’ve installed a couple of flow sensors, both copper pipe and PVC. They work great. To me, what you’re doing looks like trading the hassle of cutting pipe, etc. with the hassle of trying to get an ultrasonic sensor to work.
Don’t get me wrong, I encourage you to develop your non-invasive water flow sensor and post your results here and in Tom’s Hardware. But if you want something that works and is reliable, I’d recommend cutting the pipe.
I want to use it in the main pipe (pvc) that goes to my house from our main tank to detect if the water is running specially at night which could be a water leakage
Flume and other solution are not an option because we are using tank - many houses use tanks in my city
I had a Hive water leak sensor but they discontinued the use of it so I opened it up to see if I could re-purpose it.
It has a clamp on sensor that detects water flow. It had an esp chip in it but it had lots of glue over it so I couldn’t get to it.
No idea how the sensor works ? They are available cheap on eBay.
No, they don’t work this way (permanent magnet + magnetic field sensor).
While there is a magnetic field used in these flowmeters, it is not a static but an alternating field.
It is not a change in magnetic field that is sensed, but a voltage.
The working priciple is much like in a Hall sensor, where flowing electrons deflected by a magnetic field produce a voltage.
@tmo to be clear, I was not trying to detect the amount of flow, just detect if there is flow or not. I assumed when water is polarized it could be detectable.
That’s why I was thinking of a Hall sensor as a kind of DIY detection.
Nevermind, as I said earlier, I was just thinking out of the box.
@mrahmadt Just out of curriosity because I’m not familiar with this kind of setup, could you use the level of the tank as a source for detecting flow? Or is it filled automatically? How does that work?
@mrahmadt it would help if you provided more information about exactly what you are trying to achieve.
What kind of leak? A toilet/tap that is constantly running, a drop once a second, or once a day?
How correct does it need to be? Is it okay if it says there is a leak when there is none 1% of the time? What about if it says there is no flow/leak when there really is?
I have some experience with water systems. I have a well with a pump in it that fills up two bladder type pressure tanks. I have a few revenue grade water meters and multiple pressure sensors. Water meters don’t work with very low flows, which means they probably won’t show a very slow leak. Pressure sensors might work. Since there should be periods of no flow, on my system with a pressure tank of the pressure drops there is likely a leak. But, it isn’t quite that simple, since the pressure also changes with temperature.
If your goal is to play around and have fun, experimenting with sensors of various type will likely provide you with hours/years of fun. If your goal is to actually solve a particular problem and you want help, help us understand the actual problem you want to solve.