PeterH:
If you're leaking for leaks, presumably the way to detect that is that the flow rate never quite drops to zero. So, rather than looking for a sustained high flow, you would need to look for a sustained period with a constant, low but non-zero flow. With that many outlets, there may only be a few times of the day when you can confidently predict that the flow should really be zero.
Very interesting idea, certainly one that had not ever crossed my mind!
I'm thinking it should be easy to do this, using an if statement to check if current flow is lower than the "previouslow" variable and write the new low to that variable. Eventually it should settle to a constant minimum value, and we would know roughly the size of the water leak. Brilliant!
I think I can confidently say that between about 12am-5am, flow should be minimal, except the few services running sporadically like pool refilling and effluent systems...
I have since found out that there are 2 main water feeds in a loop arrangement, so I need a sensor in each main pipe and aggregate the two together.
Now it makes it tricky...what sort of issues would arise attempting to use two interrupts concurrently with essentially the same program associated with it on a single Arduino? I'm guessing possibly a few lost pulses if the second interrupt occurs while the first is still processing?
Thank you for your excellent suggestion!
Cheers,
Jason