loading
Picture of Sump pump water level: The hardware
The second part of this tutorial about the software can be found here:

http://www.instructables.com/id/Sump-pump-water-level-The-software/

What you need:


* 2  X pieces of wood 4X6. 1/4'' and the other 1/2'' thick 
* 1 X 3 inches pipe. length varies depending of the deep of your pit.
* A couple of screw
* 1 X 1k resistor
* 1  X Raspberry pi
* 1X HC-SR04 ultrasonic sensor
* Wire





Step 1: The sensor

Picture of The sensor
The sensor mesure the time it took to an ultrasound to get back to it.
 
amherstuk made it!1 month ago

Genuis project. Thank you sooooo much. I had a look around and managed to find a few alternative parts to put a twist on a superb project.

a) I managed to get a waterproof sensor - with same pin outs as the SR04 (apart from it being 5v!). I got off ebay from here: http://www.ebay.co.uk/itm/1pc-Arduino-Ultrasonic-M...

b) Being in the UK - we have a great DIY store called "Screwfix". Found 3 inch gutter pipe, and a handy "box pipe converter" - which I fixed to the end using plastic cement and it acts as a nice enclosure for the small sensor board.

http://www.screwfix.com/p/square-line-black-draina...

http://www.screwfix.com/p/black-downpipe-2-5m/2525...

http://www.screwfix.com/p/floplast-sc250-solvent-c...

c) cut a small square of acrylic, cut hole in middle, threaded and dangled the sensor through - weirdly it gave weird readings if I tried to "mount" it on the plate.

d) used a 10m piece of cat5e (stranded patch cable) and soldered on the connectors on each end.

e) used potting compound to fill the top and encapulate the sensor board and spare cable.....50cm piece of chain to hang in our tank! Make sure you ensure all of the holes are sealed before pouring the potting compound....I had a bit of a leak - yuk!

I've taken the output from the python script - had a simple cronned script written so that it will SMS us when the tank gets too full.....using this project and Huewei adaptor.

http://www.mattiasnorell.com/send-sms-from-a-raspb...

Thanks again Luc - amazing inspiration - scripts worked a treat!

Triston.

IMG_20150702_173420.jpg2015-07-19 17.24.44 (Medium).jpg2015-07-18 16.00.43 (Medium).jpg2015-07-19 02.31.40 (Medium).jpg2015-07-19 02.32.01 (Medium).jpg2015-07-18 16.00.35 (Medium).jpg2015-07-18 17.05.49 (Medium).jpg2015-07-19 17.24.54 (Medium).jpg2015-07-18 17.06.00 (Medium).jpg2015-07-18 16.00.21 (Medium).jpg2015-07-18 16.00.45 (Medium).jpg2015-07-18 16.00.31 (Medium).jpg2015-07-18 17.11.52 (Medium).jpg2015-07-19 17.24.56 (Medium).jpg2015-07-23 15.44.28 (Medium).jpg2015-07-18 16.00.26 (Medium).jpg2015-07-23 15.44.29 (Medium).jpg2015-07-23 15.44.31 (Medium).jpg2015-07-18 15.59.40 (Medium).jpg2015-07-18 17.05.42 (Medium).jpg2015-07-18 16.00.10 (Medium).jpg2015-07-23 13.57.53 (Medium).jpg
LarryE13 months ago

This has been intriguing project. I was able to use your idea in setting up my raspberry pi to track the water usage for my power garden. I have set up a WordPress page with MySQL on the RP to track the the current water level. The project page is at: smarttowergarden.com. I have set up a blog with hurdles that I had to overcome in order to make it work.

Luc Moreau (author)  LarryE13 months ago

glad you like my project. I read on your blog that the level is not acurate when temperture is too high? Why not use an usb temperture to modify the result? I use this temperatur sensor to monitor the temperatur of my server room an send an email if temp is high.

http://www.cafr.ebay.ca/itm/USB-Temperature-Sensor...

Thank you for your comment. I'm currently getting the temperature from Gateway Airport. It's about 25 miles away from my home. I do have the temperature module but I have not installed it yet. Again thank you for your sump pump project. I need to look into the USB temperature sensor. I didn't know one existed. That would even work better.

thanks agin.

Larry E

narinder20157 months ago

you are great. I was Looking something similar. I will contact you for more aggressive version of this project. I will also pay you if we came to some solution of my problem.

SirAremssy8 months ago
I dnt know if you have a better way of doing it.
All I want to do is to monitor the level of the underground tank
And show the readings on my laptop.
Even if it's gonna be ordinary digital underground measuring
Tape. Am counting on you bro. I will be waiting for you reply.
SirAremssy8 months ago
I dnt know if you have a better way of doing it.
All I want to do is to monitor the level of the underground tank
And show the readings on my laptop.
Even if it's gonna be ordinary digital underground measuring
Tape. Am counting on you bro. I will be waiting for you reply.
SirAremssy8 months ago
Hello, nice work. I want to do a project that will measure an underground petrol tank and give me the readings on my laptop. Pls be my tutor for the project.. Aremsajos83@gmail.com. Thanks
Luc Moreau (author)  SirAremssy8 months ago

Do you have a specific question?

Rasp Pi connect to the sensor with 5 volt. Beware of the risk of spark.

I don't know if you have a better way if doing that.
All I want is to monitor the level of the underground tank
And show the readings on my system. It's gonna be a very profitable project if I can make it Done without any risk.
SirAremssy8 months ago
Hello, nice work. I want to do a project that will measure an underground petrol tank and give me the readings on my laptop. Pls be my tutor for the project.. Aremsajos83@gmail.com. Thanks
stefano_621 year ago

Hi, it is possible to make many sequential (4) measure and calculate the average to a better measurement?

Luc Moreau (author)  stefano_621 year ago

Hi Stephano,


Seem my first reply never appears. So it is:

What I do is the median instead of average. With average, if one data is really out of range, it will affect the average value. With the median, I'll take the middle value and if, for any reason, one the value is really out of range, it doesn't matter.

In the file sensor.py, at line 18, the loop read the distance 5 times, then sort the result and take the third value. I think more accurate this way.

for x in range(0, 5):

..

..

listvalue.append(mesurement)

listvalue.sort()

print listvalue[2]

The value[2] is the third value

foster241 year ago

How long can be cable between raspberry and ultrasonic sensor? Because for me would be best option to have only sensor in well and RPi in separate dry place. Thx.

Luc Moreau (author)  foster241 year ago

I use a 25 feet cable. For some reason, I have to power the sensor with the 5v pin. I guess it's because of the distance of the câble. It's running at home for a month now, scanning at every minute. I also add a line to the web page for auto refresh of the page at every minutes. I also add a led on the yellow and green wire. It blink when the sensor is running.