Instructables
loading
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





 
Remove these adsRemove these ads by Signing Up

Step 1: The sensor

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

Step 2: Create the base

Picture of Create the base
First, cut a 3 inches hole in the thicker 4''X6'' piece of wood. Stick the pieces of wood together.

Step 3: Prepare the base for the sensor.

Picture of Prepare the base for the sensor.
Drill two 3/4'' hole in the center of the 3'' hole. The distance between them is 1''. Add 3 screw to hold the pipe.

Step 4: Add the sensor

Picture of Add the sensor
Mount the sensor on 2 spacer to keep the sensor level. Stick the sensor to the spacer with hot glue.

Step 5:

Picture of
Add 8 screw to hold the wired. Optional: add a plexyglass cover to protect your masterpiece.

Step 6: Connection

Picture of Connection
How to connect to the raspberry:

Pin 1 GND: connect to the ground of the rasp.
Pin 2 Echo to gpio 9
Pin 3 Trig to gpio 11. Add a 1k resistor
Pin 4 VCC to the 3.3V 

Note 1: According to the manual, the sensor used 5v. But it work perfectly at 3.3v.

Note 2: Beware, we see the back of the sensor in this pic, so the order of the pin are reverse.

 


Step 7: Add the pipe

Picture of Add the pipe
Add the pipe to the controller and thighten the 3 screw.
narinder20154 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.

SirAremssy4 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.
SirAremssy4 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.
SirAremssy4 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)  SirAremssy4 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.
SirAremssy4 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.