Monday, March 9, 2015

Home Water System Pt 1 - Give yourself to the Dark Side... of automation.

In the last few years, I've been leveraging PowerShell more and more. So much more, that I'm using it at home to control my fresh water well.

Before I jump head first into the land of crazy, I'm going preface, this will be split up over a few posts. My goal by sharing this isn't to see a future full of PowerShell'd home water systems, but rather just to spark interest in others to break technical norms and explore what you can build. I can see many other uses for simple controlled SNMP devices all over.

First, I'll give you a quick overview of how this is working logically as a system, then I'll show each key piece to the PowerShell puzzle in subsequent posts.

To understand why I've done this and to see the benefit, I have to explain the traditional configuration of a fresh water well partnered with a ground level storage tank.

WARNING: I'm a hack at best when it comes to water - so please don't take what I've done or what I say about water systems as advise. Consult a local professional.

As described by Clean Water Store, my home water well "system uses a large storage tank to store the water before it is pumped again to the house", as depicted below. The portion I choose PowerShell to manage is controlling the start/stop and reading the amp draw for the submersible deep well pump and reading the storage tank's water level with a pressure sensor.

With those two components, I have two .ps1 scripts that run. The first .ps1 is used to fill my storage tank every other day in set 15 min increments for the course of one evening. This is done by 1) reading the water level in the tank to limit the max amount of water 2) the amperage being drawn off the pump when it is running as to not damage the pump should it draw too much amps or begin to suck air. At the end of each fill, a follow-up report is sent with the details of each run. The second .ps1 reports on the tank's water level readings sent every 12 hours. The booster pump still depends on a pressure switch to run and is not yet monitored.

Two main benefits in doing this is: 1) I know how much water is in my water storage tank, and 2) I know as soon as my deep well pump begins to have a problem, so I have time to react before all of my stored water is gone. Additionally, I have the ability to control the timing of how long and when the pump runs beyond the limits of mechanical control timers.

As you can see, PowerShell can be leveraged as your own SCADA system limited by your own imagination.

My system consists of a low power consumption PC running Windows 7 (Dell OptiPlex FX170), an APC Rack PDU AP7940 to control the well pump, and an Arduino UNO R3 with a 3 wire 15 psi water pressure sensor and a Ethernet Shield. The script makes all the calls via SNMP to read the devices and control the power to the well pump.


Building the "water shed" for my pumps
Assembling Pumps and Pipes
Deep pump controller wired to tank's float shut-off and bypass switch 
Pipes and pumps connected


APC Rack PDU Interface
Run Well Pump .ps1 Report Image 
Deep pump wired to C19 plug and bypass switch

Arduino with Ethernet shield used to read water pressure

Pressure sensor
Thoroughly wrapped by black 10 mil pipe wrap

More explanation of this mayhem to be continued...

1 comment:

Marc Bessette said...

The most widely recognized and least complex kind of water pump is called well pumps. Most family unit have this kind of pump. It makes appropriation of water from a well inside the house less demanding. It is utilized additionally on organizations and structures.