Fail Of The Week: Sonar Submersibility Sealing

For the last decade or so, [Jason] has wanted to build an underwater robot. Can you blame him? More recently, he’s been researching sonar sensing and experimenting with the relatively inexpensive HC-SR04 module. Since he had good luck getting it to work with a PC sound card and a Stellaris Launchpad, he figured it was time to try using it underwater.

Hydrophone research led him to the idea of submerging the sensor in mineral water oil to both seal it and couple it with the water. Unfortunately, the HC-SR04 only sends one pulse and waits for echo. Through the air, it reliably and repeatedly returned a small value. Once inside a pill bottle filled with mineral oil, though, it does something pretty strange: it fluctuates between sending back a very small value and an enormous value. This behavior has him stumped, so he’s going to go back to the Launchpad unless you can help him figure out what’s going on. Should he use a different method to seal it?


2013-09-05-Hackaday-Fail-tips-tileFail of the Week is a Hackaday column which runs every Thursday. Help keep the fun rolling by writing about your past failures and sending us a link to the story — or sending in links to fail write ups you find in your Internet travels.

45 thoughts on “Fail Of The Week: Sonar Submersibility Sealing

  1. You might have a problem with impedance matching http://en.wikipedia.org/wiki/Acoustic_impedance
    of the oil, the container and the water so the sound is returning from one of the interfaces. If you can’t find a good impedance match you could change the blanking time and only look for returns after your container has stopped resonating? Can you look at the raw return from a single pulse and measure the ring down time? Oil is used as a hydrophobic seal in underwater connections so the idea is not wrongheaded but you might need to change your particular oil choice.

  2. I think you mean he sealed it in mineral oil not mineral water.
    Could the problem be a reflection from the side of the pill bottle? Maybe putting it into a balloon would be better.

  3. The enclosure is causing early returns to the device. Since its working range is 2-400cm if the end of the pill bottle is closer than that he will get return values less than 2cm, which is causing the conversion algorithm to give nonsense answers. Even if the end of the bottle is more than 2cm away the sides of the container are much closer and the density differences between the bottle, the oil, and the water are causing reflections.
    A hemispherical housing may solve this problem of erroneous readings, though you’ll still have to filter out reflections due to the impedance mismatch of the interfaces.

    Another possibility could be the sealed nature of the vessel is preventing the emitter from functioning properly. I’m not terribly confident in this explanation though.

  4. I think he is probably measuring distance from the sensor to the bottle wall. Probably too small for that sensor to begin with, and once you throw in the increased speed of sound in liquid it is way too short a timescale for that sensor. Just a hypothesis.

  5. Probably the “refraction” of the sound waves when they change medium. This is similar to how guided wave level sensors work, just replace dielectric constant with speed of sound.

  6. The main difficulty here is how to efficiently couple the sound to the water. I think he should try it with one of the waterproof parking sensor variants, for example
    http://www.alibaba.com/product-detail/ultrasonic-sensor-ultrasound-transducer-parking-sensor_233118579.html
    Farnell.com (newark) and others have similar waterproof variants. Just make sure you get the frequency correct, or it will not work at all. The front of the sensor should contact the water and the seal around the edges needs to be soft. O-rings maybe?

  7. UAVs (Underwater Autonomous Vehicles) use sonar transducers that are coupled either directly to the ‘face’ of the sensor or are ‘free flooded’ outside the pressure box. Mineral Oil is used as a pressure management filler, not as a buffer medium. Good idea, and good proof-of-concept, just a slightly off implementation. If he was to change his sensors from free-air (speaker/microphone) to sealed transducers, he’d have much better luck.

  8. I’m not sure ultrasonic transducers would work that well underwater. The energy required to push a wave through a liquid would be a lot greater than what is required to push it through the atmosphere.

  9. Im sure when i used hydrophones with rovs in the 90’s the hydrophone had a rubber coating ( it was lowered from the bottom of the ship to listen for the ping from the rov it was also scanning so as to pick up direction, You could try asking someone currently in the rov industry how it’s done, but the balloon suggestion sounded good.

  10. Mineral oil has a much different density than air OR water. And it can change with pressue and temperature – good luck with that lookup table…

    These sensors were designed to work in AIR – not water or mineral oil while in a closed vessel.

    You would think that the oil would couple sensor to the pill bottle in a way, and it probably does, but all of it conspires to throw the calibration of the sensors off, since they were designed to work in AIR… not water or oil.

    Without recalibrating the actual firmware running on the MCU on the HC-SR04 itself, or designing the whole thing from scratch to work in water, I’m afraid there is little else to do with the HC-SR04s.

    You can get ultrasound TX/RXs without the supporting circuitry, maybe you could copy the rest of the circuit and then roll your own firmware based on rest of your setup? Or hack into the MCU on the sensor, I’m sure its a PIC or AVR and steal whats there and work from that?

    Most ultrasonic sensors that I know of, even if they are sealed for use around liquids, are designed to hover above said liquids and measure the distance from a known point, i.e. the face of the sensor to the surface of the liquid. Not to be submerged and measure the other way around!

    1. Doh, I just thought of something, They do make “depth sounders” for boats! you can buy through various vendors, depth meters for small fishing / bass boats that work this way, I’d go that route!

    2. Not to sound like an ass but what would lead you to the conclusion that there would be an AVR or PIC in there? I take apart a bunch of crap and the existence of either is about equal to an internalized 8502, ARM, or some obscure architecture no one really cares about like that newish eZ80 based microcontroller.

      1. You do sound like an uninformed one however, and you must actually be taking apart crap, as you say. There are all kinds of devices that have micro-controllers and/ or DSPs in their guts, even when a higher level controller or processor is involved, handling IO, communications, etc. Atmel and Microchip are certainly not “obscure” manufacturers in the embedded world, though there are certainly many others: TI, Altera, Silicon Labs, Renesas, Analog Devices, Cypress, FreeScale…. look them up, and then take apart some current industrial electronics. If you mean an 8051 code compatible micro, and not “8502” there are all kinds of those around as well. Of course there will be some microcontroller or DSP inside an ultrasonic sensor, unless it is a sensory only, and the signal processing and power are external to it.

  11. The mineral oil will also dampen the vibrations of the emitter and receiver due to being about 650 times more dense than air.

    Mineral oil density 0.8 g/cm^3
    air density 0.001225 g/cm^3

    So if the same energy is being put into the system, the amplitude of the vibration at the emitter will be attenuated and the same will occur at the sensor, a much attenuated vibration will be received. Noise will probably swamp out the signal of interest.

  12. there is an impedance discontinuity at the oil/air or oil/water interface, and he’s getting an echo from this – the software in the transducer setup needs to be programmed to ignore echos that occur [the very short distance ones] from this echo.

  13. What it sounds like is the second big pulse is the sound wave “ringing” inside the pill bottle. When inspecting platforms to see if the legs have flooded (sign of corrosion or a bad well) we press an ultrasonic sensor up to the member and if it is flooded the water inside will carry the sound to the back wall and return. (http://www.oceanscan.net/gallery//New_Website_Images/EPOCH600_EN_201312_web1.jpg) What you are seeing on the screen of the instrument is the main bang where the instrument is sending, there is the measurement of how far the sound traveled (far wall and back), and the second big peak is the return of the signal. You can test this if you can keep your transducer from pinging and only listen after the main pulse. You should see the big ping that you are getting, and then porpotionally smaller pings based on the size of the pill bottle. This is the sound wave bounceing back and forth between the walls.

    I think that what you are doing is the right idea, but you have to couple the transducer to the wall of the pill bottle so that it does not return the sound.

  14. You can try this approach: crack open the sensor and stick the piezo elements with hard epoxy glue to the plate of a metallic can which you’ll submerge in water.

    I have been working and reverse engineering this chinese thing, which works by measuring the level in a metal tank, by attaching the ultrasonic sensor on the enclosure with epoxy. Even that thing, was not always easy to get it working. In my opinion the problem is the coupling between the sensor and the water, as many already pointed out. There’s really a lot of complex math involved…
    Here’s the link, don’t blame I don’t want to sell it :)
    http://hurricane.gmc.globalmarket.com/products/details/ultrasonic-tank-level-monitor-fuel-tank-level-sensor-520620.html

  15. Dude, you’d get better more reliable results with a cheap camera and laser pointer, you could even encapsule it on a turret and measure distances to different objectives. Not only that but it would look uber-cool and scare the crap out of the local fauna!

  16. Once he gets to separating the emitter from the receiver he will still need to skip the oil immersion idea. The water will seep in unless well-chosen o-rings or a chemical weld is used, due to the high-frequency stress that that the emitter produces.

    Waves don’t like moving from one medium to another, either…

    The good news is that you can get inexpensive, submersible ultrasonic transducers from aliexpress.

  17. Transducers in the boating industry often shoot “through the hull” as long as the hull is “solid” fiberglass (no core). The transducer is fastened directly to the inside of the hull with epoxy, or an open bottom container is sealed to the hull and the transducer is coupled by filling the space with liquid. Used to be we used mineral oil, nowdays it is usually propylene glycol.

    Airmar makes most of the transducers used in marine depth sounders, and fish finders.

    1. In the same vein, it’s important to check what frequency the transducer is transmitting at. Chances are that those small ultrasonic rangefinders designed for in-air use have frequencies far too high and are too low power for reliable underwater use (attenuation increases with frequency). For any decent underwater range, 12kHz is common. (we use a ~2kW@12kHz + ~10kW@3.5kHz system for full ocean depth + sub-bottom penetration, but that may be slightly overkill for your application)

    2. Glycol would probably be a closer match for water than mineral oil is, but this will help ONLY if the only problem is the acoustic impedance between the oil and water. I think another thing to consider is that piezos used for ultrasonic transducers are sized to make them resonant near the frequency where they’re used, and submersing the piezos in ANY liquid will change their resonant frequencies. The easy way around this is to use transducers designed to operate in water.

  18. I don’t know how these modules work inside, but would guess that it is related to AGC (automatic gain control) or automated time gating to explain the long/short/long/short pattern.

    The first pulse after silence will be when the AGC gain is at its peak, so an early reflection will be detected. That detected signal will reduce the gain, so the next early reflection will not be detected. After that period, the AGC may have recovered to high gain before the next pulse is sent.

    Try sending at a different PRF (pulse repetition frequency) and see if that changes the pattern of long/short, just giving the AGC time to recover and any reflections time to die down.

    You should be able to get a few metres range underwater at 40kHz, as long as the water isn’t too noisy from other sources (natural or man-made).

  19. Rubber is more acoustically transparent than hard plastic so something like a rubber tube or section of rubber garden hose might be more durable. Or you could go spherical, (and omnidirectional) and use a basketball, or even a small toy basketball. Or cut up a small bald tire into a spherical shape. (cut v-notches along the bead)
    Some professional (Navy) passive sonar detectors (tails) use rubber tubes with the sensors and mineral oil inside. They are designed for relatively deep water, so they are fabric reinforced rubber, or perhaps more like rubber impregnated fabric. But those modules only detect from the side, not the ends, since the ends connect serially to other modules.
    Many active sonar systems use a rubber dome for transmitting and receiving, so rubber is definitely a good material for both transmitting and receiving. Of course, most sonar transmitter domes don’t use mineral oil to transmit, not that I have heard anyway. Usually it was fresh water. There is that to consider. I don’t know how well it transmits in mineral oil. Perhaps use separate modules.
    Thick, or stiff reinforced rubber, or rubber impregnated fabric is the way to go if you can.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.