I'm working on a small learning project where I want to connect sonar back to an android phone over bluetooth. I'm working with an hc- sr04 that a friend gave to me and I'm trying to piece together how this would locate an object in the water.

I understand the basic concept, speed of sound, pulse emitted, calculate the time to find the distance. What I'm lost on is how you can actually locate where the object is relative to the sensor. If the only thing I know is the distance the object could be anywhere on a sphere on that radius within the viewing angle of the sonar.

Would I need multiple sensors to use triangulation? Or are there sensors that can tell me more information about the echo?

  • \$\begingroup\$ The HC-SR04 appears to be an ultrasonic rangefinder not designed for underwater use. Are you sure the device you have can be used underwater? Immersing it could damage it, and if it's not designed for use underwater it's unlikely that the transducer works well with water, and any any internal algorithms which incorporate the speed of sound will be wrong. \$\endgroup\$
    – LeoR
    Jun 23, 2014 at 12:16
  • \$\begingroup\$ It can't, I have notes on a model that is for underwater use however it was more expensive so I'm using the cheaper hc to test on. \$\endgroup\$
    – nikolifish
    Jun 23, 2014 at 12:34

1 Answer 1


Most underwater sonars that need to measure direction to a target use arrays of hydrophones. When the outputs of the hydrophones are added, the resultant output exhibits a narrow directional response, called a beam, which can be used to locate a target, usually only in 2 dimensions but 3 dimensions can also be done if the array extends in both the x and y dimensions. If time delays are inserted in the hydrophone signals before they are added, the beam can be steered to allow finding targets in different directions. This approach has been used in naval sonars since World War I although the technology has advanced considerably. For more details, I suggest searching on sonar beamforming.

  • \$\begingroup\$ Good stuff. Thank you. Would the receiver on the hc-sr04 be considered a hydrophobe for the purposes of testing \$\endgroup\$
    – nikolifish
    Jun 22, 2014 at 21:14
  • \$\begingroup\$ I am not familiar with that unit but in general a device that converts underwater sound into an equivalent electrical signal is called a hydrophone. A device that converts electrical energy into underwater sound energy is called a projector. Either one is sometimes referred to as a transducer, a general term for any device that converts one form of energy into another. \$\endgroup\$
    – Barry
    Jun 23, 2014 at 3:20
  • \$\begingroup\$ Electronic beamforming requires multiple emitters and/or detectors, so that won't work without more than one module. Mechanical beamforming (or relying on innate directivity) might be an option, but then you'd have to mechanically slew the system in angle, rather than doing it by adjusting the time delays to multiple elements. Generally, you'd also want a system with an analog output so that you can compare the received intensity, vs. the simple digital output of those modules. And of course the best systems are going to let you control and look at the carrier phase, not just modulation. \$\endgroup\$ Jul 22, 2014 at 17:26
  • \$\begingroup\$ One sensor can detect distance, but can't determine anything about direction. Two sensors can detect direction, but only at the hemispherical level. Three sensors can detect one-of-two direction, but can't select which of the two directions. Four sensors can pinpoint the targeted object. \$\endgroup\$ Aug 21, 2014 at 17:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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