cubicalmonkey
Posts: 8
Joined: Mon Nov 26, 2012 10:44 pm

Sump water level monitoring

Tue Nov 27, 2012 2:22 am

Hi,
During a recent storm I got the idea to create a system to monitor water levels in the sump hole and alert me in the event the level reaches a critical level.
I was hoping the get some direction on a few questions.
1. Does anyone have a recommendation to build a water sensor or is this something I should purchase? It seems fairly easy to build, water closes a gap between two wires and the circuit is complete....
2. I would like to have multiple levels to alert me as the levels rise and fall. Is there any advise anyone could share and monitoring an array of sensors?

I'm completely knew to the hardware side of things and eager to learn.
Thanks.

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 5:23 am

I partially built a water level sensor last year but due to lack of time(and rain ;) i did not finish it.
If you plan to have wires submerged in water bear in mind that electrolysis will occur and the probes will perish. If the water comes up only when it rains maybe it will last longer.

There are 2 solutions for this
1. You can generate alternating current so the electrolysis will not kill the wires. Then you pass the AC throught a diode and aplyfi it with some NAND gate.

2. I also read about a solution with electrodes/probes made from graphite. Old brushed from electric motors seem to be an cheap source. You don't need a AC generator

Here is a simple schematic of spilled water detector. I will add the schematic for 1 later because I can't find it now.

southpaw
Posts: 52
Joined: Wed Nov 30, 2011 2:23 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 8:12 am

I have a sump in my cellar as it's prone to flooding, simple setup of a bilge pump with a float switch, I just used regular boating stuff, did hope to use a pi or arduino but not got round to it, sure the float switch could be incorporated into a simple pi or arduino circuit

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 2:36 pm

I also found a chip designed specially for that. It has AC generator and all required things.
It's LM1830 however it's hard to get and cost a fortune.

I found the schematics for a generator. The article is in Polish but the schematics is on the second site.
http://dl.dropbox.com/u/96422972/poziom_cieczy.pdf

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25924
Joined: Sat Jul 30, 2011 7:41 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 2:57 pm

How about a oil tank monitor? IIRC they use ultrasound to detect the level in the tank, and a wireless connection to a remote display. Not particularly cheap, but possible to make you own?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“My wife said to me `...you’re not even listening`.
I thought, that’s an odd way to start a conversation.."

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 3:17 pm

This one is cheap and has some kind of digital output
http://dx.com/p/ultrasonic-sensor-dista ... ule-138563
AFAIK it has some support in Arduino so it would be possible to port it to Raspi.

Maybe there is some problem with the width of the "beam" it could reflect from the sides of the tank.

I just remembered that there is a way to measure using a multi turn potentiometer a float and a weight on the opposite side.
http://iamechatronics.com/notes/general ... /321-float
But it needs a AD converter.

cubicalmonkey
Posts: 8
Joined: Mon Nov 26, 2012 10:44 pm

Re: Sump water level monitoring

Tue Nov 27, 2012 7:16 pm

So I think I found my solution using: 12" eTape Liquid Level Sensor http://www.adafruit.com/products/464
I do need to figure out how to interface this with my RPI though. I think I'll need to use an audrino in order to talk to the sensor but I'm not certain.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: Sump water level monitoring

Tue Nov 27, 2012 7:55 pm

Marine Aquarium buffs often use float switches like this: http://www.ebay.co.uk/itm/PP-Liquid-Wat ... 564b4e5a70

The float has a magnet in it that closes a reed switch when it goes past.

The draw backs with this approach are that the float can stick and give a false reasing if it gets gunked up.

There are larger switch solutions with floats on the end of pivoting arms like those in your toilet cistern that are less prone to getting stuck.

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: Sump water level monitoring

Wed Nov 28, 2012 1:03 am

cubicalmonkey wrote: I do need to figure out how to interface this with my RPI though. I think I'll need to use an audrino in order to talk to the sensor but I'm not certain.
Arduino is a little overkill for this. You just need some Analog to Digital Converter which maybe has i2c interlace to translate the change in resistance/voltage to digital signal.

Use something like this (however I think it takes up 4 PIOs)
http://learn.adafruit.com/reading-a-ana ... spberry-pi

Or one that uses i2c
http://elinux.org/RPi_Expansion_Boards# ... and_RTC_Pi

onepoint21
Posts: 42
Joined: Thu Nov 22, 2012 12:13 am

Re: Sump water level monitoring

Sat Dec 01, 2012 1:54 pm

These are the switches I picked up off ebay to do this very thing.

Image

I'm integrating it into a mobile interface for home automation.
http://www.raspberrypi.org/phpBB3/viewt ... 37&t=24115

User avatar
michele.x
Posts: 72
Joined: Sat Sep 22, 2012 8:15 pm

Re: Sump water level monitoring

Sat Dec 01, 2012 3:01 pm

cubicalmonkey wrote:So I think I found my solution using: 12" eTape Liquid Level Sensor http://www.adafruit.com/products/464
I do need to figure out how to interface this with my RPI though. I think I'll need to use an audrino in order to talk to the sensor but I'm not certain.
If you're interested on a high and low level alarm I suggest to you to go the analog way, like we're in 1976 ;-) .

Take an LM311

http://www.ti.com/general/docs/lit/getl ... leType=pdf

and use a resistance bridge with the sensor in one leg and a trimpot in the other to set the danger level, like the coarse schematic below.
schematic1.gif
schematic1.gif (1.6 KiB) Viewed 23963 times

AdeV73
Posts: 6
Joined: Wed Nov 28, 2012 8:42 pm

Re: Sump water level monitoring

Sat Dec 01, 2012 9:12 pm

Similar idea, I actually built one of these; I added some salvaged logic ICs as I wasn't using a 7-seg display so I could display a simple red/yellow/green LED lineup.

Here's the original, from 1984:

Image

cubicalmonkey
Posts: 8
Joined: Mon Nov 26, 2012 10:44 pm

Re: Sump water level monitoring

Mon Dec 17, 2012 11:31 am

Just wanted to follow up.
I've successfully built my water level monitor using Milone Tech's 12" eTape Liquid Level Sensor.
I'm logging the resistance along with date/time once a minute via cron and then converting to inches on my graph.
Initially I tapped the sensor to the side wall of my sump whole which is basically a PVC cylinder. Since you cant place any adhesive below the first inch or two, the bottom of the tape sort of just dangles.
When the water rose and fell, the tape got suctioned to the side wall due to surface tension. I thought to place the tape inside a 1" (inside diameter) PVC pipe and drop the whole thing into the hole. That works perfectly.
Double checked with their tech support that it wouldn't interfere and it seems thats one of the recommended mounting procedures.

Attached image is my HTML5 graph showing water level in inches. The eTape inside the PVC pipe was provided by Milone Tech support but is identical to what I'm using.
graph.jpg
graph.jpg (30.04 KiB) Viewed 23799 times
pvc.jpg
pvc.jpg (14.69 KiB) Viewed 23799 times

cubicalmonkey
Posts: 8
Joined: Mon Nov 26, 2012 10:44 pm

Re: Sump water level monitoring

Mon Dec 17, 2012 2:24 pm

onepoint21 wrote:These are the switches I picked up off ebay to do this very thing.

Image

I'm integrating it into a mobile interface for home automation.
http://www.raspberrypi.org/phpBB3/viewt ... 37&t=24115
Just watched your video on the web enabled thermostat, very cool!
I'm in the planning stage of doing the same thing.
Can I ask what type of relay board you're using?

onepoint21
Posts: 42
Joined: Thu Nov 22, 2012 12:13 am

Re: Sump water level monitoring

Mon Dec 17, 2012 10:10 pm

cubicalmonkey wrote:
onepoint21 wrote:These are the switches I picked up off ebay to do this very thing.

Image

I'm integrating it into a mobile interface for home automation.
http://www.raspberrypi.org/phpBB3/viewt ... 37&t=24115
Just watched your video on the web enabled thermostat, very cool!

I'm in the planning stage of doing the same thing.
Can I ask what type of relay board you're using?
The relay board I bought was from sainsmart.com. You might also be able to save a little money looking on eBay. However the sainsmart relay boards were very reasonable.

onepoint21
Posts: 42
Joined: Thu Nov 22, 2012 12:13 am

Re: Sump water level monitoring

Mon Dec 17, 2012 10:17 pm

cubicalmonkey wrote:Just wanted to follow up.
I've successfully built my water level monitor using Milone Tech's 12" eTape Liquid Level Sensor.
I'm logging the resistance along with date/time once a minute via cron and then converting to inches on my graph.
Initially I tapped the sensor to the side wall of my sump whole which is basically a PVC cylinder. Since you cant place any adhesive below the first inch or two, the bottom of the tape sort of just dangles.
When the water rose and fell, the tape got suctioned to the side wall due to surface tension. I thought to place the tape inside a 1" (inside diameter) PVC pipe and drop the whole thing into the hole. That works perfectly.
Double checked with their tech support that it wouldn't interfere and it seems thats one of the recommended mounting procedures.

Attached image is my HTML5 graph showing water level in inches. The eTape inside the PVC pipe was provided by Milone Tech support but is identical to what I'm using.
graph.jpg
pvc.jpg
Could you give some more detail on how you interfaced this with the pi? I really like this solution!

cubicalmonkey
Posts: 8
Joined: Mon Nov 26, 2012 10:44 pm

Re: Sump water level monitoring

Tue Dec 18, 2012 1:33 am

onepoint21 wrote:
cubicalmonkey wrote:Just wanted to follow up.
I've successfully built my water level monitor using Milone Tech's 12" eTape Liquid Level Sensor.
I'm logging the resistance along with date/time once a minute via cron and then converting to inches on my graph.
Initially I tapped the sensor to the side wall of my sump whole which is basically a PVC cylinder. Since you cant place any adhesive below the first inch or two, the bottom of the tape sort of just dangles.
When the water rose and fell, the tape got suctioned to the side wall due to surface tension. I thought to place the tape inside a 1" (inside diameter) PVC pipe and drop the whole thing into the hole. That works perfectly.
Double checked with their tech support that it wouldn't interfere and it seems thats one of the recommended mounting procedures.

Attached image is my HTML5 graph showing water level in inches. The eTape inside the PVC pipe was provided by Milone Tech support but is identical to what I'm using.
graph.jpg
pvc.jpg
Could you give some more detail on how you interfaced this with the pi? I really like this solution!
I'm using an MPC3008 analogue to digital converter in order for my rpi to get the resistance level from the sensor. I purchased this here: https://www.adafruit.com/products/856
Also followed adafruit's tutorial on connecting to the gpio.
http://learn.adafruit.com/reading-a-ana ... -a-mcp3008

Summary:
Wiring Diagram
In order to read analog data we need to use the following pins: VDD (power), DGND (digital ground) to power the MCP3008 chip. We also need four 'SPI' data pins: DOUT (Data Out from MCP3008), CLK (Clock pin), DIN (Data In from Raspberry Pi), and /CS (Chip Select). Finally of course, a source of analog data, we'll be using the basic 10k trim pot.

The MCP3008 has a few more pins we need to connect: AGND (analog ground, used sometimes in precision circuitry, which this is not) connects to GND, and VREF (analog voltage reference, used for changing the 'scale' - we want the full scale so tie it to 3.3V)

Below is a wiring diagram. Connect the 3.3V cobbler pin to the left + rail and the GND pin to the right - rail. Connect the following pins for the MCP chip
MCP3008 VDD -> 3.3V (red)
MCP3008 VREF -> 3.3V (red)
MCP3008 AGND -> GND (black)
MCP3008 CLK -> #18 (orange)
MCP3008 DOUT -> #23 (yellow)
MCP3008 DIN -> #24 (blue)
MCP3008 CS -> #25 (violet)
MCP3008 DGND -> GND (black)


From there just followed adafruit's advise from the tutorial tab.
http://www.adafruit.com/products/463
Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 470 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.

Hope this helps.

onepoint21
Posts: 42
Joined: Thu Nov 22, 2012 12:13 am

Re: Sump water level monitoring

Tue Dec 18, 2012 10:33 am

cubicalmonkey wrote:
onepoint21 wrote:
cubicalmonkey wrote:Just wanted to follow up.
I've successfully built my water level monitor using Milone Tech's 12" eTape Liquid Level Sensor.
I'm logging the resistance along with date/time once a minute via cron and then converting to inches on my graph.
Initially I tapped the sensor to the side wall of my sump whole which is basically a PVC cylinder. Since you cant place any adhesive below the first inch or two, the bottom of the tape sort of just dangles.
When the water rose and fell, the tape got suctioned to the side wall due to surface tension. I thought to place the tape inside a 1" (inside diameter) PVC pipe and drop the whole thing into the hole. That works perfectly.
Double checked with their tech support that it wouldn't interfere and it seems thats one of the recommended mounting procedures.

Attached image is my HTML5 graph showing water level in inches. The eTape inside the PVC pipe was provided by Milone Tech support but is identical to what I'm using.
graph.jpg
pvc.jpg
Could you give some more detail on how you interfaced this with the pi? I really like this solution!
I'm using an MPC3008 analogue to digital converter in order for my rpi to get the resistance level from the sensor. I purchased this here: https://www.adafruit.com/products/856
Also followed adafruit's tutorial on connecting to the gpio.
http://learn.adafruit.com/reading-a-ana ... -a-mcp3008

Summary:
Wiring Diagram
In order to read analog data we need to use the following pins: VDD (power), DGND (digital ground) to power the MCP3008 chip. We also need four 'SPI' data pins: DOUT (Data Out from MCP3008), CLK (Clock pin), DIN (Data In from Raspberry Pi), and /CS (Chip Select). Finally of course, a source of analog data, we'll be using the basic 10k trim pot.

The MCP3008 has a few more pins we need to connect: AGND (analog ground, used sometimes in precision circuitry, which this is not) connects to GND, and VREF (analog voltage reference, used for changing the 'scale' - we want the full scale so tie it to 3.3V)

Below is a wiring diagram. Connect the 3.3V cobbler pin to the left + rail and the GND pin to the right - rail. Connect the following pins for the MCP chip
MCP3008 VDD -> 3.3V (red)
MCP3008 VREF -> 3.3V (red)
MCP3008 AGND -> GND (black)
MCP3008 CLK -> #18 (orange)
MCP3008 DOUT -> #23 (yellow)
MCP3008 DIN -> #24 (blue)
MCP3008 CS -> #25 (violet)
MCP3008 DGND -> GND (black)


From there just followed adafruit's advise from the tutorial tab.
http://www.adafruit.com/products/463
Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 470 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.

Hope this helps.
That's perfect. Thank you!

ruppgeoff
Posts: 2
Joined: Fri Apr 12, 2013 9:07 pm

Re: Sump water level monitoring

Fri Apr 12, 2013 9:09 pm

Thanks for posting this. Been looking to do the exact same thing at my home. Have had multiple sump pump failures and it would be nice to have a way to determine that I have a problem before the backup sump pump fails as well.

mrab54
Posts: 1
Joined: Mon Jul 08, 2013 12:43 am

Re: Sump water level monitoring

Mon Jul 08, 2013 12:52 am

I'm confused at how to connect the eTape.
Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 470 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.
Pin #2 goes to ground, got that. Pin #3 -> 560 ohm resistor -> 3.3V? I assume the part about 470 ohm resistor is a typo?

The ADC pin - this would be pin #1 (CH0) on the MCP3008, correct? What pin on the eTape needs to connect to the ADC pin? Since the resistor is on pin #3 and the sensor is on pin #2, how can the ADC pin connect between those two?

Thanks!

mikey11
Posts: 355
Joined: Tue Jun 25, 2013 6:18 am
Location: canada
Contact: Website

Re: Sump water level monitoring

Wed Jul 10, 2013 8:35 pm

I completed a project that could be applied to sump monitoring no problem.

It uses I2C for a display, and serial to take input from an ultrasonic sensor.

If this is being used to trip a pump though, I recommend a float switch attached to the sump pump. This is the most reliable way to achieve good sump drainage.

If you want to use a pi to monitor the level, then my project would work.

http://www.raspberrypi.org/phpBB3/viewt ... 22#p376722

I use this to monitor the height of water in my cistern, but you could adapt the code in short order for datalogging and whatever else you want.

AndyPoms
Posts: 6
Joined: Fri Aug 09, 2013 8:30 pm

Re: Sump water level monitoring

Sun Oct 06, 2013 10:29 pm

cubicalmonkey wrote:
onepoint21 wrote:
cubicalmonkey wrote:Just wanted to follow up.
I've successfully built my water level monitor using Milone Tech's 12" eTape Liquid Level Sensor.
I'm logging the resistance along with date/time once a minute via cron and then converting to inches on my graph.
Initially I tapped the sensor to the side wall of my sump whole which is basically a PVC cylinder. Since you cant place any adhesive below the first inch or two, the bottom of the tape sort of just dangles.
When the water rose and fell, the tape got suctioned to the side wall due to surface tension. I thought to place the tape inside a 1" (inside diameter) PVC pipe and drop the whole thing into the hole. That works perfectly.
Double checked with their tech support that it wouldn't interfere and it seems thats one of the recommended mounting procedures.

Attached image is my HTML5 graph showing water level in inches. The eTape inside the PVC pipe was provided by Milone Tech support but is identical to what I'm using.
graph.jpg
pvc.jpg
Could you give some more detail on how you interfaced this with the pi? I really like this solution!
I'm using an MPC3008 analogue to digital converter in order for my rpi to get the resistance level from the sensor. I purchased this here: https://www.adafruit.com/products/856
Also followed adafruit's tutorial on connecting to the gpio.
http://learn.adafruit.com/reading-a-ana ... -a-mcp3008

Summary:
Wiring Diagram
In order to read analog data we need to use the following pins: VDD (power), DGND (digital ground) to power the MCP3008 chip. We also need four 'SPI' data pins: DOUT (Data Out from MCP3008), CLK (Clock pin), DIN (Data In from Raspberry Pi), and /CS (Chip Select). Finally of course, a source of analog data, we'll be using the basic 10k trim pot.

The MCP3008 has a few more pins we need to connect: AGND (analog ground, used sometimes in precision circuitry, which this is not) connects to GND, and VREF (analog voltage reference, used for changing the 'scale' - we want the full scale so tie it to 3.3V)

Below is a wiring diagram. Connect the 3.3V cobbler pin to the left + rail and the GND pin to the right - rail. Connect the following pins for the MCP chip
MCP3008 VDD -> 3.3V (red)
MCP3008 VREF -> 3.3V (red)
MCP3008 AGND -> GND (black)
MCP3008 CLK -> #18 (orange)
MCP3008 DOUT -> #23 (yellow)
MCP3008 DIN -> #24 (blue)
MCP3008 CS -> #25 (violet)
MCP3008 DGND -> GND (black)


From there just followed adafruit's advise from the tutorial tab.
http://www.adafruit.com/products/463
Connect pin #2 of the sensor to ground, then pin #3 to a 560 ohm resistor. The other side of the 470 ohm resistor to VCC (3.3V or 5V for example) to create a resistor divider. The ADC pin connects to the point between the resistor and sensor.

Hope this helps.
I'm having trouble finding the equation to convert from the resistance of the tape to inches (AdaFruit's website says to look at the App Note, but I can't find it in there). The code posted at http://www.adafruit.com/products/464#Tutorials (I'm using the 12" sensor - but it's the same code as the 8" version) returns the resistance of the tape, but what's the mathematical formula to convert to inches (or centimeters)?

Return to “Automation, sensing and robotics”