Author Topic: DIY water system controller  (Read 5100 times)

0 Members and 1 Guest are viewing this topic.

Offline madlabs

  • Full Member
  • ***
  • Posts: 113
  • Karma: +7/-0
    • Chief Bottle Washer
DIY water system controller
« on: May 30, 2013, 10:06:40 am »
Hi All,

Got my new water system controller wired up and tested and I thought I'd share it. I posted it to that "other" forums but I wanted to share it here too.

I wanted a water system controller because I live off grid and if have a water system failure I could come home to either dead batteries or an empty water tank. I have the classic rural set-up, well and 2500 gallon storage tank with a pressure pump and tank. The pressure pump uses a fair amount of juice and if the tank goes dry or there is a leak it could easily tank the batteries. I have a large garden and 20 fruit trees, so I use a fair amount of water and if my well pump goes dead I want to know ASAP so I can take my time fixing it and still have water.

Aside from major failures, I wanted to be able to watch for signs of my well output changing or the pump wearing out. The system is equipped with flow rate and current sensors for the well pump as well as being able to sense when voltage is sent to the pump. So I can create a well pump profile and monitor for changes in well and pump health. I got an ultrasonic sensor to check water level in the tank too. It knows when the pressure pump is on and if it runs too long continuously it will shut it off.

I can also create water usage profiles and notify if I am using too much water or if there is a suspected leak. The controller has a clock, so it knows date and time and can look for excess water usage at night for example, which would indicate a leak. It will track tons of data that can be displayed on the LCD or connected to a laptop for a more verbose display and will also be able to send comma delimited data for use in spreadsheets.


 If the controller does see a problem it can shut off the pressure and well pumps or sound a really loud alarm. I have manual hard wired over-ride switches in case of controller failure.

The only bummer is that I didn't know that solid state relays leak when off. The leak is enough to activate the optoisolators that tell the controller when the well and pressure pumps are on. Especially a pain because I potted the opto's in epoxy to keep the 120VAC from the logic circuits. I guess I'll try a resistor inline on the LED side of the opto and see if that works.

Now I just have to wire it into the system and then start programing.

Jonathan
Some people are like a Slinky - not really good for anything, but you still can't help but smile when you shove them down the stairs.

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: DIY water system controller
« Reply #1 on: June 08, 2013, 02:04:31 pm »
 Pretty nice piece of handiwork there... Looks good.  ;)

A couple of things came to mind while I was reading this and looking over the pics...

The opto issue... Series *might* take care of it, but don't forget that LEDs can glow at very low currents.  Try a shunt resistor of a few to several hundred ohms, depending on nominal etc. I've had to do similar things for stuff like piezo alarms and the like where even the slightest leakage will make them "complain" continuously when all should be silent. Shunting has always worked better in those cases, should work well here too. If nominal voltage is high enough, maybe a divider approach would be even better. A pot would probably fit the bill nicely and you could find the butter zone between false triggers and reliable hits.

The other, don't forget that failing open is only one of two modes - I'd be inclined to make your auto/manual switches auto-off-manual instead. If they already are, well, carry on then, but it doesn't appear that way, so I figure it was worth the mention... ;)

Steve


Wanted: Schrödinger's cat, dead and alive.

Offline madlabs

  • Full Member
  • ***
  • Posts: 113
  • Karma: +7/-0
    • Chief Bottle Washer
Re: DIY water system controller
« Reply #2 on: June 09, 2013, 09:42:15 am »
Steve,

Yeah, I shoulda made the over-ride switches on-off-on. I would have had to buy them though and money is a little tight. This project was built mostly out of the junkbox. At least the controller can turn things off even if the user can't directly. The user can still turn off the well and pressure pump SSRs through the buttons/lcd interface. Not as good as hard wired but it will do. I'm already thinking of making a better version...

Your advice on the opto's sounds right on. The drag is that I potted the circuit in epoxy to keep the AC out of my logic. However, at least the circuit is on it's own little board so I'll just have to make a new one.

It's installed and running, although I don't have it all hooked up yet. So far I can detect 7 different failure modes. ONly bug in the ointment at the moment is that my programming USB port gets stuffed every time the pressure pump starts up. Then I have to unplug it all and plug it back in, which resets the controller. Of course, one isn't supposed to try to program from 100 feet away through a USB to Ethernet - Ethernet- USB cable. I'mna grab the scope and go out there today and see if I can find out why. I'm hoping that sprinkling some more decouple caps will fix it.

Jonathan
Some people are like a Slinky - not really good for anything, but you still can't help but smile when you shove them down the stairs.

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: DIY water system controller
« Reply #3 on: June 09, 2013, 11:28:33 am »
I feel ya on the junk box approach... Most of what I've done in the van fits that description. If it wasn't plucked out of some piece of defective equipment, it was something I already had on hand, and built around that. Very little actual purchasing for the purpose goes on. ;)

Sometimes you just gotta do what you gotta do, and when something performs a critical job and does exactly what you need it to, it becomes priceless anyway, so free makes it even better! ;)

Dunno what to tell you about the USB thing, but you've got it working otherwise it sounds like, and I'm looking forward to seeing how it comes out.

Steve
Wanted: Schrödinger's cat, dead and alive.

Offline madlabs

  • Full Member
  • ***
  • Posts: 113
  • Karma: +7/-0
    • Chief Bottle Washer
Re: DIY water system controller
« Reply #4 on: June 10, 2013, 09:32:16 am »
Yeah, I'm an inveterate scrounger too. I'd do it if I was rich. I love ripping parts from one thing and making another.

Just noticed that my netbook doesn't stuff the USB port when the pump comes on. And the laptop is OK if it's power supply isn't connected. I wonder if the pump starting is hard on my inverter and the laptop power supply doesn't like it. I'm thinking of trying an isolation transformer to run the laptop power supply and see if that helps.

Jonathan
Some people are like a Slinky - not really good for anything, but you still can't help but smile when you shove them down the stairs.