Hello to the Arduino community. "Water" project advice...

Hello to the Arduino community.

Last month I had a pipe break and more than 9.000 litres of water flowed at my flat and the flats below mine. Three families had to move for a few days and many money will need to be spent to repair the damage. I want to try this will not happen again so...

I was thinking about controlling the access to the rooms where the water is used (bathroom, kitchen... etc.) with a "Ultrasonic Range Finder". Each time I access to that rooms, a valve will open and let the water flows. When I leave the room, the valve will close.

That's the simple idea, of course it will get more complicated, but I wanted to ask the community where to start. I think I can start with an Arduino One, but I don't know if there are any restrictions about how far I can use the "Ultrasonic Range Finder". I can use a 12v motorized valve to stop the water at the main pipe...

I'm full of doubts, just need some advices to get started.

Many, many thanks for the help and comments.

P.S: By the way, I apologize because of my english since I'm not usually speaking on it I'm afraid it will be sometimes hard to understand.

This sounds like a fun project.

Instead of using the ultrasonic rangefinder, what about trying a PIR device inside the bathroom. When it detects motion, the pipe is opened for 5 minutes. After that time, the pipe is closed unless further motion is detected. I think the rangefinder may give you false readings and may accidentally open or close the value at the wrong time.

You say that you want to monitor several rooms - Will these all connect to 1 Arduino?

Sorry to hear about the flood damage to your flat.

Hi! Many thanks for the quick answer. That sounds like a good advice.

Yep, the idea is to connect all the sensors to one Arduino and this Arduino will control the valve to start/stop the flow of water. It will need to let the water flows for some minutes (like you said 5mins aprox) to let the WC tank be filled. There are more things like the dishwasher and the washing machine that will need water without any presence there, but that will come later.

So, can an Arduino manage like 5 sensors (or more) to get presence movements on the rooms and then activate the motorized valve on the main water pipe?

I'll have to install cables from the Arduino to each PIR device and some times the distances will be +50m. Can it be done? It would be nice if the Arduino can manage wireless PIR sensors if they exist at all.

Thanks.

P.S: Thanks for the "condolence" about my flat.

Would it simply be good enough to have the water turned off when you are not there or when you go to bed at night? The less times you activate the valve the less chance of valve failure. Also, I'd hate to be in the shower all soaped up and have it go off.

You could implement a cap on flow time too: close the valve if there is continuous flow for more than a specified time. In my house that limit would probably be 15 minutes when someone takes a long shower. In that circumstance it would be nice if the arduino provided an alarm, whether that be a warning light or a text message/email.

wildbill:
You could implement a cap on flow time too:

Since the OP's first language isn't English I wanted to emphasize that small point by emphasizing the "too". You can use some of the ideas you get in combination with others. You could simply use the Arduino as a manual 'on/off' to start and add/try different ideas as they develop. That gives you some immediate protection and you simply fine tune it as you see how things work out for you.

I know people use flow meters in their beer brewing systems. You might consider checking those out and putting one in when you install the valve since that would be the easiest time to do it.

The problem with any system like this is that a burst pipe can do enormous damage in 5 minutes - especially if there is high water pressure. And a system that interfered with the normal water usage every 2 minutes would be very tedious.

A "slam shut" valve might provide protection. It's the sort of valve that only stays open if there is pressurized water on both sides of it. If there is a burst pipe and no restriction on the outflow the valve will slam shut automatically. It needs no external power or control. However I don't know if they are available for domestic systems.

I think I would be reluctant to install a computer controlled system and then rely on it. A power outage is more likely than a burst pipe. In my experience water systems are very reliable once they are installed properly. I suspect if you analyzed the risks thoroughly you would convince yourself that the protection (if any) provided by the computer system would not justify the cost. Turning of the water supply before you go away for a few days costs nothing.

If it were possible to design a computer detection system that could sound an alarm if there was water where it should not be you may have some additional protection. Perhaps it could detect a wet carpet?

If the burst was due to frost then a computer controlled anti-frost heater may be a better bet.

...R

Thanks for the comments.

outofoptions:
Would it simply be good enough to have the water turned off when you are not there or when you go to bed at night? The less times you activate the valve the less chance of valve failure. Also, I'd hate to be in the shower all soaped up and have it go off.

That's what I'm trying. If the "PIR" doesn't detect a presence, the valve will stay closed.

wildbill:
You could implement a cap on flow time too: close the valve if there is continuous flow for more than a specified time. In my house that limit would probably be 15 minutes when someone takes a long shower. In that circumstance it would be nice if the arduino provided an alarm, whether that be a warning light or a text message/email.

The problem with a cap on flow time is that the dishwasher and the washing machine will use the water for around 1-2 hours. I'm thinking more about a delayed closing (1-2 mins) to let the tank on the WC be filled once you are out of the bathroom.

Alarms, lights or SMS/call are nice, but they are "useless" if you are far from home. The damage the water will do in just 15mins is just unbelievable.

Robin2:
The problem with any system like this is that a burst pipe can do enormous damage in 5 minutes - especially if there is high water pressure. And a system that interfered with the normal water usage every 2 minutes would be very tedious.

A "slam shut" valve might provide protection. It's the sort of valve that only stays open if there is pressurized water on both sides of it. If there is a burst pipe and no restriction on the outflow the valve will slam shut automatically. It needs no external power or control. However I don't know if they are available for domestic systems.

I think I would be reluctant to install a computer controlled system and then rely on it. A power outage is more likely than a burst pipe. In my experience water systems are very reliable once they are installed properly. I suspect if you analyzed the risks thoroughly you would convince yourself that the protection (if any) provided by the computer system would not justify the cost. Turning of the water supply before you go away for a few days costs nothing.

If it were possible to design a computer detection system that could sound an alarm if there was water where it should not be you may have some additional protection. Perhaps it could detect a wet carpet?

If the burst was due to frost then a computer controlled anti-frost heater may be a better bet.

...R

The "slam shut valves" are nice options with a great quantity of flow, but in domestic use they are not an option, since you can have a flexible pipe from the water tap in the kitchen broken leaking water and that will not exceed from the "normal" use pressure and the slam shut valve will not go off. I'm sorry about the poor explanation but I don't really know how to explain this better in english. I'm a plumber and I know they will not work for this matter.

Close the water supply when you are away is the idea, but let the people do it manually... I'm human I will forget. Any way, the problem is not just go away for a few days. I work for +12 hours and in just a little portion of that time it will be a mess. This accident that happened to me the last month was only because of the water flowing from a broken pipe inside home while I was working.

There are commercial systems that will notice if there is any water on the floor and close a valve somewhere, but they are over 1500 euros and they need a heavy installation. Plus, they will NOT notice if the broken pipe is into the wall or under the floor.

An Arduino, 3-5 PIRs, motorized valve and a power source will not exceed 500 euros. It's more than affordable if I can make it work. And since all these work with 12v and a low current, it wouldn't be hard to use a backup battery system... I suppose.

By the way, since I'm thinking of this for some weeks now I appreciate the ideas given (I mean that I thought many other "solutions" that I dismissed) , but if you could guide me with the equipment I will need it will be awesome. I checked the PIRs that "Arduino" is offering and they only have a 40cm max range. Is there any with more range?

Thanks again.

Kikerumbo:
The problem with a cap on flow time is that the dishwasher and the washing machine will use the water for around 1-2 hours. I'm thinking more about a delayed closing (1-2 mins) to let the tank on the WC be filled once you are out of the bathroom.

Just FYI, a dishwasher / washing machine do not use water continuously throughout their operation; only at the start of the cycle (wash/rinse/etc.) do they pull in more water and only for a minute or so.

Mr. Google says that a dishwasher uses 4 - 6 gallons and a washing machine uses 10 - 24 gallons.

The lighting industry has numerous sensors and you might save yourself a lot of grief by trying out some of their products as sensors. There is always some little 'gotcha' in electronics that they have probably worked out. You can try out the technology and see if the sensor suits your needs just by whether the light comes on or not. You could then have one sensor design that picks up current draw whether it be a light bulb or water solenoid.

Hi,
gardening folk water plants with a moisture sensor, could something similar be "planted" in areas that are liable
to get wet when there's a leak?
John.

Surround all your water supply pipes with wastepipes.
Have the wastepipes drain into a sump.
If the sump has water in it, you've got a leak somewhere!
The trouble will then be finding the leak. :slight_smile:

(Not a serious suggestion, but it will work.)

@Kikerumbo - I'm not surprised that you say slam shut valves are impractical in a domestic system - I had half expected that.

The suggestion by Henry_Best of double-walled pipes is probably as good or better than any other suggestion. It is only impractical for cost and convenience reasons. Maybe it would be worth implementing in some locations.

The houses (in Ireland) that I have experience of all had substantial cold water storage tanks in the roof space. If your house has one of these you will need to be able to shut off supply from that as well as from the mains inlet.

You haven't said what caused the leak. I still think that a proper risk analysis would lead you to a full "service" of the existing pipes, making sure your insurance is adequate and attention to some other electronics project. How many houses have you heard of that have had two substantial water leaks? The only people who will value from your effort will be your insurance company!

...R

Robin2:
The suggestion by Henry_Best of double-walled pipes is probably as good or better than any other suggestion. It is only impractical for cost and convenience reasons. Maybe it would be worth implementing in some locations.

Thanks for the vote of confidence, but it's also impractical to fit such a system. Imagine trying to fit the outer pipe around an elbow, bend or 'T' joint! For a 'T' joint, you'd have to split the outer 'T' into at least 2 pieces, fit them on and then 'weld' them back together...with no leaks! The same for an elbow. Also, all pipes would have to run 'uphill', away from the sump.

Another way would be to use a water flow sensor along with the PIRs. If no one is in a room where water is used and there is water flow, turn the water supply off. - Scotty

In my humble opinion this won't work. There is almost no advantage in shutting off the water supply for a particular room and adding all those extra valves is expensive and just introduces more parts to go wrong.

Also there will be many metres of pipework in the system between individual rooms.

An effective anti-flooding system must turn off the total water supply. And, in turn it follows that detectors in individual rooms would not be relevant.

...R

scottyjr:
Another way would be to use a water flow sensor along with the PIRs. If no one is in a room where water is used and there is water flow, turn the water supply off. - Scotty

I wonder if you are thinking of a "too perfect" secondary piping system. It wouldn't be subject to pressure so it would not have to be as carefully jointed as the pressure pipes. Indeed it may not even matter much if it leaked a little if the leak-points could be located where the leakage could be managed. Even a partial secondary system could be useful if it carried escaped water to a point where it would be easily detected. For example there could be several small sumps each with a small water level detector (perhaps just two bare wires that would conduct a small current if the water reached them.

The secondary piping would not even have to be a complete cylinder. Something like this would work


| O |

The "o" is the pressure pipe with a cover above and beside it that drains into a channel below. There is no need for the cover to be connected to the channel.

...R

Henry_Best:

Robin2:
The suggestion by Henry_Best of double-walled pipes is probably as good or better than any other suggestion. It is only impractical for cost and convenience reasons. Maybe it would be worth implementing in some locations.

Thanks for the vote of confidence, but it's also impractical to fit such a system. Imagine trying to fit the outer pipe around an elbow, bend or 'T' joint! For a 'T' joint, you'd have to split the outer 'T' into at least 2 pieces, fit them on and then 'weld' them back together...with no leaks! The same for an elbow. Also, all pipes would have to run 'uphill', away from the sump.

Robin2:
I wonder if you are thinking of a "too perfect" secondary piping system. It wouldn't be subject to pressure so it would not have to be as carefully jointed as the pressure pipes. Indeed it may not even matter much if it leaked a little if the leak-points could be located where the leakage could be managed. Even a partial secondary system could be useful if it carried escaped water to a point where it would be easily detected. For example there could be several small sumps each with a small water level detector (perhaps just two bare wires that would conduct a small current if the water reached them.

The secondary piping would not even have to be a complete cylinder. Something like this would work


| O |

The "o" is the pressure pipe with a cover above and beside it that drains into a channel below. There is no need for the cover to be connected to the channel.

I suggest a compromise solution. Use square/rectangular plastic electrical trunking. The 'lid' would be strong enough to contain all but the most catastrophic of bursts under pressure and the availability of various sizes and fittings ('T's and elbows) would make it fairly easy to fit.

My idea for the water sensor is to use a piece of stripboard with each of the two wires connected to alternate strips, thus avoiding possible false alarms if the two wires accidently touch. Not a good idea if it happens when you're in the middle of a shower. :slight_smile:

n my humble opinion this won't work. There is almost no advantage in shutting off the water supply for a particular room and adding all those extra valves is expensive and just introduces more parts to go wrong.

Also there will be many metres of pipework in the system between individual rooms.

An effective anti-flooding system must turn off the total water supply. And, in turn it follows that detectors in individual rooms would not be relevant.

...R

Quote from: scottyjr on April 19, 2013, 07:54:32 PM
Another way would be to use a water flow sensor along with the PIRs. If no one is in a room where water is used and there is water flow,

Yes, the intent is to control a single 'whole system supply' valve. The logic is: If there is no one in any room that water is supplied to, water should not be flowing - if there is water flowing, turn off the water supply.

  • Scotty

You should, to make it failsafe, have the valve shut when there's a power outage.