Question on ultrasonic sensor! - Arduino Forum

30 Jun.,2025

 

Question on ultrasonic sensor! - Arduino Forum

Lavan:
If I keep the ultrasonic sensors (40KHZ/25KHZ) in a sealed plastic container, will they still measure the distance? I want to measure the water level in a tank about 10ft depth and I don’t have the water proof ultrasonic sensors available at my place. Any suggestions are welcome.

If you are looking for more details, kindly visit our website.

I don't know your exact usage, but maybe instead of measuring the depth of the water from the surface down, you could measure the distance from above the surface to the water's surface. Then, with a known surface level and depth, you could easily calculate the depth.

In other words, put the ultrasonic sensor let's say 1 foot above the surface of the water. The sensor would measure the distance as 12 inches. You then measure the distance from the sensor to the bottom of the tank, lets say it's 132 inches. So, when the sensor reads 12 inches, you would do 132-12=120 inch water depth. When the sensor reads 15 inches, 132-15=117 inch water depth.

While the ultrasonic sensor won't work under water, the ping will reflect off the water's surface. Not knowing your exact usage maybe this won't work. But, if it's a tank, it has a static depth and probably a place to mount the sensor above water. If you do choose to use an ultrasonic sensor, may I suggest the NewPing library which has a ping_median method that would work nicely to filter out noise and get an accurate measurement with something like this that's probably not moving quickly.

Tim

Hello from France,

Even if you find an ultrasonic sensor to put in the water, the speed of sound if a lot more high in water than in air, so it could be difficult to work with.

May be you can use a pressure sensor. You just have to put it at the bottom and read the pressure : about 14.5 PSI for 33 feets of water depth.

Goto Yuhan to know more.

AWOL:

.Not sure if its true, that's why I was looking for the water proof sensors, but unfortunately those are not available here.

what about automotive sensors?

From one of my sensorics classes:
Automotive sensors (older versions, and maybe even some new ones), are essentially created from the floating part and the resistor wire...
The floating part is sliding on the resistor wire, giving us the exact volume of the liquid inside the tank (like a pot meter)...
Older car models had a 12V system, so if you hit something, and +12 and GND shorted, well the car would blew up...
My teacher had the opportunity to open one of cars tank, and he found out that the wires, and the connectors of the sensor were so badly insulated, and that every petrol car is essentially a time bomb (imagine riding over bumpy roads)...

So if your liquid won't blow up, you could use the existing car sensors.

AWOL:
My car has both front and rear ultrasonic sensors.
I would have thought that they'd be at least IP65 to withstand rain hitting them at over 160 kph.

The issue is not if a sensor that can withstand rain (obviously, they can as weatherproof ultrasonic sensors exist). The issue is will it actually work while submerged. Put your car under water, back up, and see if the sensors works. I would guess they won't. The ability for the sensor to withstand rain at 160kph is meaningless in this context. Will it work underwater is the question, and your car sensors I'm sure wouldn't. But, I would suggest trying, just to be sure

Tim

The company is the world’s best Ultrasonic Liquid level transmitter supplier. We are your one-stop shop for all needs. Our staff are highly-specialized and will help you find the product you need.

Ultrasonic level sensor comparisons, opinions or experiences?

I'm going to propose at work that we switch out a traditional float based (automatic) sewage ejector pump system with a non-automatic zoller .5 hp sewage ejector pump because very often we have to pull that pump or even replace it when the float gets fouled with grease and debris from sinks at a commercial salad bar (2 sinks feed into the basin) My idea was to use a DL-14 ultrasonic level sensor, protected in a tube away from foaming or turbulence with the thought that this rig wll not fail as often as the wet floats do. The basin is a standard Zoller 30" wide basin. Does anyone have experience with these DL0-14's? I like that they have basic logics built in so that you don't need a PLC. The only flaw that I hear is condensation issues. I want to ease my work place into the idea of upgrading their equipment with modern technology without asking for a lot of money for the project. I know radar from what I read is much better but twice the price so trying to avoid that. Should I go ahead with the DL14? Will it give me lots of headaches and take away from my log term goal of upgrading other pumping basins, pits etc that we deal with? Please share your opinions if you are so inclined.
thanks! I think the grease will be the main problem here. Since you want to protect the sensor in a tube, there is a high probability bordering on certainty that a rapidly growing deposit of grease will form inside the tube at the maximum level. This growing ring will cause false echoes and interfere with measurement, regardless of whether you are using an ultrasonic or radar sensor.

I think a float will yield the best results. In such cases it's a good idea to create a maintenance manual with a note suggesting regular cleaning of the float to keep things running smoothly.

Edit:
As an alternative, you could use a rod probe with integrated electronics. It will still accumulate a lot of grease, but it will be much easier to clean.
I think the grease will be the main problem here. Since you want to protect the sensor in a tube, there is a high probability bordering on certainty that a rapidly growing deposit of grease will form inside the tube at the maximum level. This growing ring will cause false echoes and interfere with measurement, regardless of whether you are using an ultrasonic or radar sensor.

I think a float will yield the best results. In such cases it's a good idea to create a maintenance manual with a note suggesting regular cleaning of the float to keep things running smoothly.

Edit:
As an alternative, you could use a rod probe with integrated electronics. It will still accumulate a lot of grease, but it will be much easier to clean.
That's a great point that i had not thought of. A rod based system could easly be pulled out from the top, wiped down/ cleaned and re-installed. Are there any out there that have basic built in logics so that they can be used without a PLC? I'm used to using E+H. They offer the option to configure electronics into the sensor head (Liquipoint T FTW31). I'm sure other manufacturers are not falling behind E+H.

Anyway, since this is a wastewater application, I’d prefer not to place the electronics inside the basin—any leak, and the electronics will corrode like crazy. The conditions outside are far more forgiving by comparison, so I’d keep the sensor head above the lid.

If you have any cabinet near the basin, there's also the option to mount a separate level relay out of harm’s way - instead of integrated electronics. Although not familiar with your exact application, I do work in a plant, that had a number of wastewater sumps, with traditional floats for pump control.
Harsh environment and not a week would pass without a float needing replacement. As I was the one climbing into the sumps, I decided to try expensive ultrasonic sensors, had the setup software for filtering etc blah blah, and I swear those sensors were posessed by demons. Anytime I took them out, they were absolutely accurate, put them back in, could be great for a month or could go nuts within an hour.
I had to endure "my mistake" until the company forgot about buying them
Went for glory again, this time with an ifm radar (not cheap).
Eureka, that must be 3 years ago and they have been flawless.

From then onwards, any travelling salesman uttering the word "ultrasonic" was forcefully ejected from the site.
From then onwards, any travelling salesman uttering the word "ultrasonic" was forcefully ejected from the site
My experience with Ultrasonics is that they are notorious for not picking up the return echo due to material type of angle of material, and for picking up false returns from edges or parts being filled in and being in the path of the sensor (*), and generally being unreliable. They can even pick up sharp sounds, i.e. metal parts being dumped into a metal container as echoes.
Also, 'never again' from me.

The most reliable method is in my opinion to have the entire vessel on loadcells. No buildup problem. It may be a bit expensive, and the application may not be suited for it.

*: For radar, be sure to place it where the beam wont be in the same path as the material being filled in.