Replacing HC-SR04 transducers with waterproof ones

Hi all

I bought these transducers a while ago and never got around to test them.

So finally I got time.

Anyway I First only replaced 1 transducer with the above ones and it didnt seem to work really unless I hold the transducers facing each other about 2 cm apart then I get a correct reading otherwise I just get random ones and now and then a reading will show that is close but thats very rare

When I replaced both transducers It does the same but seems slightly worse.

Any reason for this?

Thanks
M…

The HC-SR04 ultrasonic modules available on ebay and everywhere else work perfectly. Post a schematic and your code.

Your question is totally meaningless without it.

I know they work perfectly, I have used them multiple times in different projects.

The ultrasonic sensor works fine with its stock transducers, there is a problem when I change to the waterproof transducers.(desoldering the stock transducers and soldering the new transducer on the HCSR04 pcb)

Does it matter which way round the transducers go, I noticed the stock transducers and the waterproof one both have a white circle around one of there pins?

As for the schematic, I can definitely say it is connected the right way, its just four wires you cant really go wrong there :)

Here is the code pretty much the same as the ide example:

const int pingPin = 7;
int RPin = 8;

void setup() {
  pinMode(pingPin, OUTPUT);
  pinMode(RPin, INPUT);
  Serial.begin(9600);
}

void loop()
{
  long duration, inches, cm;
  
  digitalWrite(pingPin, LOW);
  delayMicroseconds(2);
  digitalWrite(pingPin, HIGH);
  delayMicroseconds(5);
  digitalWrite(pingPin, LOW);
  
  duration = pulseIn(RPin, HIGH);

  inches = microsecondsToInches(duration);
  cm = microsecondsToCentimeters(duration);
  
  Serial.print(inches);
  Serial.print("in, ");
  Serial.print(cm);
  Serial.print("cm");
  Serial.println();
  
  delay(100);
}

long microsecondsToInches(long microseconds)
{
  return microseconds / 74 / 2;
}

long microsecondsToCentimeters(long microseconds)
{
  return microseconds / 29 / 2;
}

When you replace one of the two transducers and apparently noticed the greater part of the degradation, did you replace the transmit side or the receive side? It seems that the most likely explanation for your problem is that either the transmit or receive circuitry (or both) of the HC-SR04 is inappropriate for the transducer you've substituted.

If you want help, post your schematic.

there is a problem when I change to the waterproof transducers

That's pretty vague. Do you think you can elaborate ?

Are you submerging them in liquid?

That datasheet it somewhat confused - it refers to "Waterproof type" but then "This sensor is designed for use in air environment. Do no use it in liquid."

And the casing is clearly not submersible.

Perhaps you should look for transducers designed for your application.

Or maybe you should re-phrase your post: " Hello forum, I have a standard HC-SR04 Ultrasonic Module ( the same one you are all familiar with). I got this "great" idea to remove the transducers and replace them with waterproof ones so I can [fill in blank]"

OK, so you take open air sensors and removed them from the transducer that powers them.

swapped out waterproof ones that are encapsulated inside of metal cans and filled with epoxy.....

and expect them to work exactly the same ?

you have to get the JSN board that has the power to make them work. the pulse to activate the piezo element attached to the metal can, then vibrate the metal can to pulse in open air, well the power requirements for the pulse is much different.

I don't know why the OP is calling them "waterproof". I his OP, he says:

I bought these transducers a while ago and never got around to test them.

This is the datasheet for those transducers

Note where it says (in the section under "Waterproof Type")

This sensor is designed for use in air environment. Do not use it in liquid

He said this:

Anyway I First only replaced 1 transducer with the above ones and it didnt seem to work really unless I hold the transducers facing each other about 2 cm apart then I get a correct reading otherwise I just get random ones and now and then a reading will show that is close but thats very rare

When I replaced both transducers It does the same but seems slightly worse.

After removing the original transducers from an HC-SR04 module and replacing them with the above ones he said this:

Any reason for this?

Yes. The reason is you took a perfectly good Ultrasonic module and screwed it up.

Undermentioned: As for the schematic, I can definitely say it is connected the right way, its just four wires you cant really go wrong there :)

We've seen lots of people go wrong with even just one wire, here.