loading
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

The sensor mesure the time it took to an ultrasound to get back to it.

Advertisement

<p>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.</p><p>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: <a href="http://www.ebay.co.uk/itm/1pc-Arduino-Ultrasonic-Module-Distance-Measuring-Transducer-Waterproof-/331566604013?pt=LH_DefaultDomain_3&hash=item4d32e8deed" rel="nofollow">http://www.ebay.co.uk/itm/1pc-Arduino-Ultrasonic-M...</a></p><p>b) Being in the UK - we have a great DIY store called &quot;Screwfix&quot;. Found 3 inch gutter pipe, and a handy &quot;box pipe converter&quot; - which I fixed to the end using plastic cement and it acts as a nice enclosure for the small sensor board.</p><p><a href="http://www.screwfix.com/p/square-line-black-drainage-adaptor-65mm/91358" rel="nofollow">http://www.screwfix.com/p/square-line-black-draina...</a></p><p><a href="http://www.screwfix.com/p/black-downpipe-2-5m/25256" rel="nofollow">http://www.screwfix.com/p/black-downpipe-2-5m/2525...</a></p><p><a href="http://www.screwfix.com/p/floplast-sc250-solvent-cement-250ml/14295" rel="nofollow">http://www.screwfix.com/p/floplast-sc250-solvent-c...</a></p><p>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 &quot;mount&quot; it on the plate.</p><p>d) used a 10m piece of cat5e (stranded patch cable) and soldered on the connectors on each end.</p><p>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!</p><p>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.</p><p><a href="http://www.mattiasnorell.com/send-sms-from-a-raspberry-pi/" rel="nofollow">http://www.mattiasnorell.com/send-sms-from-a-raspb...</a></p><p>Thanks again Luc - amazing inspiration - scripts worked a treat!</p><p>Triston.</p>
<p>@amherstuk im trying to use the same sensor as you, the JSN - SR04 but i cant make it to work. Have you used a special code (python)? is it working ok after all these time?</p><p>By the way, love the main project idea and yours too.</p><p>Regards</p>
<p>Hi,<br><br>The com between the raspberry and the sensor is done with the file sensor.py<br>If you open the file, you'll see the code required 2 library: import time and import RPi.GPIO as GPIO. if you can run the python file manually, the problem is probably permission. You'll find the answer in the comment section of the software part.<br><br></p><p>My system is not running anymore . I use my blackberry for another task (kodi). Maybe later, I will do a arduino version of it. My goal is to build a lot of these sensor and send all the info to a central web server.</p>
Thanks for the help.. But i think my problem is with the sensor.. Im waiting for a hc-sr04 to confirm. Anyone with this sensor JSN-SR04 that can help me??
<p>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.</p>
<p>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.<br><br><a href="http://www.cafr.ebay.ca/itm/USB-Temperature-Sensor-Tester-Data-Log-Test-Thermometer-for-PC-Warehouse-Home-/201098266119?pt=LH_DefaultDomain_0&hash=item2ed2640607" rel="nofollow">http://www.cafr.ebay.ca/itm/USB-Temperature-Sensor...</a></p>
<p>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.</p><p>thanks agin.</p><p>Larry E</p>
<p>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.</p>
I dnt know if you have a better way of doing it. <br>All I want to do is to monitor the level of the underground tank <br>And show the readings on my laptop. <br>Even if it's gonna be ordinary digital underground measuring <br>Tape. Am counting on you bro. I will be waiting for you reply.
I dnt know if you have a better way of doing it. <br>All I want to do is to monitor the level of the underground tank <br>And show the readings on my laptop. <br>Even if it's gonna be ordinary digital underground measuring <br>Tape. Am counting on you bro. I will be waiting for you reply.
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
<p>Do you have a specific question? <br><br>Rasp Pi connect to the sensor with 5 volt. Beware of the risk of spark.</p>
I don't know if you have a better way if doing that. <br>All I want is to monitor the level of the underground tank <br>And show the readings on my system. It's gonna be a very profitable project if I can make it Done without any risk.
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
<p>Hi, it is possible to make many sequential (4) measure and calculate the average to a better measurement?</p>
<p>Hi Stephano,</p><p><br>Seem my first reply never appears. So it is:</p><p>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.<br><br>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.<br><br><em>for x in range(0, 5):</em></p><p><em> ..</em></p><p><em> ..</em></p><p><em>listvalue.append(mesurement)</em></p><p><em>listvalue.sort()</em></p><p><em>print listvalue[2]<br><br></em>The value[2] is the third value</p>
<p>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. </p>
<p>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&acirc;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.</p>

About This Instructable

22,352views

42favorites

License:

More by Luc Moreau:Precise glass bottle cutting jig Sump pump water level: The software Sump pump water level: The hardware 
Add instructable to: