I want to monitor my sump pump

Discussion in 'The Projects Forum' started by zirconx, Mar 10, 2010.

  1. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    I would like to monitor my sump pit / pump in my basement. If I can get this data to my computer somehow then I can graph it, send myself a text message if there is a problem, etc.

    I've been researching water level sensors/systems for quite a while but haven't found a good solution. I finally realized that it might be easier, and in fact even better, to monitor the pump running. I get a constant trickle of water, so the pump runs every 5-10 minutes or so. So if I can log when the pump runs I can tell if the interval is getting too short (lots of water) or if it stops (failed pump). I'd settle for just knowing when the pump starts, I don't even necessarily need to know how long it runs for.

    I thought about using a vibration sensor on the drainage pipe, or maybe some kind of current sensor on the 120vac pump power cord?

    I'm a complete newbie to micro-controllers. But I've done plenty of soldiering before, and I do programming for a living so I think this is something I can do.

    I see there are tons of different options for microcontrollers. Something wireless would be ideal, but if necessary I could run a cable from the basement to my computer upstairs. I'd like to keep the budget under $100.

    I would appreciate any input.
     
  2. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    There is typically a micro-switch on the arm of the float that turns the pump on and off with water level. You can meter that and use it as your logic source. It will either be on or off, so with a rectifier you can convert it to DC and use any TTL components your interested in. You can use it as a trigger point for your data logger.

    You could use a 5v voltage regulator, and a wire to get to your pc, and that should be all you need for hardware.

    You could hook the line into the a serial port and receive the on/off signal directly.

    You should still have $95 left in your budget.
     
  3. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    Thanks for the reply. I like that your idea is so simple, just a 5v on or off, no micro-controller needed. But tapping into that micro-switch would require unhooking my existing piping, pulling the pump out of the pit, and taking it apart. I'd rather not take it apart, I wouldn't want to mess up a seal or something - I need this pump to be reliable. I'd have to worry about routing the new wires outside of the pump and not leaking any water into the inside. Also if I were to take it out and work on it I need to figure out another way to empty the pit as it will fill up completely in 20 minutes or so.

    That also wouldn't necessarily alert me of a pump failure.

    Is there a way to just sense when electrical current is flowing to the pump? Maybe wrap a small wire around the power cord and hook that up to something that can sense the current flow?

    Using a vibration sensor to detect water being pumped out of the pit would be the most reliable as far as knowing if the pump is actually working.
     
    Last edited: Mar 11, 2010
  4. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    Decades ago I did a similar thing to prove to myself that I had a leak in my plumbing system that was outside the house. I hooked up a Bell clamp-on current sensor onto the AC line for the pump (we're on a well) and hooked the output up to a chart recorder. Then, over about a week, each night I valved off something in the house to see whether the slow leak quit leaking (I knew there was a leak somewhere because we could hear the pump run). I accumulated enough data to prove to myself that the leak was outside the house. I temporarily "fixed" it by putting a check valve on the incoming line under the house (what a PITA -- I had to thread a 1" steel pipe coming out of the ground in the crawl space), but then in warmer weather had a plumber run a new line.

    I'd propose you could do something similar. I'll assume you have access to the wires to this pump. If you can separate out the hot or neutral, you can clamp a clamp-on ammeter around it. If it's 120 VAC and plugged into a wall outlet, even easier -- use a line separator (about $20). If it was me, I'd use my Radio Shack digital multimeter with a serial interface to monitor the AC voltage on the clamp-on ammeter -- this would tell me when the pump was running. A suitable AC/DC probe is here (it appears to be the Fluke i1010), but you can find cheaper AC only probes or buy used on ebay.

    Since the Fluke's specs say it will only measure down to 0.5 A, you may want to make sure you get a line separator that also has a X10 loop on it so you'll be assured of getting the measurement. I came across AEMC's separator the other day and liked the looks of it because, besides the 10X loop, it has small probe jacks so you can also measure the line voltage. This would let you make appliance/motor power measurements with a scope and a clamp-on AC current probe.
     
  5. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    someonesdad: thank you for the suggestions. That might be a little more than I'd like to spend, and a little more stuff to hook up. I'd like to make something fairly self contained.

    What about building something into a power strip? I could wrap the hot wire in there with a pickup lead, then run that to... something?

    Also, I found this thread discussing hooking a piezo directly up to a picaxe: http://www.picaxeforum.co.uk/showthread.php?t=2243

    Think I could make that work? I think picaxe's are as low as a few bucks, plus I would need some cables, sockets, etc. Then could I have the picaxe "close a switch" basically that runs to my serial port?
     
    Last edited: Mar 11, 2010
  6. ifixit

    Distinguished Member

    Nov 20, 2008
    638
    108
    Hardware part requiring little expertise...

    1. Get yourself an electret microphone and mount it in a dry area of the sump pit after you've water proofed it a little.
    2. Run this microphone cable to your computer sound card input.
    3. Have a beer.:)
    Software part requiring alot of expertise...
    1. Write a program to analysis the microphone sound.
    2. Determine if the motor is running and not some other sound.
    3. Start timer.
    4. Stop timer when motor stops.
    5. Save data.
    6. Analysis data, if motor runs too long, or not often enough then call Zirconx. or sound alarm.
    7. Do anything you want.
    8. Have fun programing.
    Good Luck,
    Ifixit
     
  7. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    What about using a latched hall effect sensor, like this? Could I put this in a power strip, and somehow sense current? Maybe I would need to wrap one of the wires in the power strip, then take those leads and... wrap them around the hall effect sensor?
     
  8. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    It might be better if you describe what problem you're trying to solve or what decision you're trying to make. Your original statement was that you want to monitor a pump and send yourself a message if there's a problem. What do you define a "problem" to be?

    I'd assume you're concerned about the pump not working and the basement flooding. So, let's start with that and do a high level design, which looks at the different technologies available to measure the water level (if, in fact, that's what you're really interested in) and evaluates their strengths and weaknesses. If it was me and I was worried about a water level getting too high, I'd ask myself what would be the best way to detect the water level. My first question is whether there's a commercially-available solution, as it's frequently better to buy than to make (I evaluate these make/buy decisions by deciding on what my time is worth per hour and how many hours I think it will take to solve the problem -- and then double or triple my time estimate because we always estimate low).

    It sounds like you've rejected the approach of measuring the level and started to focus on wanting to know when the pump runs. That might work, but I can envision a flooded basement with the pump turning itself on, overheating for some reason, and turning itself off. If you were just looking at the motor coming on, you'd miss the problem (i.e., a false negative). While this is no doubt a low probability event, there might be other problems not thought of yet.

    Remember that you know what the physical setup looks like and the rest of us can only imagine it in our minds, so we don't know what approaches are viable. Perhaps if you took some pictures and measurements that show the problem better, we could give better advice.

    Personally, if it was me, I'd go back to the basic problem trying to be solved and make sure all the different design approaches were thoroughly evaluated (and use us on the forum for ideas and suggestions).

    Example: if I wanted to detect water, one method that comes to mind is a probe made of two nails. I just had to go to the kitchen to make a cup of tea, so I took my ohmmeter with me. My tap water has a resistance of a couple of MΩ when I dip the probes into the water. A CMOS component, wall wart, and a few other simple components could give you a usable TTL signal saying whether the nails were in contact with water or not. Another method is a homemade float switch. Over 20 years ago I made a float switch for my ditch pump using a mercury switch and an old syrup bottle. It's very simple and reliable (I have to change the syrup bottle out ever 5 years or so because it sun rots). Personally, I like the float switch approach better than the conductivity approach because it's nearly foolproof.
     
  9. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    Fair enough, I'm trying to accomplish two things:
    • Alert me if the pump fails / water is overflowing the sump pit
    • Track the amount of water coming into the sump pit

    I want to track and chart the water flow just because I'm curious how it varies over the different seasons & rain storms, and I plan on making some ground slope changes outside and I want to see how that affects my incoming water.

    I think it would be hard to track how much water is actually coming in (as in liters or whatever), so I thought keeping track of how often the pump runs would be a good enough approximation. I don't need absolute values, just relative ones. And if I get the pump monitor working, as a bonus I can use that to alert me if the pump interval varies too much. If it varies too much, then I have a water problem - either the pump is running much more often, which means water may start to over flow, or if its not running at all and the pump has failed.

    I guess I have a third objective - I really would like to know that the pump is running. A system like this, rather an just a water-overflow-alert system, would give more peace of mind. If I'm out of town, and I know we are having a rain storm back home, I'd like to be able to check on the pump (I plan on hooking this all up to a website) and see that its working, rather than just assuming the lack of an alert means everything is ok.

    I could see many different ways to detect my pump running, so I'm open to more suggestions.

    I probably could get by with a high water sensor, and place it where it will always trigger just before the pump kicks on. I could use that to detect pump cycles. I see that being a little more trouble though - when do you count the pump cycling? When the sensor kicks "off" (no water detected) I guess?
     
  10. someonesdad

    Senior Member

    Jul 7, 2009
    1,585
    141
    Without seeing your physical setup, it's hard to know what's practical and what's not. Based on what you've said, I would probably use two techniques:

    1. Detect when the water gets above a certain level. If this sensor triggered, the pump has failed and you have a situation that needs an immediate response. I'd probably use a conductivity test or a float switch (and lean towards the float switch, since they're simple and reliable).

    2. Detect when the pump motor is running.

    An alternative to #2 is to put a flow meter on the pump's output. Then you can verify pump operation and quantify water volumes by integration -- trivial tasks in software. But a flow meter might be more than you want to spend.

    For #2, some of the methods so far discussed have been: acoustically determine when the pump is running, monitor the current to the pump, and measure the output flow of the pump. It's possible that you could measure the voltage across the pump and see enough of an effect to tell when the pump is running (but that means working with line voltages -- not recommended unless you're experienced with such things). Since this is a forum with folks who like to build things, you could consider designing and making your own "flowmeter" by e.g. putting a rotating vane (e.g., something like a cup anemometer) in a transparent plastic housing and shining an LED through it with a sensor on the other side. The pulse rate would be related to the flow rate. No doubt there are a number of such things people have tried and a web search will turn up some candidates. It wouldn't be hard to make one, as the output pressures will be low. I like acrylic, as it's easy to "glue" with methylene chloride. A cheap pressure switch could also be used on the output that just detects when there's flow and when there isn't -- just wire it in series with a battery and you have a voltage signal when the pump is running. There are a gazillion cheap pressure switches in the 20-50 psi (used for controlling well pumps), but you'll probably want one that operates at a lower pressure since your pump may not put out those kinds of pressures (you could raise the pressure by restricting the flow, but that's not something I'd recommend).

    Detecting the motor current can be done with a current transformer. It's something you can make yourself if you don't want to buy something off-the-shelf. Then some relatively simple electronics converts this to a DC voltage and a comparator turns the signal line's voltage on and off when the current is above a certain value.

    To get the signal(s) to your computer, you have two options: wires and wireless. I prefer wireless if you have the equipment to do it, but if not, it's hard to beat the simplicity and cheapness of some CAT-5 LAN cable or even phone wire. You could build the circuits yourself and operate them with either a battery or wall wart (if AC power is available). If you measure the flow and it provides an analog signal for the flow rate, you'll probably want to use a current to quantify the signal rather than a voltage.

    You'll want to assess what happens when the sump pump fails. Do you want to have a backup pump whose operation is triggered by e.g. a float switch? Remember, all things will eventually fail. If the cost of the results of such a failure is high, then it makes sense to plan a backup. It also makes sense to have a plan for when such a failure occurs and you're away from the house (e.g., give a neighbor a key and instruct them on how to deal with the problem).
     
  11. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    someonesdad has good ideas. I just want to add to one.

    First, I would use the float sensor for the high water alarm and backup pump trigger.

    Second, I would for go the current monitor. When the pump fails, If its not a power fail and is a locked rotor, you will still have current draw. So unless you monitor the current amount, I.E. 4a - normal operation 12.6a LRA-problem. If you want to do the locked rotor amps for a set amount of time, or 0 amps for a set amount of time, signal the alarm.

    You can use a flow switch rather than a flow meter. That is a simple cheap in-line sensor than closes a switch when water is flowing. If you do not wish to pay for the meter, which can also be a point of failure, the flow switch is cheap.

    There are sensors for all of the ideas mentioned available over the counter at HVAC shops usually for condensate pump monitors for air conditioning systems.

    And I think its worth repeating what someonesdad said:
     
  12. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    I do have a 2nd float switch, I am wiring it up to my DC powered backup pump. I can use that as a trigger for high water condition. I don't have a good idea of how to turn that 12v signal into something I can pickup on the computer. But I imagine poking around on these forums should turn up something on that. I found one of these really cheap on Ebay: http://www.advantech.com/products/USB-4761/mod_1-2MLJO8.aspx Its a USB device with a bunch of input/output relays. It sounds perfect, but I can't find much info on running it from Linux, which is how I'd want to do it.

    I like the idea of a flow switch, but I can't find any cheap, simple ones. They mostly seem to be be hundreds of dollars. If anybody has an idea about how to make one, that would be great. I could tap into my PVC pipe in a horizontal or vertical section, whatever would work better.

    To measure the current, I came across this: http://growdown.blogspot.com/2008/03/non-contact-voltage-presence-measuring.html Which seems exactly what I've been talking about, wrap a wire around one of the 120v leads and somehow detect current using that. I'd probably do this inside a power strip to make it all nice and contained.

    I also have a $10 high water alarm thing that makes a loud sound once water touches the sensor. This is really only useful for when we are home.
     
    Last edited: Mar 13, 2010
  13. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    Regarding getting this data into my computer, I think I may have found something inexpensive that will work: http://www.robotshop.com/pololu-micro-maestro-6-channel-usb-servo-controller-assembled.html

    I've also been looking at this one, but its twice the price: http://www.sparkfun.com/commerce/product_info.php?products_id=9669

    I'm not positive it would work, but from what I'm reading you can configure the channels to be inputs, it sounds like a pretty amazing device for $25. It works over a standard serial connection (USB/virtual com port) so I can easily script to it with Linux.

    And regarding a water flow switch - might a temperature probe work? That would be pretty easy to install into the PVC pipe. I could watch for a temperature change, that should indicate water flow. Unfortunately the $25 Pololu device doesn't directly support reading temperature, although the $60 Sparkfun device does. But if there were a temperature probe that just acted as a resistor, like if I gave 5v on one side and then got back 0 - 5v on the other side, then I think I could monitor that with the Pololu device.

    Thanks for all the help.
     
    Last edited: Mar 13, 2010
  14. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Temperature may be a way to do it. I have to head out to the bar now, but tomorrow Ill look up a reasonable priced flow switch.

    The problem Im thinking of with temperature, Is if the drain line stays full of water, there may not be much of a temp change between the water in the pipe and the water entering the pump.. (It has both had time to equalize)
     
  15. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    Ah, you are right about water staying in the pipe... I would definitely have to mount it before the check valve. Because water does sit in the pipe above the 1-way check valve.

    What about just using a water sensor in the pipe? Before the check valve of course. But I think that Pololu device can only monitor voltages, so I'd have to figure out how to convert that into a voltage.
     
  16. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
  17. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
  18. zirconx

    Thread Starter New Member

    Mar 10, 2010
    10
    0
    I think I am going to go this route. I've found that the Pololu Micro Maestro can directly detect water. Just need to connect its 5v side to one lead, the input to the other lead, then put both leads in water and read the voltage. 0v = no water, anything higher = water.

    I'll use the 12v backup pump float switch as a high water condition. I will use a voltage divider to bring the signal under 5v and then hook that up to the Micro Maestro. I'm a little confused how this will work, I guess I would tie the grounds from the 12v backup battery and the 5v USB supply on the Micro Maestro together? I don't really like that for some reason, and will probably just use a relay instead.

    That $25 Micro Maestro should be able to get both of these inputs into the computer easily. :)
     
    Last edited: Mar 15, 2010
Loading...