I am working on an experiment with the HC-SR04 sound sensor, and i am using it to record the speed of sound. I successfully measured the speed of sound in air, but when measuring it in water, I encountered a small problem. The sound waves emitted by the sensor are both absorbed and reflected off the water. Obviously, the reflected sound waves are the first ones to reach the sensor, and therefore are the ones used for calculating the speed of sound. Is there a way to code the Arduino program in order to ignore the first set of waves and only record the set of waves that were absorbed by the water? I was thinking of increasing the delay time for the pulse, but I'm not sure that would work.


  • 2
    Are you submerging your HC-SR04?
    – GBG
    Jun 1 '17 at 17:13
  • I am not, I'm signaling from outside the water, and thats why the wave is reflected back. I believe if I submerged it, it would work, but I cant find a way of submerging it without breaking it.
    – Tiago
    Jun 1 '17 at 18:41

All you need to do is ignore any reading within the first milliseconds. Off the top of my head there is a delay statement before reading from this sensor, just alter that. You can work out how long it needs to be by working out how fast sound waves travel through the air and measuring the distance between the sensor and the source of the reflection. I think you might know how to do that :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.