Shop OBEX P1 Docs P2 Docs Learn Events
Waterproofing an ultrasonic range finder — Parallax Forums

Waterproofing an ultrasonic range finder

Jim McCorisonJim McCorison Posts: 359
edited 2005-01-28 00:19 in General Discussion
I want to experiment with using ultrasonic range finders for measuring tank levels. Since this will be on a boat, and boats move, it is most likely that the sensor mounting location will be splashed by the contents of the tank. Does anybody know if an ultrasonic range finder can be waterproofed without affecting its accuracy?

I'm looking at the Devantech SRF04, sold by Parallax at www.parallax.com/detail.asp?product_id=28015 as one possibility.

An alternative would be SensComp's Piezo Transducers, such as www.senscomp.com/specs/40KPT25%20%20spec.pdf, which is sealed and claims to be for "environmentally rugged" applications.

The plus of the SRF04 is that everything is handled on the device itself. Where as SensComp's unit is just the transducer so I'd have to develop the driver and sensing circuits. Although, since the target application is not a very processing intensive one, it might be possible to handle it on the processor. I don't think a stamp would be fast enough, but would an SX? A timing diagram for the SRF04 (www.robot-electronics.co.uk/htm/srf04tech.htm) shows that the time between pulsing the transducers and receiving the return pulse is as short as 100us.

Thoughts?

Thanks,
Jim

Comments

  • MatthewMatthew Posts: 200
    edited 2005-01-26 21:31
    Jim,

    Do a quick search on Google for MIR. I think it stands for Micro Impulse Radar. From the research I've done in the past, it seems like they were used to measure the amount of liquid in a tank.

    Hope that helps.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-26 22:00
    MIRs were discussed before in this forum, the general consensus is that it was a proof of concept that never saw application outside the military sector. There is considerable debate over patent rights and securing right to use both over intellectual property and with the FCC. Here's a site that discusses the issues: http://www.house.gov/science_democrats/archive/mirrpt99.htm·in a nutshell, the inventer Tom McEwan will liscence you the technology but you can't get FCC approval for any devices which use it.

    Paul

    Jim, the only thing I can think of, is a unit rated for water immersion, perhaps you could adapt an old depth finder unit.

    Post Edited (Paul Baker) : 1/26/2005 10:07:27 PM GMT
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-26 22:51
    Let's see... involvement with patents, intellectual property rights, FCC approval... definitely outside my budget or desire. smile.gif

    Paul, thanks for the thought on a depth sounder transducer, but it would be much too big. I also don't believe that it would provide the minimum distant that I would need. Part of the problem is that I need something that has an accurate range of 1-2 inches at the closest, out to 4-5 feet.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-26 23:06
    Whats the fluid your measuring, fresh water, salt water, gasoline?
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-26 23:48
    That and the holding tank, think sewage tank. Probably working on the holding tank implementation first as that is where the non-contact measuring ability is the most beneficial. Float switches and other types of probes tend to get fouled with... well, the particulate matter one finds in such a place. Other types of continuity probes have problems with the rather corrosive nature of what is in the tank. Look at the paint finish on the divider wall between urinals in an older bathroom sometime.

    Gosh, I hope nobody just finished eating.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-26 23:58
    Gotcha, hmm well if direct contact with a sensor is no-go, how about an indirect means, Im thinking two strips of metal coated in latex or someother corrosion resistant covering, stacked with a fixed amount of space between them and wrapped in fine mesh or a layer of sponge like material sandwiched between them, helping kept all but fluid traveling between them, Betcha the dialectric coefficient for the fluid is different than air. And devise a method of measuring the resulting capacitance. BTW, if your ultrasonic sensor gets appropriately (or inappropriately as the case may be) sloshed it may be interered with as well.
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-27 03:21
    Does the sensor have to be emmersed?

    Hang it above it and have it measure down to the fluid surface?!

    Ultrasonic would work for sure....but wouldn't if you mounted it behind plexiglass...however, a couple of nicely drilled holes with some caulking around the backsides to hold it would work....but does IR reflect off water surfaces?

    Of course, as it sloshes your readings would be erratic.

    Do you need to know Full and Empty and Half-full (or half empty for you pessimists!)?· Just build a float sensor and triggers at those levels.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-27 17:04
    Steve,

    The sensor won't be immersed, but will be close, within a couple inches, to the liquid surface of a full tank, thus the concern of sloshing. The target app is a holding tank which is what holds sewage on a boat. Read my post above regarding why simple floats won't work. Floats and various contact sensors have been around for years. And for years people who have to open up the tanks and clean the floats or sensors have cursed them.

    Jim
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-27 17:31
    Here's a thought Jim, Does it have to be ultrasonic? After all it will be in an enclosed space. I know there is weatherproof speakers out there, and there's probably weather proof mics as well. Or you can use the speaker as a microphone too, many times intercoms use the speaker as the microphone too, the sound quality of the speaker used as a microphone isn't going to be great, but your just using it for signal puposes, not recording a symphony. If you use an all-weather tweeter and chirp a higher frequency (the exacty frequency should be at the resonant frequency of the tweeter to maximize its effectiveness as a microphone) you probably wouldn't hear it outside the tank. You could probably also use a mid range if you keep the volume down somewhat.

    If you try to implement this idea, I would purchase a cheap (not all-weather) speaker for your proof of concept and try it in a partially filled aquarium or something.

    Also you might try to have it do a periodic (like one a day) self cleaning process, where you drive it hard at its resonant frequency for a period of time, hopefully this would shake loose any accumulated debris on it's element. And if you found this cleaning process to be audible outside the tank, and you wanted to be totally geeky, you could iterface it with your alarm clock to do it when you should be waking up [noparse]:)[/noparse].

    Paul
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-27 17:43
    Paul said...
    you could iterface it with your alarm clock to do it when you should be waking up [noparse]:)[/noparse].

    smile.gif But true cruisers don't have alarm clocks.

    I was thinking of utlrasonic for two reasons, one being the fact that it is inaudible. In our case the holding tank is directly under our bunk and is made of plastic. The other being size. I need to keep the entire sensor module to about 2" in diameter max. If I can get it really small, like mounted in a tube < 1/2" diamter and a couple inches long, I might be able to solve some other issues with tank measurement not related to this initial effort. SensComp makes a 40kHz transducer that's only 9.1mm in diameter and 4.5mm high. The problem is that according to SensComp it can't be used for ranges under 6" because of ringing, a problem I confess to knowing nothing about. I always thought ringing was what you did with a bell.

    Jim

    Post Edited (Jim McCorison) : 1/27/2005 6:14:43 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-27 17:54
    ok, how's this then, mount the transducer in a tube, mate the element with a plastic film covering the opening (probably not directly to the film, there would be an airtight chamber so that when the transducer element moved the film would move), if the film is thin enough it should vibrate at the utrasonic frequency, there would be attenuation of the signal (mainly due to the compressability of air), but if you follow the principles of enclosed speaker design its should be manageable, or you could pressurize the chamber to reduce the air's compression loss factor, but don't overdo it because you will recude the elements ability to move due to the pressure differential between the chamer and the air behind the element. This would require experimentation, and you may go through a few transducers in the process, but its the only way I think you can meet all your criteria without finding a transducer that isn't already waterproof.
  • David BDavid B Posts: 591
    edited 2005-01-27 18:15
    Two more ideas, although I don't know how practical either might be. Weigh the tank - mount some strain gauges on the tank mounts and figure the weight of the full vs. empty tank. Or put a sealed pressure sensor at the bottom of the tank; as the tank fills the pressure at the bottom increases.
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-27 18:17
    That's an interesting idea. As you point out, it would take some experimentation with membranes. Got to compromise between thin enough to reduce attenuation, but thick enough so that installer's fingers, or strong liquid sloshes don't damage it. Thanks.
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-27 18:27
    If you're worried about float switches being fouled...then any membrane has the same risks!· Any contamination on the membrane changes it's frequency.

    how big is the tank?· how tall is the vertical column of water?!· You could drop a sealed pipe down in to the tank.· The pressure in the this pipe would increase the further you put it in (being that the pipe is longer than the vertical column)....so you could then connect a regular pressure sensor to this 'AIR' pipe and determine how much fluid you have in the tank.

    It's akin to putting your thumb on one end of a straw and pushing the other end in to your milk.· The milk can't displace the air because your thumb is covering it's vent.....so the pressure increases.· Now take your thumb off the straw and the milk shoots up the straw.

    I don't know the formula's you'd need to figure this out so i don't know how much water you'd have to displace to get enough pressure to be readable.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • steve_bsteve_b Posts: 1,563
    edited 2005-01-27 18:31
    Further to my previous post....

    We've used balloons (and condoms on occasion) to make instrument boxes weathertight.· The cycling of heat (day/night) causes a 'pumping' action wrt pressure in the box and usually what would happen is the box would slowly fill with moisture.· By drilling a hole in the box and attaching a balloon....the ballon would make the adjustments for the extra pressure and the boxes seals wouldn't be compromised....

    Long rambling story....

    But, similar to what you want....if you can't get enough displacement to measure pressure, then maybe putting a balloon on the end of the pipe and measuring that somehow (opto's/flex-sensor/ir distance/etc..) then that might give an idea on tank state.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·

    Steve
    http://members.rogers.com/steve.brady
    "Inside each and every one of us is our one, true authentic swing. Something we was born with. Something that's ours and ours alone. Something that can't be learned... something that's got to be remembered."
  • Paul BakerPaul Baker Posts: 6,351
    edited 2005-01-27 18:37
    Heres some links (your milage may vary):

    http://www.celeritous.com/estore/index.php?main_page=product_info&cPath=1&products_id=5

    http://www.globalw.com/products/wl700.html

    http://www.pulsonictechnologies.com/products/transducers.htm

    The above link is specially designed for waste water level measurement! Still they can only effectively measure distances greater than 25cm.

    http://www.masterlevel.com/transducer.html

    I think measuring things as close as you want may be impossible for ultrasonic, or so difficult you'll find the sensor very expensive. This is because at 76 F, the speed of sound is 1136 ft/s, if your measuring a level of 2" from sensor, means a total travel time (for 4") of just under·300 uS, if the transducer is operating at 40kHz·one pulse cycle will take 25 uS, and most sensors require a ramp-up and ramp-down·with several pulses (this looks like a 40kHz signal who's amplitude is dictated by another sinusoid of a lower frequency) since the element is mechanical, after driving it it will continue to ring afterwards in decreasing amplitude, just like striking a bell. If you try to detect a reflection signal during that ringing (ie object is very short distance away) it will register the ringing as part of the signal. There are two possible methods of combating this, ringing cancelation and phase cancelation.

    Ringing cancelation involves driving the transducer, then when you what it to stop, applying a signal with a phase of 180 degrees of the signal pulse while also diminishing the amplitude of the 180 degree pulse to match the damped respose of the element, this is equivalent to placing your hand on a ringing bell, the sound is muffled but not entirely muted. This is the principle used in Bose's noise canceling headphones, they drive the headphone with a signal whose phase is 180 degrees out of phase with external noise.

    Phase·cancelation is taking the measurement ringing and all, and post processing the signal by subtracting the known ringing response of the transducer from the signal, the result should recover enough of the reflected signal to detect its presence.

    Each has thier own benifit and downside, each of which would require quite a few paragraphs to explain and would require sojouning into DSP theory.

    Paul



    Actually phase cancelation is the wrong term, its ringing cancelation too just done in post processing, I was going to write about phase detection where you try to detect any signal out of phase with the ringing by using correlation, but if the distance happens to reflect a signal thats in phase, this method won't work.

    Post Edited (Paul Baker) : 1/27/2005 7:03:31 PM GMT
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2005-01-27 19:16
    We did an application for a tank one time that needed to be filled with water.· The large plastic tank was mounted on a flatbed truck for water delivery.· The filling system was automated since it came from a well.· So there were sensors to detect when the well was full/empty to continue or stop filling the truck.· On the tank we installed 2 small probes at each end of the tank at the full-line.· When the water reached the 2 probes, which were mounted 2" apart at the same level, the tank would be considered full.· To account for sloshing and uneven parking of the truck under other circumstances the controllers was programmed to sense when both sets of probes made contact for 2 seconds continuous seconds.

    I don't know what your holding tank is made of, or if you would even want to drill it to install contact probes into the tank, but it's a free idea nonetheless.

    idea.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage

    Knight Designs
    324 West Main Street
    P.O. Box 97
    Montour Falls, NY 14865
    (607) 535-6777

    Business Page:·· http://www.knightdesigns.com
    Personal Page:··· http://www.lightlink.com/dream/chris
    Designs Page:··· http://www.lightlink.com/dream/designs
    ·
  • pjvpjv Posts: 1,903
    edited 2005-01-27 19:47
    Hello Jim;

    I have been following all these suggestions, and have a novel approach for you. It may not be quite as cost effective as some of the suggestions (as floats etc) but I'm positive it will give you the best and most reliable answer for reading the level in a sloshing tank that you dont want to get into very often.

    The concept is deceptively simple; and simplicity is often a good candidate.

    Get a piece of three eights or half inch or so of·plastic tubing or somewat rigid hose a little longer than the depth of your tank.
    Attach this to the side of the tank·(leave a quarter or so inch of clearance·between the pipe and the bottom of your tank) and have it extend out through the top of the tank.
    Then seal that to make it water tight.
    Get a tiny air compressor such as might be used for an aquarium, but sufficient pressure capability.
    Connect a "TEE" at the top of the pipe, and attach the compressor output to one side.
    Connect a low cost pressure transducer to the other side of the "TEE".
    To take a level reading, turn on the compressor, and read the pressure.
    Air will bubble out the bottom of the tube, and the air pressure it needs to do that is directly proportional to the height of fluid outside the tube.
    That is of course only if the tank is vented·and there is no other pressure in the tank.

    Do some software averaging of the air pressure (level) if there is a lot of sloshing.

    You could even place the compressor and pressure sensor (and hence the "TEE") at a location more distant from the tank by a lenghth of connecting hose, provided that it always remains above the tank....... you would not accidentally want to create a siphon!

    Very simple, no moving parts, all working pieces accessible from outside the tank, easy to calibrate before installation etc.

    Should be a fun project.

    Peter




    ·
  • pjvpjv Posts: 1,903
    edited 2005-01-27 20:05
    Hello Again Jim;

    As an afterthought; presuming you did not need to take a reading very often, or at least for a trial, you could even eliminate the air compressor and blow into the hose. Although it would be somewhat more complicated software to do your averaging.

    Peter
  • Jim McCorisonJim McCorison Posts: 359
    edited 2005-01-27 20:24
    Thanks for all the thinking. It is a diverse crowd here. I'll try to address some of these thoughts:

    Peter, Good thinking. There is actually a marine product out there that uses this method on an analog basis. It is well respected.

    Paul, Thanks for the explanation of ringing. It makes good sense. As far as range, the SRF04 claims 2cm - 3m (0.78" - 118") and is only priced at $36.00 through Parallax. Daventech also makes a much smaller sensor with 2cm - 6m for 25.50 pounds sterling. This is what got me headed down the waterproofing path. In an email to Daventech they said they don't have a method for waterproofing, but are regularly requested to do so. The email hinted that a product will be forthcoming, but nothing about when.

    Mary, Where is Mary anyway? This is the second thread where she's been appropriate. smile.gif

    Chris, Sloshing is mostly only an issue for protection of the sensor. I don't really need instant level readings. So averaged, or smoothed would be find. But I do need more than a full indication. The last thing you want is to be caught with a full holding tank, no place to pump out, and a strong need to use the holding tank. So I'd really like to use a variable reading.

    Jim
  • MacGeek117MacGeek117 Posts: 747
    edited 2005-01-28 00:19
    Jim, mount the sensor in a tube, but leave the bottum open. You shouldn't get as much
    sloshing around.
    bugg

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    So many projects, so little time.
Sign In or Register to comment.