Author Topic: Acoustic level sensing in a pipe  (Read 18620 times)

0 Members and 3 Guests are viewing this topic.

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7074
  • Country: de
Re: Acoustic level sensing in a pipe
« Reply #25 on: May 03, 2022, 05:13:07 am »
We did this ~12 years ago with commercial ultrasonic sensors and a strict no-fluid-contact rule. Just sticking a pipe into the tank worked absolutely perfectly. The pipe length was somewhere around 4m and pipe diameter was, I think, 1-1/2 in (~40mm).

Thank you, that is reassuring. I am just waiting for a standard ultrasound sensor to arrive.

I can certainly guarantee "no fluid contact" as in "no immersion" -- but did you also need to (and manage to) avoid condensation on the sensor? Some high-end sensors are specified as being self-cleaning, which I assume means they shake off droplets via the ultrasound emission. But lower-cost transducers probably don't work well when droplets are sticking to them?
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6971
  • Country: nl
Re: Acoustic level sensing in a pipe
« Reply #26 on: May 03, 2022, 07:51:17 am »
How long would some cling film last in the dark? It's ultrasonic transparant AFAIK.
 

Offline exmadscientist

  • Frequent Contributor
  • **
  • Posts: 404
  • Country: us
  • Technically A Professional
Re: Acoustic level sensing in a pipe
« Reply #27 on: May 03, 2022, 08:02:10 am »
We did this ~12 years ago with commercial ultrasonic sensors and a strict no-fluid-contact rule. Just sticking a pipe into the tank worked absolutely perfectly. The pipe length was somewhere around 4m and pipe diameter was, I think, 1-1/2 in (~40mm).

Thank you, that is reassuring. I am just waiting for a standard ultrasound sensor to arrive.

I can certainly guarantee "no fluid contact" as in "no immersion" -- but did you also need to (and manage to) avoid condensation on the sensor? Some high-end sensors are specified as being self-cleaning, which I assume means they shake off droplets via the ultrasound emission. But lower-cost transducers probably don't work well when droplets are sticking to them?
"No immersion" was for the other end of the business: the liquid was high-purity, clean-room stuff. (Also it hated iron, and stainless steel contains iron. Yes, this was a massive headache.) This liquid additionally hated oxygen, so it was kept under a dry nitrogen blanket. (That one was surprisingly little headache.) So, condensation was not a concern for us, and I'm afraid I can't provide any guidance for you there.

If it helps, the sensor we used was this guy, the ToughSonic 30, or one of its close relatives. I didn't select it, so I can't tell you why it was chosen. I can just tell you that it works pretty well. It's probably out of your price range, though (it's out of mine if I'm paying!).

How long would some cling film last in the dark? It's ultrasonic transparant AFAIK.
I have a hard time believing that, given that something as simple as a boundary layer between two different gases will royally destroy the poor sensors.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6971
  • Country: nl
Re: Acoustic level sensing in a pipe
« Reply #28 on: May 03, 2022, 10:23:10 am »
The boundary layer is an impedance jump, as long as the loss factor for the cling film isn't significant it's too thin for impedance to be relevant AFAICS.

Also it depends on if the processing has a blanking interval for close reflections. If you DIY the processing there's more flexibility.
« Last Edit: May 03, 2022, 10:32:31 am by Marco »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 17201
  • Country: us
  • DavidH
Re: Acoustic level sensing in a pipe
« Reply #29 on: May 03, 2022, 02:55:06 pm »
The acoustic thermometer circuit shown on page 5 of Linear Technology application note 7 gives some idea of the circuit requirements and waveforms for an ultrasonic transducer.  In the example it is used to measure temperature but it would also work for distance.

Could you measure the air pressure at the top of an air filled tube.

At a very rough guess the air pressure reading at +2m of water would be low by around 20%, because of the air compressing and allowing water into the bottom end of the tube.

Or measure the buoyancy force of a sealed tube or float.
« Last Edit: May 03, 2022, 03:02:44 pm by David Hess »
 

Offline MarkL

  • Supporter
  • ****
  • Posts: 2220
  • Country: us
Re: Acoustic level sensing in a pipe
« Reply #30 on: May 04, 2022, 06:06:31 pm »
Another possibility is to sense the capacitance of the water level with two plates.  This is used in some RV water tank sensors.  The usual method is to attach two metal strips to the outside of a plastic tank and measure the capacitance between them.

But in your case of a cistern, this company makes a PVC pipe that has the plates inside, along with a built-in capacitance to voltage converter:

  https://tankedge.com/accessories.html#pvc

The pipes are custom made to the length you need up to 50" (1.2m) and you would mount the pipe to dip into the cistern to the bottom.

You can use the pipe sensor with their display panel, or supply the sensor with 10V and read the output voltage with your own system.  The output voltage varies linearly with the sensed level.  You would use two or more known levels to calibrate the output voltage for your panel (or theirs).

I have their system on our RV tanks.  It works well.
 

Offline Ground_Loop

  • Frequent Contributor
  • **
  • Posts: 666
  • Country: us
Re: Acoustic level sensing in a pipe
« Reply #31 on: May 04, 2022, 10:03:24 pm »
Seems like it might be easy just to put an absolute pressure sensor at the bottom of the tank and have wires rise up to communicate the result to the transmitter or whatever locating the batteries either with the radio or the pressure sensor.

That's the idea I started with, actually. But I could not find an affordable, fully submersible pressure sensor which looked like it could be trusted for a few years. Any pointers appreciated! (The relevant pressure range is 0.1 bar per meter of water level, plus 1 bar for the atmosphere of course. So 1.0 to 1.2 bar in my application, with a desired resolution of 1 to a couple of mbar.)

It might be even easier to stick a load cell under the whole tank and measure the weight of the thing.

Resonance might be interesting... if you can find a suitable transducer or speaker you might just be able to generate a sweep or chirp, then look for a notch in the drive current? That would save messing about with tx/rx.

It's an underground concrete cistern, so weighing it is unfortunately not an option. (It has been in the ground for 50 years and I don't feel like digging it up...)

The resonance measurement you describe is exactly what I had in mind. I did an off-the-cuff experiment today with a small 8 Ohm speaker and series resistor, sweep generator and oscilloscope, and various lengths of 40 mm PVC pipe with a blocked end. That did not look promising unfortunately; no significant resonance peak or dip.

A pressure sensor doesn't need to be submersible.  A pressure sensor at the top of a sealed pipe in place of what you have shown above would produce the same results.  Although you may need to occasional verify the pipe is not filling with water.

1478440-0
« Last Edit: May 04, 2022, 10:17:45 pm by Ground_Loop »
There's no point getting old if you don't have stories.
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7074
  • Country: de
Re: Acoustic level sensing in a pipe
« Reply #32 on: May 05, 2022, 05:41:47 am »
[A pressure sensor doesn't need to be submersible.  A pressure sensor at the top of a sealed pipe in place of what you have shown above would produce the same results.  Although you may need to occasional verify the pipe is not filling with water.

Thanks, that's actually what I will build -- the pressure sensor just arrived in the mail. This thread is getting to a length where it's difficult to keep track of all possibilities that have been considered. The pressure sensor on top of a pipe is discussed in replies #9 to #15.
 

Offline PaulAm

  • Frequent Contributor
  • **
  • Posts: 939
  • Country: us
Re: Acoustic level sensing in a pipe
« Reply #33 on: May 05, 2022, 03:46:47 pm »
This thread got me to look into something to check out the salt level in the water softener tank and I ran across the VL53L0X which is an infrared laser TOF sensor.  It's I2C with readout in mm, maybe good to 2m or so and looks like it also works with liquid levels.  You can get them on breakout boards for a few USD out of China.

These look remarkably useful.
 
The following users thanked this post: ebastler

Offline exmadscientist

  • Frequent Contributor
  • **
  • Posts: 404
  • Country: us
  • Technically A Professional
Re: Acoustic level sensing in a pipe
« Reply #34 on: May 05, 2022, 04:31:11 pm »
This thread got me to look into something to check out the salt level in the water softener tank and I ran across the VL53L0X which is an infrared laser TOF sensor.  It's I2C with readout in mm, maybe good to 2m or so and looks like it also works with liquid levels.
Note that if you want to do laser level sensing in a tank, and the tank liquid is at all choppy, you'll probably need a float in a tube to provide a stable surface to range off of. This gets more important the more accuracy you need and less important the less bandwidth you need.
 

Offline BillyD

  • Regular Contributor
  • *
  • Posts: 218
  • Country: ie
Re: Acoustic level sensing in a pipe
« Reply #35 on: May 05, 2022, 05:05:48 pm »
Thank you all -- three very helpful suggestions, covering different flavors of a possible implementation.

I will at least try one of the cheap ultrasound distance sensors, either in free space or in a tube, because it would be such a simple, low-cost solution. Am concerned about the longevity of the sensors though, they will probably corrode quickly. Leo's "sound in a pipe" design is very close to what I have in mind, and the use of a cheap but waterproof speaker and microphone is neat.

And then there is, of course, the option of using a decent ultrasound transducer right away. I am reluctant to spend the > $100, but that might well be where I end up anyway, if not now, then two years from now when my homebrew solutions have failed for the third time...

Maxbotix look like a good choice, and I have found a distributor in Germany. I will ping them for advice regarding measurement in the presence of obstructions, and also how to deal with condensation. (I came to realize that in cold weather, when the sensor is colder than the water below, I should probably expect condensation right on the sensor.)

I used one of those cheap ultrasonic transducers to measure the level in a heating oil tank. It worked ok but, as you mention, longevity was a problem. I used up 3 or 4 of them with none lasting longer than a few months.
I have since replaced it with a VL53L0X Laser Time of Flight sensor and so far it has been working fine for a little over a year. My one needs to cover a range of about 7cm to 140cm and the only real problem I've had is that as the distance increases, the accuracy degrades. For example the distance reading will flunctuate quickly between 120cm to 130cm. It may be due to the of reflectivity of the kerosene, and also I've never gotten around to tuning the parameters of the laser. It seems to be a bit worse at lower temperatures. I've worked around it by taking an average of readings which suffices for my needs.

 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7074
  • Country: de
Re: Acoustic level sensing in a pipe
« Reply #36 on: May 05, 2022, 06:02:05 pm »
That VL53L0X sensor looks amazing! Laser, optics, and TOF detector all integrated in a 4*2*1 mm³ package, less than $5, 50000 in stock at Mouser.

The 2 meter range may be a bit marginal in my application, but I will get this thing anyway and come up with an excuse to use it.  8)
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2251
  • Country: 00
Re: Acoustic level sensing in a pipe
« Reply #37 on: May 05, 2022, 07:45:19 pm »
"The VL53L0X can detect the "time of flight", or how long the light has taken to bounce back to the sensor."

must have one too
 

Online ebastlerTopic starter

  • Super Contributor
  • ***
  • Posts: 7074
  • Country: de
Re: Acoustic level sensing in a pipe
« Reply #38 on: May 05, 2022, 09:33:27 pm »
will it work in a narrow pipe given the beam divergence?
transparency of water?

Maybe I did not express myself well, I don't plan to use the time-of-flight sensor for the water level measurement, but will find some other use for it. It's just too cool a toy to miss out on...

The 2 m maximum sensing distance is specified for a white reflecting surface. It is reduced to 0.8 m for gray surfaces, hence most likely well below 2 m for a water surface too. The effect of a tube would probably depend heavily on the wall's optical properties. The sensor's field of view is 25 degrees, narrower than most ultrasound sensors.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11771
  • Country: us
    • Personal site
Re: Acoustic level sensing in a pipe
« Reply #39 on: June 08, 2022, 02:12:10 am »
I've added a couple of VL53L0X to my recent Mouser order and was excited to try them, but as it turns out there is no documentation of the registers. You are supposed to use their API library that you can download only after accepting the EULA. I did not bother and I have no idea if there is some closed source stuff or what. I don't really care that much to deal with inevitably incompetent software.
Alex
 

Offline PaulAm

  • Frequent Contributor
  • **
  • Posts: 939
  • Country: us
Re: Acoustic level sensing in a pipe
« Reply #40 on: June 08, 2022, 02:19:15 am »
There are a couple of Arduino libraries for the VL53L0X that do not use the API.  There are some limitations, but looking at the code may prove helpful.
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11771
  • Country: us
    • Personal site
Re: Acoustic level sensing in a pipe
« Reply #41 on: June 08, 2022, 02:26:49 am »
I'm sure it is possible to figure it out, I just don't want to waste time on this. There is no fun in digging through random code when there is no documentation.
Alex
 

Offline metrologist

  • Super Contributor
  • ***
  • Posts: 2251
  • Country: 00
Re: Acoustic level sensing in a pipe
« Reply #42 on: June 08, 2022, 04:00:55 am »
I bought a pack of these TOF sensor modules. I must be an ogre because I just used whatever Arduino code I found. They work, but the beam width is problematic for me. I don't have an application for them.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf