Protect Your Home Drinking Water Tank From a Serious Leak
173 Views, 0 Favorites, 0 Comments
Protect Your Home Drinking Water Tank From a Serious Leak
We are rural, we live on a farm. We are kind of off grid, just with electricity and mail services. Our drinking water comes from rain, captured off a roof in a couple of 22,000 litre tanks. That's a total of about 10,000 gallons, depending on how big your gallon is. Works out plenty for 2 of us.
That shed is about 30m x 15m, we only need gutters one side. Plenty of area.
A few years ago, in the last drought, we lost all our drinking water due to a bad leak from an underground pipe. This note describes some steps I took to try to ensure it doesn't happen again. The implementation has worked well for 5 years now, so I'll describe what I did as someone else might benefit.
I'll provide schematics and software, but not detail sources of hardware as its been too long to expect original suppliers to be unchanged.
The Original Problem
At the beginning of 2018, in summer, my little bit of Australia was in the middle of a drought. The ground was very dry. We had a dry lightning storm, and an oak tree was struck in the garden near the house. For some reason oak trees seem to be lightning magnets, that tree has now been struck 3 times that I know about. Fortunately it fell over in a light breeze last year
Now, we have (well, had. The insulation fails a megger test and there must be a hole in the conduit) underground power running in conduit between the house and an outbuilding 80 metres away. That trench ran near to the oak tree. It seems due to the dry, high resistance ground, the lightning had issues dissipating charge, and found a path down the oak tree, into its roots, to the nearby underground power wires, to earth stakes at both the house and the outbuilding. And other places..
Pretty much anything electronic in the house emitted its magic smoke and died. I was sitting at my desk working on the computer, there was a seriously big bang and simultaneous lightning flash, lights went out, computer stopped, smoke from under the table from the computer motherboard. Did you know its possible to jump and bang knees under the table when starting seated?
The wiring insulation in the outbuilding was also fried. A wall wart transformer running a remote gate opener in the wire/metal post fence around the home paddock shorted. I suspect that metal fence might have been the main ground return for the lightning strike.
Then 3 weeks after the lightning event, the kitchen tap ran dry. Checking, both water tanks were essentially empty. After lots of investigation, adding inline taps, checking where flow happened, I determined the underground water pipe between the house and the water tanks leaked. Wandering around the yard, I finally managed to hear the leak, about 10 metres from the house wall. We never found a wet spot. Apparently you need more than 40k litres over 3 weeks for that. That's around 80 litres per hour.
I started to excavate from the house along the pipe towards the leak noise. It was black plastic poly pipe (IE polypropylene). The outside of the poly pipe was scarred, see picture. Some of the scars went right thru the pipe. It seems the lightning tracked on the outside of the pipe, to local dirt. The poly pipe apparently contains a few percent carbon black for UV protection. It must be very slightly conductive. I wasn't aware lightning could destroy water pipes. I might not be alone there.
The burn scars extended for about 10 metres from the house. The several metres after that appeared normal. I replaced the scarred section of pipe, and as luck would have it, it rained the next day, putting some water back in the tanks. And as a bonus, I even got to clean out the concrete tank while it was empty.
Site Layout
We collect water from the roof of the machinery shed. Water tanks sit on the ground next to the shed. Ground level there is a couple of metres higher than the house. As long as the tanks are more than half full, gravity provides plenty of pressure for water and showers meeting our needs. Below half full, flow gets a bit ordinary.
We also use dam (not potable) water pumped up to a tank significantly further up a hill. That provides more pressure for garden hoses in the yard. Dam water is also used to fill the toilet cistern. The toilet fill valve actually seems to need more pressure to work correctly than anything else in the house.
The Solution Implemented, Requirements
I decided that some sort of manual intervention should be required if we were to use more than a preset amount of drinking water in a single day. Less usage than that preset amount, then things just work. More usage, then supply is stopped till I do something.
Ideally if (say) I knew we had a reason for higher than usual consumption, say overnight visitors, there would be an easy more to increase the water allocation.
It all had to work in the event of the electricity network going down too. We are near at the end of a long and thin network branch in remote country, we occasionally get long interruptions.
It had to fail safe. Where safe means my tanks keep whatever water they have. If the electronics or software breaks, then I get no water until it was fixed, or at least reverted to the original state. This is likely a pretty tough requirement.
The Solution Implementation, High Level View
A header tank was installed near the roof line of the machinery shed. That tank gained 2 float switches. one at nearly-full and one somewhere-near-empty. The header tank holds about 50 litres between the top and bottom limit switches, and another 20 or so litres in reserve below the bottom limit switch.
There is a 12V water pump to lift water from one or other of the main storage tanks to the header tank. The house is run from an outlet pipe at the bottom of the header tank.
The 12V 10lpm water pump is powered via a controller, and from a small 12V 7AH battery. The battery is charged from a 30W 12V solar panel.
The home brew controller turns the pump on to fill the header tank when the header tank lower limit switch triggers, and turns the pump off when the upper limit switch says the tank is full.
The controller limits the number of header tanks fills allowed per day to a default of 5. You can give yourself more with manual intervention. There is a credit button, and each push of that allows you an extra tankful. There is a LED on the controller that blinks a code at you, one long blink per header tankful still available so you can check things visually.
Fail Safe?
Does this system meet my fail safe requirement?
I can predict a few failure modes. I'm sure there are more, but its tough to protect against categories you have not yet thought of, or not yet had to fix.
Failures that lose some water, starting with the worst
- split pipe between the main tanks and the pump. This seems the worst possibility. A single main tank could be lost, as only one tank has its ball valve open at a time now. Not good, but better than before.
- The software could crash and leave the pump running. The solar panel by itself isn't big enough to run the pump by itself, so the pump battery goes flat after about an hour. Losing an hour of water, about 600 litres which is a few percent of the storage tank capacity. Acceptable, and has not happened yet.
- the top limit switch could fail off. Same as #2
- the controller pump switch transistor could fail short. Same result as failure 2.
- a failure of the pipe to the house causing a big leak will just lose 5 header tanks or about 250l or less than a percent of the storage. Acceptable. That's what this thing is all about!
note 1 : I could consider an inline electric tap right at the main tank, turned off when the controller is out of credits. Or perhaps just on only when pumping. Stay tuned!
note 2 : a header tank water overflow back to the main tanks could be a good idea..
Failures that don't lose water
- a failure of the pump to actually pump results in no water, which is my fail safe definition. In which case I replace the pump. Connect the house directly to the tank again in the meantime if I have run out of pumps. I note the pump there has now run fine for near 6 years now.
- the battery has a limited lifetime. I used a UPS battery which I had retired from service after 3 years in the UPS. After another 3 years pumping water it got to the point it reached End of Life, it couldn't fill the header tank fully - running the pump for 5 minuted just got too much for it. The problem and solution to fix that was obvious, a new small battery.
- failure of the controller to turn on the pump. As prior..
I could go on here but its not that interesting looking at everything that could break.
Detail Implementation, Plumbing
Thats the white header tank near the shed roof. It doesn't have a top, so there are a few pieces of dense yellow foam on top then a board on top to weigh them down, acting as a lid.
I made a little bracket to support the limit switches inside the tank. Horizontal switches drilled from the side would also work and probably require less water sealing of the wires, more of the switch body.
The water pump. The outlet pipe runs back over the pump, as thats where the original pipe end is.
Detail Implementation, Controller
Controller operation
The controller is pretty easy to use. There is one button to press, and one blinking led to watch. And a pump to listen to.
The blinking led on the teensy board gives you one short blink to start the sequence, then a few long blinks to show how many credits (header tankfuls) you have available, followed maybe by a shortened blink to show a fractional tankful, then it repeats after a short gap.
After turning it on, you have to push the credit button a few (often 5) times to allow it some credit. Watch the blinking led. You should have a short blink, then 5 long blinks, repeating.
The pump might also start if the lower limit switch is on (red led on) (header tank empty).
If the pump is running, the blink code will count down, the last long blink will get shorter over time. Either the top limit switch (green led) will turn off, or you will run out of blinks/run out of credit. Either way the pump will stop.
The software will give you 5 more credit units every 24 hours, so you get water tomorrow. Credit is only allocated automatically if credit is non zero, and to a maximum of 5 units of credit.
If the credit ever runs down to 0 you have to manually allocate some with the push button.
Give yourself extra credit by poking the push button a bunch of times, to allow more water. That extra credit will run down over time as you use water, till its below 5. Once below 5, but greater than 0, the controller will start granting you 5 total credits each day.
Controller implementation
The controller is built in a plastic box with a clear gasket-ed lid. This allows me to see the LED for debug, and the electronics to survive the inevitable dousing with water associated with a water pump.
It is made from a teensy 2.0 board (kind of an arduino), teensy a small 12V to 3.3V buck switcher module, a few LEDs, resistors, transistors and a push button. its built from through hole components on a prototyping board, although that's up to you. SMD would be fine, and a suitably bigger switch FET would avoid the need for a heat sink.
I now discover the teensy 2.0 is obsolete. The teensy2.0 was an atmega32U4 with a USB connector for programming and debug. I suspect this could be made to work on any recent arduino board without too many issues. Nothing clever is used.
The power switch transistors I used are not really big enough, so I used 3 in parallel bolted to a heat sink. I'd likely use a motor controller board if I did it again today to switch the motor on an off, as that module comes with a heat sink already.
The electronics was all made from stuff I had kicking around.
Downloads
Controller Software Implementation
The software is here https://github.com/galah-x/watertank
The current software is written in WinAVR 'c'. I use gcc avr on linux. avrdude and the teensyloader seem to be used too.
The software actually measures motor run time, so its tweaked to the size header tank and the size pump I use. If you have got this far I'm sure you can change those headers. Or just ask questions.
Notes on Stuff
- all new plumbing was in 25mm blueline poly pressure pipe. Old pipe was 1 inch rural poly. It's thinner wall.
- the header tank is a copper tank I had. A small 100l poly tank might be a better idea if you don't have something already to hand. A top on it would be nice.
- The pump is the sort of thing used in caravans and boats and 4wd showers and vans. Readily available and pretty cheap. These pumps don't seem to lift on suction particularly well, so positioning it somewhat above the outlet of the main storage tanks might save some water in some problem cases, but brings potential issues too. Mine is at the same level as the main tank outlet.
- the float switches were stainless steel eBay specials. Closed when the water level is below the float. Seal up the wiring for the bottom one if its inside the tank underwater.
- The solar panel should be big enough to run the quiescent controller power, perhaps 100mW continuous, or maybe 3WH/day, and 60W pumping or perhaps 30WH/day for the pump. But not big enough to run the pump itself in full sun, for fail safe reasons. Something between say 10W and 40W should do, and still work in winter or in cloudy weather. My panel points west as that was convenient for my site, with good sun exposure.