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.
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:
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.
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.
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.