Ultrasonic Sensor sensitivity to water surface

Hi just curious to know if the HC-SR04 ultrasonic sensor could be used to detect the surface of a fluid in a tank. I envision mounting the sensor at the top of the tank, with the transducers pointing downward. Of course there would be some testing/calibration required but I am now just interested if the sensor would/will sense the water/air interface.

I thank you for all the constructive criticism.

Yes, it will work, but be aware that the sensor may not last in a high humidity environment.

I would lean towards a fluid level sensor as it's specifically designed for a wet environment.

I was hoping to avoid anything that makes contact with the water, although it might be simpler that way. I know I can mount small "floats" connected to microswitches such that when the level of the fluid changes, the floats operate the microswitches to also give a level reading, but this seemed much simpler.

Would anyone envision problems with isolating the HC-SR04 from the ambient air in the tank by placing?stretching some small-width, clear plastic over the sensor to keep the humidity away from the sensor?

Thanks again all!

I have seen references to waterproof HCSR04 rangefinders in other posts about tank level sensing. Maybe search for that.

Sealed Waterproof ultrasonic/distance small blind sensor arduino Fully Genuine | eBay

Cool beans!!! I thank you gentlemen for all of your insights!!

You might want to look into a float device that uses a photo sensor rather than micro switches.

Or a magnet and Hall Effect sensor(s).

Much depends on the shape and size of your tank, in relation to the cone of signal from the emitter. Echo from the tank edges will interfere with the echo from the direct water surface if the test pulse is done too often.
Paul

That is another cool idea, but will imply more construction work on my part. I can easily see how much better this idea would be without having to bring in any wires into the tank (the hall-effect idea). More food for thought!!!

BTW is it possible to easily modulate the output power of the HCSR04? Might be handy....

Not if you are looking at the same documentation as I am. All you can do is tell it's processor to begin the test and then wait for it to tell you it has an echo.
Paul

Hey Paul does your documentation show the actual circuitry? It might be possible to alter the TX sending circuitry to reduce OP power if one started to get a bunch of extra, unwanted echos/reflections.

Yes, I've done it.

I would suggest this sensor waterproof sensor

There was one that had a metal body that would be better for petroleum tanks (as home heating oil) but I couldn't find it in a quick search.

And you must keep the sensor relatively perpendicular to the liquid surface.
May need temp compensation.

Sure, or you can muffle the transducer.

The ultrasonic sensors work on a pulse basis.
"Ping" the transmitter..... wait for an echo above some noise level. Reducing the power of one of these boards will not gain anything useful.

There are a couple variants of HC-SR04 with somewhat different circuitry, but there is no trivial way of modifying output power. The HC-SR04 nominally triggers on the first echo it receives so it's not clear in what scenario reducing the output power would make much difference.

Echos will limit the repetition interval for range finding, which might matter in a highly dynamic environment, but I would think any plausible interval is going to be "fast" relative to changes in tank level.

It could allow the user to increase the pulse repetition rate, at the expense of reduced range.

I haven't found the waterproof ones loose but the standard TX and RX components are available without the module.
They could be interfaced directly and controlled by software and minimal support circuitry. Might be easier to reinvent the wheel in this case rather than try to change the way the existing one rolls.

EDIT: Found the waterproof TX and RX units

You may be correct but I'm not sure what your thinking is. I was under belief that the repetition rate was a function of timing, not voltage (or power).