Sewage Pump Controller/Monitor

Please forgive me as I am an extreme newbie to the Arduino community. I have always wanted to jump in so why not attempt something significantly over my head.

I live in the country and have a sewage pump (pump down configuration) that gets rid of my wastewater. I have been trying to locate something to help monitor and control this pump, but nothing seems to offer all the features I would like or be even remotely cost effective. I figured this could be built with some various sensors and an Arduino so here we are.

The pump that runs is 120VAC. I believe it is a 1/2HP, but it definitely runs on a circuit with other devices and doesn't blow a 15A breaker. I can get the exact specs later.

The floats (triggers to run the pump / alarm) are both NO and have the following specs:
Maximum Voltage: 250 VAC or DC
Maximum AC Current (Resistive): 6 A
Maximum AC Current (Inductive): 3 A
Maximum DC Power: 75 VA (0.3 A @ 250 V)

Minimum requirements:
Supply DC voltage to the float and when it closes, relay 120VAC to the pump until it opens again. Loop.
Supply DC voltage to the alarm float and when it closes, some sort of alarm (wifi/ethernet/etc would be preferred)
Notify if the pump runs longer than xxx seconds.
Ability to handle a sudden power outage and come back alive when power is restored.

Additional features:
Monitor the pumps health by checking it's current and voltage pull.
Monitor pressure differential across the sewage filter and notify me if it's out of spec (time to clean the filter).
Not required currently, but potentially the ability to have a secondary pump hooked up and either alternate between the pumps each run or have the secondary pump automatically trigger if the high alarm is tripped.

This will all be inside my climate controlled basement. I also have a mac mini running 24/7 within 6 feet of where this will be located if I need to run anything on it to make this work. I need this to be very skookum as if it fails, my basement can be flooded with sewage (already happened a few times hence why I'm going down this route).

Any guidance/comments/suggestions would be greatly appreciated. Is this even feasible? Links to other projects I can cobble together for some of the features would be great also.

Thanks everyone!

It is feasible.
I am surprised the basement floods with sewage are you sure you don't have an explosion risk?

Do not dive in trying to do everything at once you will end up with something that may seem to work but you will not be sure why.

Instead start very simple and gradually add components and logic. That will give you a rubust system that you fully undertand and trust.

Begin by just wiring an LED and resistor and trying the blink example

Then add a switch as an input and use it to control an LED.
If you keep LEDs in the final system they will give you useful diagnostic information e.g. showing you what state the float switches are in and whether or not the Arduino is trying to run the motor or send an alarm.

Your float switches may have both Normally Open and Normally Closed contacts. I would tend to wire the system so that it tries to run the pump or send an alarm when the contacts open. This makes it fail safe as the pump will run if a wire is cut. The pump running dry should not be a problem as you will get a warning if it has run for more than xxx seconds, though you might want to have a third float to detect a low condition.

An ouput can be used to control a relay to give power to the pump.
I am not sure about monitoring the pump current and voltage but it can be done.

You should get a differential pressure sensor that can be wired to an analogue input for your filter monitoring.

Shields for WiFi/ethernet are available.

Auto restarting after a power outage is normal.

I really appreciate you taking the time to type that all out.

I've done a bunch of coding over the years including PASCAL, Java, C++, PHP and HTML. I'm hoping I can get the coding side of things down not too bad. The actual electronics part freaks me out a bit, but I'm hoping I can plug and play a lot of it. Just gotta locate components that do what I want and then ensure they operate in the range that the Arduino wants them too. Should be frustrating, but a lot of fun.

I'm assuming I should just buy a Mega to start off with so I'll have a lot of room for expansion?

Definitely going to baby step this thing one component/feature at a time. I don't know enough to just slap it together and cross my fingers :stuck_out_tongue:

The float I was look at operates on NO, but they may have a NC option. I will have to look into that. If I program it to run the pump when the high alarm goes off, that should fix any broken wire/float situation on the main level float anyways. I've never jumped into the NO/NC too much so there maybe be more reason to go that direction though.

In regards to the float circuit, is it best to run DC or AC? My head says to do with low current DC so it's easier on the float. On the other hand, AC passes through zero so you'd think it might be easier to break the connection when it switches. Ideas?

I was hoping to eliminate the low level float as the tank opening isn't that large and I would rather floats not get tangled up on each other, etc. With the run time and current monitoring I can probably ensure it doesn't end up running dry.

In regards to the relay running the pump, do they handle pump startup surges okay? I guess I should just be looking at a larger external pump start relay. Not some small SRD-12VDC-SL-C?

Yeah I don't know enough about pumps to determine what I need to monitor it's health. I know current is a big one and they have contactless current sensors. So that could be an option. Easier would be to slap a small probe on the housing and monitor temperature. The few times it has ran dry it got pretty hot to the touch. That would be an easy additional fail safe.

I assume a pressure differential sensor would work to determine filter pluggedness. I don't know a lot about that, but it would be a feature I could add in the very distant future. Assuming everything else works well, I can just set a remainder on my phone to clean it once a month.

In regards to getting information out of the Arduino, I just assumed wifi/Ethernet. I guess the Mac also has Bluetooth if that would be easier. Or it could just constantly stay connected via usb. Not sure what the easiest way to handle that would be. Might be easier to just have wifi and avoid the Mac altogether? Have it send the data to an external website service and log it there?

Thanks again for all your help!

Your project is of an industrial level for components. If a relay or switch, such as your float switch, use AC. DC will always cause metal migration between the contacts and eventually weld them together.

Does your system use a foot valve, always holding back a head of liquid? Does your system have a grinder in the storage tank? All these components need to be monitored.

Paul

Hi,
I do agree on @ardly post: it is feasible (and a nice project).
As @ardly says go step by step: it is perhaps the best advice.
I'd pay som attention on the switches connection: connecting a float switch is not the same than doing so with a button in a lab (altough logic inside the arduino is the same); consider using an optocoupler. have a look on this and try to understand it.
Regards.

Paul_KD7HB:
Your project is of an industrial level for components. If a relay or switch, such as your float switch, use AC. DC will always cause metal migration between the contacts and eventually weld them together.

Does your system use a foot valve, always holding back a head of liquid? Does your system have a grinder in the storage tank? All these components need to be monitored.

Paul

AC it is. Thanks!

No foot valve or grinder. It's a fairly simple ejection system that just sends out the wastewater. Solids end up in a holding tank for biannual pumping.

vffgaston:
I'd pay som attention on the switches connection: connecting a float switch is not the same than doing so with a button in a lab (altough logic inside the arduino is the same); consider using an optocoupler. have a look on this and try to understand it.
Regards.

I'll take a look at this octocoupler. Makes sense to keep the it isolated.

HiQ:
AC it is. Thanks!

No foot valve or grinder. It's a fairly simple ejection system that just sends out the wastewater. Solids end up in a holding tank for biannual pumping.

I'll take a look at this octocoupler. Makes sense to keep the it isolated.

I think you will have better luck looking for an "optocoupler".

Before we bought this property we looked at one with your system. The liquid is pumped to the other side of a hill for the leach field. Several years later, friends bought the place. The pump and float system was not working. The owner did not realize it. Cost quite a bit to repair when discovered months later.

That said, a method of recording when the pump last operated would be a great selling point when/if you decide to sell.

Paul

Paul_KD7HB:
I think you will have better luck looking for an "optocoupler".

Before we bought this property we looked at one with your system. The liquid is pumped to the other side of a hill for the leach field. Several years later, friends bought the place. The pump and float system was not working. The owner did not realize it. Cost quite a bit to repair when discovered months later.

That said, a method of recording when the pump last operated would be a great selling point when/if you decide to sell.

Paul

Haha.. Doh! Yes Opto aka optical. Makes way more sense that way.

That is exactly our situation. We bought the place and the float malfunctioned almost immediately and our basement flooded with sewage. Not fun. It's still torn apart from the first flooding (there has been more than one). We are just looking to get a really safe system in place before we start putting money back into fixing the basement. Hoping to get this going sometime soon, but so much to learn/source/assemble and so little time before winter again (plus the new kid is eating up time like crazy).

Random thought... How much would something like this cost to get built for me?

Considering that the system you have works and you are worried about failure, why not build a warning system in parallel with the existing system.

There are current monitirs available that can go around the high voltage line and monitor if the pump is on.
You can add your own float sensors,. Eg. Low tank, start motor, stop motor, high level, and oh sh@# here it comes into the basement!

This will isolate you from the existing system (minus the current monitor) and be easier than tapping into an existing high voltage system.
Alow you to add more points for warning and do it step by step.

First figure out the liquid levels and warning points with display and alarm.
Then add current monitoring for the pump.
Then work on a seperate pump (possable 12v with battery so it runs in the event of power failure) and some system to change the pump output pipes from AC Pump to DC Pump.
A battery monitoring system with warning of battery failure.

Sounds like a good one to work on with small projects combined into a larger one with the ability to stop at any point inbetween.

Daz

I think you need to start by doing a quick drawing of how you are going to wire things up.

There are electrical ways of solving your problem and microprocessor ways of solving your problem.

Think of a bilge pump in a boat. You might have a battery, a float switch and a DC motor. When the bilge level gets high the float switch contacts close and power flows from the battery through the switch to the motor. That is an electrical solution.

With a microprocessor you do things differently. The float switch or switches are wired as inputs to the microprocessor.
A relay that will control the pump is wired as an output. Based on its inputs the Arduino decides what to do with its outputs. In this solution the power for the pump (AC or DC) does not flow throught the float switches or the microprocessor output, it just flows through the power dside contacts on the relay. Does that make sense.

I am still a bit concerned that the sewage can get into the basement. How do you know you have not had an explosive methane buildup in the basement or alternatively that the oxygen levels in the basement are not dangerously low? If water from drains can get into the system there is also a risk of fuel etc. getting in and again causing an explosion risk.

Industrial float switches also come as a single tube with reed switches in the St.St, tube and floats with a hole in the center like a doughnut sliding up and down on the tube - the floats can be set at different levels so as the level drops the floats stop at a specific level - so a small diameter amount of space is used for several switches

Daz1712:
Considering that the system you have works and you are worried about failure, why not build a warning system in parallel with the existing system.

This would be an option, but our current system doesn't really work. It's a bit of a band aid solution until we can get something else implemented.

ardly:
I think you need to start by doing a quick drawing of how you are going to wire things up.

There are electrical ways of solving your problem and microprocessor ways of solving your problem.

Think of a bilge pump in a boat. You might have a battery, a float switch and a DC motor. When the bilge level gets high the float switch contacts close and power flows from the battery through the switch to the motor. That is an electrical solution.

With a microprocessor you do things differently. The float switch or switches are wired as inputs to the microprocessor.
A relay that will control the pump is wired as an output. Based on its inputs the Arduino decides what to do with its outputs. In this solution the power for the pump (AC or DC) does not flow throught the float switches or the microprocessor output, it just flows through the power dside contacts on the relay. Does that make sense.

I am still a bit concerned that the sewage can get into the basement. How do you know you have not had an explosive methane buildup in the basement or alternatively that the oxygen levels in the basement are not dangerously low? If water from drains can get into the system there is also a risk of fuel etc. getting in and again causing an explosion risk.

Definitely need to draw up a schematic before I really get into this.

I could go with the electrical method, but I feel the microprocessor method will ultimately give me more flexibility and control.

The sewage is more of a backup through the floor drain if we try to force too much into the tank when it's already too high (hasn't pumped down). The main mess was in the utility room itself and a little liquid that made it out the door and down the hall a bit. It could have been worse if we kept trying to drain water (which could happen when say the water softener does a backwash or any other things that randomly run on their own). We were gone that day and basically came back to a mess.

Can't say there was any real gas that backflowed. Just the odor of the liquid itself that came back up.

saildude:
Industrial float switches also come as a single tube with reed switches in the St.St, tube and floats with a hole in the center like a doughnut sliding up and down on the tube - the floats can be set at different levels so as the level drops the floats stop at a specific level - so a small diameter amount of space is used for several switches

I haven't actually seen those ones at all. The highest rated float switch we've heard about are the Flygt ENM-10 Level Switches and the Kari APG Float Switches. The Kari has a nice feature were it's basically 2 floats in one. Upside of having only one thing in the tank, but downside that both the main float and high alarm are both in one unit (potentially more risk if somehow both broke at the same time).

Those float donuts in tubes scare me a bit as some toilet paper or something else could really interfere with it. It shouldn't ever happen, but the two sides have mixed in the past as the levels got too high and the current float didn't function properly. I don't doubt there are some things in the liquid side currently that probably shouldn't be and will stay there until we get the honey truck back in to vacuum it all out again.

Consider that EVERY component of your system has a probability of failure. Add the probabilities up to get the system failure probability of failure. Be sure you are not creating a worse problem.

Paul

there are also float switches on a cord - the float contains the switch and hangs from a cord - when the liquid level rises the float starts to float and tilts causing contacts to close/open

Also level can be detected using non-contact sensors such as range finders looking down at the liquid.

Also capacitance sensors - when the liquid rises the capacitance change from the liquid level on the probe is sensed and contacts closed/opened or a signal sent to a processor indicating the level height

saildude:
there are also float switches on a cord - the float contains the switch and hangs from a cord - when the liquid level rises the float starts to float and tilts causing contacts to close/open

Also level can be detected using non-contact sensors such as range finders looking down at the liquid.

Also capacitance sensors - when the liquid rises the capacitance change from the liquid level on the probe is sensed and contacts closed/opened or a signal sent to a processor indicating the level height

IF you find a good one, the float switch on a cord is good. But needs a mod to get the range you need. The one I use in my irrigation water storage tank is from Brazil, Ebay, and has worked flawlessly for perhaps 8 years. Previous Chinese switch leaked.

To get the range from nearly empty to nearly full, I taped a plastic rod to the cord, with 4-5 inches of cord showing on each end of the rod. This way the switch cannot tip up far enough to trigger the switch off until the rod part is nearly horizontal.

The problem with using any float switch in a sewage liquid tank, is getting it adjusted properly!!!

What access do you have to the top of the storage tank?

Paul

Paul_KD7HB:
IF you find a good one, the float switch on a cord is good. But needs a mod to get the range you need. The one I use in my irrigation water storage tank is from Brazil, Ebay, and has worked flawlessly for perhaps 8 years. Previous Chinese switch leaked.

To get the range from nearly empty to nearly full, I taped a plastic rod to the cord, with 4-5 inches of cord showing on each end of the rod. This way the switch cannot tip up far enough to trigger the switch off until the rod part is nearly horizontal.

The problem with using any float switch in a sewage liquid tank, is getting it adjusted properly!!!

What access do you have to the top of the storage tank?

Paul

Yeah I've pretty much made up my mind on the float switch on a cord setup. I have access to the top of the one side of the tank. It's a cylinder maybe 24" in diameter. Drops about 5' down to the top of the tank. Then another maybe 3' to the bottom. The Kari float I mentioned above is pretty simple. Attach it to something to keep it from dropping all the way in, but otherwise it just floats around and does it's thing. There are 2-3 pipes that run across the cylinder about 4' down that cause a bit of access issues, but I can drop the float down between them and let it just hang there fairly easily. I'm trying to avoid getting too many floats in there as the pipes and other stuff really limit the access.

I don't want to be a party pooper but while float switches work fine with clean water I would question their use for sewage. The fairly obvious issues with float switches is that they can become entangled by various things in the sewage and they then become hazardous to free.

The old system failed, and from your posts it sounds as if the float switches may have been part of the problem. So are float switches the solution or the cause?

Also you seem to be thinking that if the wiring to one float switch fails you will be okay because the next one will catch the problem. That is quite a big assumption. If the cables follow the same route both could be cut at the same time, all it takes is one mouse.

In fact the wires don't even need to be cut at the same time. Let's say the wiring to the high level float gets cut (and it is wired to give closed contacts on a high level), you would not know. There would be no indication at all that there was a fault, i.e. it is undisclosed. You are now running with only the wiring to the high high level float saving you from disaster, but it could later fail.

Regarding gases you really really should not underestimate the dangers these can pose. When an accident happens multiple fatalities can occur. Whatever this project involves you must be certain you do not introduce ignition sources into an explosive environment and that gases or lack of oxygen cannot affect people.

From what you have posted so far i think a better discription of what you have is needed.
A diagram of the sewage system would be good (hand drawn) with a better discription of the existing system.

You mention it should be liquid but some times paper gets in?

Our sewage system is all gravity, all waste goes into one end of a large settleing tank (the sewage tank) and the solids sink to the bottom where little elves break it down (no you cant have any elves the wont leave) the leftover liquid then flows out the other end into underground distribution pipes where it flows back into the soil.
If you think thats bad, you have not seen the way our grass grows.

Only problems faces are when something blocks and you flush the toilet. Anyone noticed how the cystern holds more water than the bowl can?

Daz

ardly:
The old system failed, and from your posts it sounds as if the float switches may have been part of the problem. So are float switches the solution or the cause?

The old system worked for 35 years, but eventually things like floats and pumps break. I would honestly consider them wear items that need to be checked and replaced every so often.

Our issue was both the pump control float and the high level alarm float were both broken. I knew essentially zero about this system when we purchased the house so I never checked anything or ensured the floats were working.

If wiring them in a NC method would allow me to verify if they broke easier, then that might be the way to go. I'm not 100% set on NO vs NC so whichever one is best for my situation.

I can't see the wires getting broken or chewed. It's more of an issue that the internal float switch contacts just fail eventually. My biggest worry would be that the high level alarm float breaks first (unknown to me) and then the pump control float fails and we get a backup situation again. So I guess I need to figure out the best way to wire these floats so that I can detect that. Otherwise if the pump control float breaks first, the high alarm float will warn me and still continue to operate the pump for the time being.

Daz1712:
From what you have posted so far i think a better discription of what you have is needed.
A diagram of the sewage system would be good (hand drawn) with a better discription of the existing system.

You mention it should be liquid but some times paper gets in?

Our sewage system is all gravity, all waste goes into one end of a large settleing tank (the sewage tank) and the solids sink to the bottom where little elves break it down (no you cant have any elves the wont leave) the leftover liquid then flows out the other end into underground distribution pipes where it flows back into the soil.
If you think thats bad, you have not seen the way our grass grows.

Yeah I'm not 100% sure on what we have honestly. I know it's an ejector system that is very old. Installed in 1979/80. I would love to dig it all up and install something new, but I don't have the 10-20K to even consider doing that now.

Our separator tank is a little bit different. The solids/liquids divider wall doesn't go all the way to the top of the tank. Thus if the liquids side gets too high (pump or float failure), it can flow over the wall and the two sides sort of mix again. It can cause some smaller solids and small pieces of paper to come into the liquids side. It's eventually caught by the filter, but I end up having to clean the filter a lot more for a few weeks/months until it gets sort of cleaned up again.

To start with, all I really want/need is a way to operate the pump/alarm with the two floats and have some sort of ability to know when there is a float issue (95% of the time it'll be a broken float switch that just needs replacement).

35 years is a seriously long time for a sewage system that relies on electricity. You should take time out and remove EVERY electrical connection and clean the wires and what ever they are connected to. Replace that which cannot be refurbished.

Paul