simple well pump monitoring setup

all,

greetings from the drought state of Northern California. I'm on a well system here in the Sierra foothills, and the water table underneath us is beginning to dry up. Reports in the 3 mi circle around me are that 5 or so wells a week are drying up, so it seems that it is just a matter of time for me as we get into the summer.

I'd like to build a project that:

  • detects the well pump turning on since current is flowing in the pump wiring from the control box
  • send a simple notification over wifi to the wifi router in the home network that'll get written by the in house server into a db, a status of 1 and a time stamp
  • detects the well pump turning off since there is no current flowing in the pump wiring
  • send a simple notification over wifi to the wifi router in the home network that'll get written by the in house server into a db, a status of 0 and a time stamp

that is pretty much it, I don't need to know how much current is being drawn or have any sort of pump control - just is the pump on or off and what time did the state of the pump change. The overarching goal is to avoid a huge power bill and a pump replacement bill when the well goes nearly dry and the pump stays on all the time since pressure in the tank cannot be built and burns out. The in house server that the Arduino writes to over wifi will be setup to alert me to pump usage trend changes and once the usage shows that the pump is on more and more often I can head out to the pump shed and turn the system off and go to Plan B for water and leave the well unused till we're out of this drought.

What I'd like to find is some kind of clamp that will wrap around the flexible conduit to the pump that will in turn detect current in the line when the pump turns on by the control box and send a state change to the Arduino. There is about 4' of flexible line between the control box and the pump head to clamp onto that sends 240v down to the 2.5hp pump hanging at about 300' down the hole.

Feel like I've got a handle on the wifi and the overall programming, but hoping to get a product/part suggestion on the actual current detecting clamp device. I don't want to mess with the pump wiring with transformers or anything, which is why I'm focused on a clamp around the flexible conduit - just passive monitoring. Searching doesn't turn up much, but honestly I'm not exactly sure what I'm searching for and could use a pointer or 2. Simple is better.

TIA

m

just google around a bit for AC current sensor arduino you'll find lots of them. This is what I used (do read the comments too)

The sensor they used can be found on most arduino/hobbyist websites, like Adafruit,Banggood, Amazon, ,...

you are looking for any way to test for power ?

easy=peasy.

opto-isolator on the pump side of the switch.
it is a simple LED circuit, so all you need is to put on a properly sized resistor.

there is no real reason you could not just use a resistor divider to get 5v from the 120/230 although most here would frown on that in a big way.

the other way would be to use a CT or Current Transformer.
http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface

hi, Dave
never thought of that! thanks for the link!
(ignore my link, this is way better!)

Kevin77:
hi, Dave
never thought of that! thanks for the link!
(ignore my link, this is way better!)

there are probably a thousand circuits to light an LED,
none are any better than any other.
the great thing about this site is that we see multiple solutions.
another thing is that posters often only offer the tiny part they need and leave out little details like 'for mounting inside of a furnace..' or '...under sea for a 5 year data logging....'

it money was not an issue, I would drop a pressure transducer down to the bottom of the well and monitor water level.
not sure if that is possible with a submerged pump though.

another thing is that posters often only offer the tiny part they need and leave out little details like 'for mounting inside of a furnace..' or '...under sea for a 5 year data logging....'

HAHAHAHAHA indeed!

just another suggestion, use a little switch to turn of the pump when the water is below a certain level?

ugh, no email alerts even though the toggle was flipped for alerts. thanks to all that replied

another thing is that posters often only offer the tiny part they need and leave out little details like 'for mounting inside of a furnace..' or '...under sea for a 5 year data logging....'

true, but not in this case. the original stated use case I pitched above is the scope of the deal.

just another suggestion, use a little switch to turn of the pump when the water is below a certain level?

not viable, the pump fills a 300g pressure tank, there is a pressure switch (again, I don't want to be dealing with modifying/tapping into the existing wiring) that controls the pump when the tank pressure falls below a certain level. And I'm not looking to control the pump, just want an indicator when it's on, and an indication when the pump is off. Hi/low

it money was not an issue, I would drop a pressure transducer down to the bottom of the well and monitor water level.

that's about $2k to R&R the pump and 300' of pipe, waaay too complicated and $$

you are looking for any way to test for power ?

easy=peasy.

opto-isolator on the pump side of the switch.
it is a simple LED circuit, so all you need is to put on a properly sized resistor.

yes, just looking to test for power, as well as the lack of power and note an event when the state changes between the on/off and the off/on. Did some searching around for opto-isolators to come up to speed, but they are light based, not clear on how that would apply here - what am I missing?

the other way would be to use a CT or Current Transformer.
http://openenergymonitor.org/emon/buildingblocks/ct-sensors-interface

I think this looks the most promising. While it doesn't look like its large enough to wrap around the flexible conduit, I can prob open the panel and find the right wire heading into the conduit to get this around.

Thanks for all the suggestions and the thinking outside the box, all ideas are good ideas in the end

Current pickup won't work very well on flex conduit, I think you need to clamp around one lead outside of the conduit. you can do the same with 15-20 wraps of insulated hook-up wire around one lead, feeding a op-amp comparator.

For opto isolation, a one meg resistor on one leg of a LED (it's current you need to reduce, not voltage). hook that series circuit across the hot side of the pump supply. attach any LDR to the lead and wrap in vinyl electrical tape (or heatshrink tubing), hook up to an analog input on the arduino. average the inputs to the analog input. pump on, LED on, LDR resistance low, analog input high. pump off, LED off, LDR resistance high,,,,, and so on, and so on...

Doesn't your pump have a cavitation switch-out? Should give you an electrical and/or mechanical indication. After all, that's what you really want to know about. The pump will start to cavitate long before the water line goes completely dry. so, you would know for sure that you have pump problems before any damage is done.

Just tracking run time is not a for sure indication, how would you account for long usage causing a steady draw on the tank and keeping the bladder preasure low (causing the pump to keep running)?

A solid state relay i.e. DC60SA3 should be easy to connect at the pump switch. The output is optically isolated.

not sure of how the power gets to the pump.

there is a low pressure switch with a spring that coloss contacts ?
put your multi-meter on the motor side , test to ground.
if there is a 0 volt whent he motor is not running, and 120v (or 220v) then you have a place to connect things.

you must put a CT on only one wire, not the pair, definitely not the OD of a conduit.

one choice is to use something like a 10k resistor and an LED. 10k ohms on 120vac, with a common red LED with 12ma current, should have that LED light when the motor is running and off when it is not.

===== option 2 =====

an opto is nothing more than an LED and a transistor.
use a 10k (120V) to the LED side of the opto.
put 5v into a 220 ohm resistor, to an LED, then to the transistor side of the opto.
the other side to ground.

If that is working, the LED will go on and off with the motor.

The opto would be on the mains voltage and could not damage your low voltage stuff.
The fact that you can get the LED to work would mean that you have a way to get a signal in and out of the Arduino for data logging.
For that, put your 220ohm resistor on the 5volt, then the LED after. Then the opto-after that. Tie your Arduino between the resistor and the LED. It will be high all the time when the LED is OFF.
It will go low when the LED is ON.

Quick and easy to do. Google clamp on current transformer. Look at some offered to get an idea of what is available. Then open the pump control box and see how much room is available for a current transformer. If you control has the old fashioned relay to control the pump, there is not much room. If it is all solid state, there should be plenty off room for a current transformer. Just snap it around the wire on the relay going to the pump.

Now, research circuits to use the output of the current transformer to produce a signal your Arduino can use to sense the pump on or off condition.

Paul

Just tracking run time is not a for sure indication, how would you account for long usage causing a steady draw on the tank and keeping the bladder preasure low (causing the pump to keep running)?

it's just me here, other than morning shower or dishwasher there is no long draw. It's going to be illegal to water lawns soon, that's the only other big draw, and right now I have the sprinkler timer set to go off at specific hours so I can get the reporting logic that combs through the data to account for higher usage at those times.

Current pickup won't work very well on flex conduit, I think you need to clamp around one lead outside of the conduit.

yep, I'm seeing that this is inevitable too

Doesn't your pump have a cavitation switch-out?

good question that I didn't consider, but the pump is from the early 80's so I doubt it. But worth a call to the well company who put it in to ask them about this. I'm hoping to catch the problem of low water prior to this. The county has contingency plans for wells going dry to bring in and install a 2500gal stand alone tank that they'll refill/top off each week by water truck. The tank is free, I just pay for water at that point. So no reason to try to force the pump to dig water out when the writing is on the wall. It just bumps my electric bill up unnecessarily, and it is grabbing top water in the aquafier which isn't the healthiest to be bringing into the house. I'd rather flip over to the 2500gal tank when the writing is on the wall before the water situation becomes dire.

not sure of how the power gets to the pump.

there is a low pressure switch with a spring that coloss contacts ?
put your multi-meter on the motor side , test to ground.
if there is a 0 volt whent he motor is not running, and 120v (or 220v) then you have a place to connect things.

yes, a low pressure switch that is connected on the water line between a back flow valve and the pressure tank that closes up when the pressure tank falls low.

220/240 comes in off of a power panel and runs to the control box, control box goes to the low pressure switch and back, control box goes to the pump head.

water flow: pump deep in the hole -> up 300' of line with 3 backflow valves along the way -> line comes out of the well cap in the pump shed -> 2' of line -> coupler -> visible backflow valve -> coupler -> pressure switch -> 2' of line -> 300g pressure tank

pressure switch flips the pump on at ~40lbs, pump off at ~55

Pressure switch wiring should be easy to access for a CT on the return line to the control box when the switch is closed and 120 or 240 is going through. I'd guess 120v since no need for 240 through what is essentially just a relay for the control box.

The switch looks like this inside: http://www.thecenterforrainwaterharvesting.org/images/pressurization/switch_detail.jpg

...and outside: http://inspectapedia.com/water/PressureSwitch001DJFs.jpg

I think I have a direction, thanks all