Ultrasonic hc-sr04

How I can make hc-sr04 sensor more sensitive ?!
From the datasheet they said this sensor can measure distance for 4M, but when I test it it's only 3M!
Is that from my code?!
other thing is that possible to make it measure the distance for 15M ?!

Hi,
The range of the sensor will depend on object size and the material it is made of.
Both effect the acoustic reflectivity (if there is such a thing) of the object and hence the strength of the returned echo.
The weaker the echo, the lower the chances of detecting it.

Also try making your sample intervals a little longer, without your sketch I don't know how often you are pinging, but you may be triggering before an echo from the target has arrived from the previous ping.

Tom..... :slight_smile:
(Give me a ping, Vasili. One ping only, please....Hunt For Red October)

Thanks Tom for your information :slight_smile:
I am trying to measure wells, so the object is not small, If i changed the librarry is that will help ?
the sensor must measure distance for 15-20M

The power of the reflected wave at 15-20m is probably too small to be sensed by the receiver.

Weedpharma

narzan:
From the datasheet they said this sensor can measure distance for 4M,

narzan:
the sensor must measure distance for 15-20M

I think you will need a sensor that costs more than $2.
Are you trying to measure the level of water in a well? Perhaps you could use a tube and a pressure sensor.

You could try putting a plastic drinking cup over each sensor. Make a hole in the bottom of the cup. You might have to seprate them to make it physically fit, that is remove one sensor from the board and solder extension wires on it. However that sort of distance is a big ask.

@johnwasser

I think you will need a sensor that costs more than $2.
Are you trying to measure the level of water in a well? Perhaps you could use a tube and a pressure sensor.

That's will work perfectly but hard to install, I want something very simple, I read some research about water level measuring for long ranges, after 10M they use radio waves, But I still believe ultrasonic can work perfectly if there is a good programing filter for echo, but first I must change or customize the trigger.

I have 2 ideas now like what Grumpy_Mike said to customize the trigger, or use the normal sound waves 20Hz to 20KHz,


but the weirdest thing about this sensor from the data-sheet they said it's work on 40Hz !!!! that's not Ultrasonic frequency!
and I can hear the trigger clearly!!
at the end they said "The Module automatically sends eight 40 kHz" but why I can hear the trigger!! I don't have super power, my friend hear it too!!

narzan:
but the weirdest thing about this sensor from the data-sheet they said it's work on 40Hz !!!! that's not Ultrasonic frequency!
and I can hear the trigger clearly!!
at the end they said "The Module automatically sends eight 40 kHz" but why I can hear the trigger!! I don't have super power, my friend hear it too!!

The pulse frequency sent out is 40 kHz.

But what you hear with your ears when you send out the pulses is not the pulses itself.
What you hear is a resonance frequency from a material (sensor casing?) that is stimulated to oscillation in its own resonant frequency while it is stimulated by the pulses.

Think of knocking on a door: You do 8 knocks on a door, one knock per second. That is a stimulating frequency of 1 Hz, much below the audible frequency. Why can you hear the knocking? That's because the door surface is vibrating in its own resonance frequency after beeing stimulated from the knocking, and that resonance frequency is in the audible range. So the frequency you hear is different when knocking in a 1 Hz frequency on a door, or maybe knocking in a 1 Hz frequency with a knife on a drinking glass.

The same occurs with your ultrasonic sensor: While the pulses are sent, something (most likely the sensor casing) is stimulated to vibrations. But those vibrations do not occur with the stimulating frequency, but with the resonance frequency of the thing that is stimulated to vibrate.

Thanks I was confused :roll_eyes:

For 15m range, you have to remember that it's extremely difficult to direct sound; any sound "beam" is going to spread a lot over the 30m round-trip, potentially bouncing off other objects,

I think you blocked every door I have with this:

For 15m range, you have to remember that it's extremely difficult to direct sound

That's extremely true
I think I must change it with different technology like radio waves

I am working on this right now, I used only one leaser at first, but it's so difficult to measure the dot size, with two dots it's more easy by calculate the distance between dot's to know how much that surface is away from the sensor but I have a problems on water surface, If the water clear, water waves duplicate the leaser dots. so it's impossible.

I don't have any choice I must use radio waves.
Thanks everyone +1

Float the transmitting ultrasonic transducer on the surface of the water with a cable connecting it to your electronics at the top of the well. Hence measure the time it takes the sound to travel up the well.

I didn't think in that! That's will make the distance more short for not sensitive sensors!! Great idea you gives me a hint for other project, but wires all over the wells. And hard to install. Thanks @archibald , any ideas or hints on radio waves to use this technology?! I tried allot to be away from radio waves because I don't know anything about it.... Only know how they work

narzan:
I didn't think in that! That's will make the distance more short for not sensitive sensors!! Great idea you gives me a hint for other project, but wires all over the wells.

Normally you'd not measure the "air above the water" distance in such applications, but you'd measure the "water level" by using a hydrostatic pressure sensor.

Sensors such like described and offered here. I think there are several hundreds of manufacturers worldwide that fabricate hydrostatic pressure sensors for submersed operation, providing different output for different applications.

I once had a washing machine that had an over-fill device that measured water level by the air pressure above the water in the drum

by the air pressure above the water in the drum

it's work but it's hard, using "hydrostatic pressure sensor" inside the water seems more easy :slight_smile: Thanks AWOL
UPDATE
wait !!! $682.00 :fearful: hell no!! not good at all :sweat_smile:
and the radio wave technology $1,915.00!!
My whole device ultrasonic waterproof sensor 3.5m with auto pump 30$ :sweat_smile: